Stub out bindbuffer if its not present. The generation code will work around it. The renderer will ignore it.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3256 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2009-07-11 18:23:07 +00:00
parent f7b9395261
commit 386aac4da7
1 changed files with 9 additions and 2 deletions

View File

@ -189,6 +189,9 @@ void APIENTRY GL_DrawRangeElementsEmul(GLenum mode, GLuint start, GLuint end, GL
{
qglDrawElements(mode, count, type, indices);
}
void APIENTRY GL_BindBufferARBStub(GLenum target, GLuint id)
{
}
#define getglcore getglfunction
#define getglext(name) getglfunction(name)
@ -595,9 +598,7 @@ void GL_Init(void *(*getglfunction) (char *name))
qglDrawRangeElements = (void *)getglext("glDrawRangeElements");
if (qglDrawRangeElements == 0)
{
qglDrawRangeElements = GL_DrawRangeElementsEmul;
}
//fixme: definatly make non-core
qglStencilOp = (void *)getglcore("glStencilOp");
@ -619,6 +620,12 @@ void GL_Init(void *(*getglfunction) (char *name))
qglEndList = (void*)getglcore("glEndList");
qglCallList = (void*)getglcore("glCallList");
qglBindBufferARB = (void *)getglext("qglBindBufferARB");
if (!qglBindBufferARB)
qglBindBufferARB = (void *)getglext("qglBindBuffer");
if (!qglBindBufferARB)
qglBindBufferARB = GL_BindBufferARBStub;
gl_vendor = qglGetString (GL_VENDOR);
Con_SafePrintf ("GL_VENDOR: %s\n", gl_vendor);