hedgewars/uStore.pas
changeset 6885 53a87a4c7b35
parent 6749 6bb0cea803bd
child 6898 344b0dbd9690
equal deleted inserted replaced
6884:85e810230372 6885:53a87a4c7b35
   621     buf[0]:= char(0); // avoid compiler hint
   621     buf[0]:= char(0); // avoid compiler hint
   622     AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')');
   622     AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')');
   623 
   623 
   624 {$IFDEF SDL13}
   624 {$IFDEF SDL13}
   625     // this function creates an opengles1.1 context by default on mobile devices
   625     // this function creates an opengles1.1 context by default on mobile devices
   626     // use SDL_GL_SetAttribute to change this behaviour
   626     // unless you un-comment this two attributes
       
   627     //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
       
   628     //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
   627     if SDLGLcontext = nil then
   629     if SDLGLcontext = nil then
   628         SDLGLcontext:= SDL_GL_CreateContext(SDLwindow);
   630         SDLGLcontext:= SDL_GL_CreateContext(SDLwindow);
   629     SDLTry(SDLGLcontext <> nil, true);
   631     SDLTry(SDLGLcontext <> nil, true);
   630     SDL_GL_SetSwapInterval(1);
   632     SDL_GL_SetSwapInterval(1);
   631 {$ENDIF}
   633 {$ENDIF}
   663 
   665 
   664     // everyone love debugging
   666     // everyone love debugging
   665     AddFileLog('OpenGL-- Renderer: ' + shortstring(pchar(glGetString(GL_RENDERER))));
   667     AddFileLog('OpenGL-- Renderer: ' + shortstring(pchar(glGetString(GL_RENDERER))));
   666     AddFileLog('  |----- Vendor: ' + shortstring(pchar(glGetString(GL_VENDOR))));
   668     AddFileLog('  |----- Vendor: ' + shortstring(pchar(glGetString(GL_VENDOR))));
   667     AddFileLog('  |----- Version: ' + shortstring(pchar(glGetString(GL_VERSION))));
   669     AddFileLog('  |----- Version: ' + shortstring(pchar(glGetString(GL_VERSION))));
   668     AddFileLog('  \----- Texture Size: ' + inttostr(MaxTextureSize));
   670     AddFileLog('  |----- Texture Size: ' + inttostr(MaxTextureSize));
       
   671     AddFileLog('  \----- Extensions: ' + shortstring(pchar(glGetString(GL_EXTENSIONS))));
       
   672     //TODO: don't have the Extensions line trimmed but slipt it into multiple lines
   669 
   673 
   670 {$IFNDEF S3D_DISABLED}
   674 {$IFNDEF S3D_DISABLED}
   671     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
   675     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
   672     begin
   676     begin
   673         // prepare left and right frame buffers and associated textures
   677         // prepare left and right frame buffers and associated textures