attempting workaround for S3 graphics bug

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3729 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-22 17:14:23 +00:00
parent 90079e2d2c
commit fcdbcf5b0d
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -39,6 +39,7 @@ int glext(char *ext)
COMMAND(glext, ARG_1EST);
VAR(ati_mda_bug, 0, 0, 1);
VAR(s3_dlist_bug, 0, 0, 1);
void gl_checkextensions()
{
@@ -49,6 +50,8 @@ void gl_checkextensions()
conoutf("Renderer: %s (%s)", renderer, vendor);
conoutf("Driver: %s", version);
if(strstr(vendor, "S3 Graphics")) s3_dlist_bug = 1;
if(strstr(exts, "GL_EXT_texture_env_combine") || strstr(exts, "GL_ARB_texture_env_combine")) hasTE = true;
else conoutf("WARNING: cannot use overbright lighting, using old lighting model!");
+3 -2
View File
@@ -519,14 +519,15 @@ struct vertmodel : model
return;
}
if(isstat && !owner->model->vertexlight) glNewList(statlist = glGenLists(1), GL_COMPILE);
extern int s3_dlist_bug;
if(isstat && !owner->model->vertexlight && !s3_dlist_bug) glNewList(statlist = glGenLists(1), GL_COMPILE);
loopi(numdyndraws)
{
const drawcall &d = dyndraws[i];
if(hasDRE) glDrawRangeElements_(d.type, d.minvert, d.maxvert, d.count, GL_UNSIGNED_SHORT, &dynidx[d.start]);
else glDrawElements(d.type, d.count, GL_UNSIGNED_SHORT, &dynidx[d.start]);
}
if(isstat && !owner->model->vertexlight)
if(isstat && !owner->model->vertexlight && !s3_dlist_bug)
{
glEndList();
glCallList(statlist);