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:
@@ -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!");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user