allow GL extension checking from cfgs

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1973 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-05-14 22:15:45 +00:00
parent 85fd0b8563
commit 856646b4c9
7 changed files with 21 additions and 6 deletions
+8 -1
View File
@@ -21,6 +21,13 @@ void *getprocaddress(const char *name)
return SDL_GL_GetProcAddress(name);
}
int glext(char *ext)
{
const char *exts = (const char *)glGetString(GL_EXTENSIONS);
return strstr(exts, ext) != NULL;
}
COMMAND(glext, ARG_1EST);
void gl_checkextensions()
{
const char *vendor = (const char *)glGetString(GL_VENDOR);
@@ -49,7 +56,7 @@ void gl_checkextensions()
hasMDA = true;
}
if(!strstr(exts, "GL_EXT_fragment_program"))
if(!strstr(exts, "GL_ARB_fragment_program"))
{
// not a required extension, but ensures the card has enough power to do reflections
extern int waterreflect, waterrefract;