equal
deleted
inserted
replaced
432 var AuxBufNum: LongInt = 0; |
432 var AuxBufNum: LongInt = 0; |
433 tmpstr: ansistring; |
433 tmpstr: ansistring; |
434 tmpint: LongInt; |
434 tmpint: LongInt; |
435 tmpn: LongInt; |
435 tmpn: LongInt; |
436 begin |
436 begin |
437 {$IFDEF MOBILE} |
|
438 // TODO: this function creates an opengles1.1 context |
|
439 // un-comment below and add proper logic to support opengles2.0 |
|
440 //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); |
|
441 //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); |
|
442 if SDLGLcontext = nil then |
|
443 SDLGLcontext:= SDL_GL_CreateContext(SDLwindow); |
|
444 SDLTry(SDLGLcontext <> nil, true); |
|
445 SDL_GL_SetSwapInterval(1); |
|
446 {$ENDIF} |
|
447 |
|
448 // suppress hint/warning |
437 // suppress hint/warning |
449 AuxBufNum:= AuxBufNum; |
438 AuxBufNum:= AuxBufNum; |
450 |
439 |
451 // get the max (h and v) size for textures that the gpu can support |
440 // get the max (h and v) size for textures that the gpu can support |
452 glGetIntegerv(GL_MAX_TEXTURE_SIZE, @MaxTextureSize); |
441 glGetIntegerv(GL_MAX_TEXTURE_SIZE, @MaxTextureSize); |