apparently we are forced to use a (dummy) callback for glut 3.0 compatibility
authorkoda
Sun, 28 Oct 2012 23:53:38 +0100
changeset 7866 58d10edc5d21
parent 7865 2edc88e9fcd6
child 7867 a691fd5f98f8
apparently we are forced to use a (dummy) callback for glut 3.0 compatibility
hedgewars/uStore.pas
--- a/hedgewars/uStore.pas	Sun Oct 28 22:52:08 2012 +0100
+++ b/hedgewars/uStore.pas	Sun Oct 28 23:53:38 2012 +0100
@@ -53,7 +53,7 @@
 {$ENDIF}
 
 procedure WarpMouse(x, y: Word); inline;
-procedure SwapBuffers; inline;
+procedure SwapBuffers; {$IFDEF USE_VIDEO_RECORDING}cdecl{$ELSE}inline{$ENDIF};
 
 implementation
 uses uMisc, uConsole, uMobile, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands,
@@ -1115,6 +1115,7 @@
     glutInitWindowSize(cScreenWidth, cScreenHeight);
     glutCreateWindow('hedgewars (you don''t see this)'); // we don't need a window, but if this function is not called then OpenGL will not be initialized
     glutHideWindow();
+    glutDisplayFunc(@SwapBuffers); // we don't need a callback, but it's required for GLUT3
     SetupOpenGL();
 end;
 {$ENDIF} // SDL13
@@ -1296,7 +1297,7 @@
 {$ENDIF}
 end;
 
-procedure SwapBuffers; inline;
+procedure SwapBuffers; {$IFDEF USE_VIDEO_RECORDING}cdecl{$ELSE}inline{$ENDIF};
 begin
     if GameType = gmtRecord then
         exit;