]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Game.h
More effort.
[lugaru.git] / Source / Game.h
index d39b739014624add83b61819f922e4b782c44376..5be8ce45fb26a5663b03c44d424be357a839a2c9 100644 (file)
 
 extern GLuint rabbittexture;
 
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
 
 class Game             
 {
@@ -271,4 +279,31 @@ public:
 
 };
 
-#endif
\ No newline at end of file
+#ifndef __forceinline
+#  ifdef __GNUC__
+#    define __forceinline inline __attribute__((always_inline))
+#  endif
+#endif
+
+static __forceinline void swap_gl_buffers(void)
+{
+#ifdef WIN32
+    extern HDC hDC;
+    SwapBuffers( hDC);
+#elif USE_SDL
+    SDL_GL_SwapBuffers();
+#elif PLATFORM_MACOSX
+    extern AGLContext gaglContext;
+    aglSwapBuffers(gaglContext);
+#else
+    #error define your platform.
+#endif
+}
+
+#ifdef __GNUC__
+#define LONGLONGCONST(x) (x##ll)
+#else
+#define LONGLONGCONST(x) (x)
+#endif
+
+#endif