added osx implementation. not tested, not even compiled once. hope it works

This commit is contained in:
Magnus Auvinen 2012-01-03 22:49:31 +01:00
parent 2991f4071e
commit 666401e309

View file

@ -27,7 +27,26 @@
static void GL_ReleaseContext(const SGLContext &Context) { wglMakeCurrent(Context.m_hDC, NULL); }
static void GL_SwapBuffers(const SGLContext &Context) { SwapBuffers(Context.m_hDC); }
#elif defined(CONF_PLATFORM_MACOSX)
#error missing implementation
#warning Untested implementation. I have no Mac OS X machine to test on. Please test, verify, fix and then remove this warning
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(Context.m_Drawable, NULL); }
static void GL_SwapBuffers(const SGLContext &Context) { aglSwapBuffers(Context.m_Drawable); }
#elif defined(CONF_FAMILY_UNIX)
#include <GL/glx.h>