forked from mia/Aegisub
Another attempt to fix gl_wrap.cpp on OS X.
Originally committed to SVN as r1143.
This commit is contained in:
parent
aef7dd3e61
commit
3f0b3eebae
1 changed files with 4 additions and 0 deletions
|
@ -64,6 +64,7 @@ void* glGetProc(const char *str) { return aglGetProcAddress(str); }
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// OpenGL extension function pointers
|
// OpenGL extension function pointers
|
||||||
|
#ifndef __WXMAC_OSX__
|
||||||
PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB = NULL;
|
PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB = NULL;
|
||||||
PFNGLDELETEOBJECTARBPROC glDeleteObjectARB = NULL;
|
PFNGLDELETEOBJECTARBPROC glDeleteObjectARB = NULL;
|
||||||
PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL;
|
PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL;
|
||||||
|
@ -75,6 +76,7 @@ PFNGLCOMPILESHADERARBPROC glCompileShaderARB = NULL;
|
||||||
PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB = NULL;
|
PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB = NULL;
|
||||||
PFNGLUNIFORM1IARBPROC glUniform1iARB = NULL;
|
PFNGLUNIFORM1IARBPROC glUniform1iARB = NULL;
|
||||||
PFNGLUNIFORM2FARBPROC glUniform2fARB = NULL;
|
PFNGLUNIFORM2FARBPROC glUniform2fARB = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
////////////////
|
////////////////
|
||||||
|
@ -305,6 +307,7 @@ void OpenGLWrapper::Initialize() {
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
|
#ifndef __WXMAC_OSX__
|
||||||
glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) glGetProc("glUseProgramObjectARB");
|
glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) glGetProc("glUseProgramObjectARB");
|
||||||
if (!glUseProgramObjectARB) throw _T("OpenGL shader support not available.");
|
if (!glUseProgramObjectARB) throw _T("OpenGL shader support not available.");
|
||||||
glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) glGetProc("glDeleteObjectARB");
|
glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) glGetProc("glDeleteObjectARB");
|
||||||
|
@ -317,6 +320,7 @@ void OpenGLWrapper::Initialize() {
|
||||||
glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) glGetProc("glGetUniformLocationARB");
|
glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) glGetProc("glGetUniformLocationARB");
|
||||||
glUniform1iARB = (PFNGLUNIFORM1IARBPROC) glGetProc("glUniform1iARB");
|
glUniform1iARB = (PFNGLUNIFORM1IARBPROC) glGetProc("glUniform1iARB");
|
||||||
glUniform2fARB = (PFNGLUNIFORM2FARBPROC) glGetProc("glUniform2fARB");
|
glUniform2fARB = (PFNGLUNIFORM2FARBPROC) glGetProc("glUniform2fARB");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue