equal
deleted
inserted
replaced
743 {$ELSE} |
743 {$ELSE} |
744 buf[0]:= char(0); // avoid compiler hint |
744 buf[0]:= char(0); // avoid compiler hint |
745 AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')'); |
745 AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')'); |
746 {$ENDIF} |
746 {$ENDIF} |
747 |
747 |
|
748 {$IFDEF MOBILE} |
|
749 // TODO: this function creates an opengles1.1 context |
|
750 // un-comment below and add proper logic to support opengles2.0 |
|
751 //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); |
|
752 //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); |
|
753 if SDLGLcontext = nil then |
|
754 SDLGLcontext:= SDL_GL_CreateContext(SDLwindow); |
|
755 SDLTry(SDLGLcontext <> nil, true); |
|
756 SDL_GL_SetSwapInterval(1); |
|
757 {$ENDIF} |
|
758 |
748 RendererSetup(); |
759 RendererSetup(); |
749 end; |
760 end; |
750 |
761 |
751 (* |
762 (* |
752 procedure UpdateProjection; |
763 procedure UpdateProjection; |