about summary refs log tree commit diff
path: root/src/engine/client/backend_sdl.h
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-01-06 16:35:48 +0100
committeroy <Tom_Adams@web.de>2012-01-06 16:35:48 +0100
commit78bb0e3d8c6c4ea35bc35aada6dfb780930570b2 (patch)
treed4edbc8247193cc25ef27c5934c9de4183f7d79a /src/engine/client/backend_sdl.h
parent71dd0c5aab9b4f2dd50b3e935db764a3868de83e (diff)
downloadzcatch-78bb0e3d8c6c4ea35bc35aada6dfb780930570b2.tar.gz
zcatch-78bb0e3d8c6c4ea35bc35aada6dfb780930570b2.zip
fixed compiling for macosx
Diffstat (limited to 'src/engine/client/backend_sdl.h')
-rw-r--r--src/engine/client/backend_sdl.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/engine/client/backend_sdl.h b/src/engine/client/backend_sdl.h
index 62ac6f7c..c6c2255a 100644
--- a/src/engine/client/backend_sdl.h
+++ b/src/engine/client/backend_sdl.h
@@ -27,25 +27,24 @@
 	static void GL_ReleaseContext(const SGLContext &Context) { wglMakeCurrent(NULL, NULL); }
 	static void GL_SwapBuffers(const SGLContext &Context) { SwapBuffers(Context.m_hDC); }
 #elif defined(CONF_PLATFORM_MACOSX)
-	#warning Untested implementation. I have no Mac OS X machine to test on. Please test, verify, fix and then remove this warning
+
+	#include <AGL/agl.h>
 
 	struct SGLContext
 	{
-		AGLDrawable m_Drawable;
 		AGLContext m_Context;
 	};
 
 	static SGLContext GL_GetCurrentContext()
 	{
 		SGLContext Context;
-		Context.m_Drawable = aglGetCurrentDrawable();
 		Context.m_Context = aglGetCurrentContext();
 		return Context;
 	}
 
-	static void GL_MakeCurrent(const SGLContext &Context) { aglMakeCurrent(Context.m_Drawable, Context.m_Context); }
-	static void GL_ReleaseContext(const SGLContext &Context) { aglMakeCurrent(AGL_NONE, NULL); }
-	static void GL_SwapBuffers(const SGLContext &Context) { aglSwapBuffers(Context.m_Drawable); }
+	static void GL_MakeCurrent(const SGLContext &Context) { aglSetCurrentContext(Context.m_Context); }
+	static void GL_ReleaseContext(const SGLContext &Context) { aglSetCurrentContext(NULL); }
+	static void GL_SwapBuffers(const SGLContext &Context) { aglSwapBuffers(Context.m_Context); }
 		
 #elif defined(CONF_FAMILY_UNIX)