Deactivated depth writing fo g3_draw_bitmap() sprites to prevent rendering errors when clipped in some cases

This commit is contained in:
zicodxx 2008-11-26 01:24:58 +00:00
parent 8466399451
commit c11f203abd
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20081126
--------
arch/ogl/ogl.c: Deactivated depth writing fo g3_draw_bitmap() sprites to prevent rendering errors when clipped in some cases
20081122
--------
main/fvi.c, main/pysics.c: Took out the "disable_new_fvi"-hack. After all we do not need that specific optimisation anymore and also without it we can have more accurate collisions with non-player objects. After playtesting for a while let's just do this.

View file

@ -820,6 +820,7 @@ bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm, object
OGL_ENABLE(TEXTURE_2D);
ogl_bindbmtex(bm);
ogl_texwrap(bm->gltexture,GL_CLAMP_TO_EDGE);
glDepthMask(GL_FALSE);
if (Endlevel_sequence)
glDepthFunc(GL_ALWAYS);
@ -867,12 +868,13 @@ bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm, object
break;
}
if (obj->id == 5 && obj->type == 1) // create small z-Offset for missile explodihg effect - prevents ugly wall-clipping
if (obj->id == 5 && obj->type == 1) // create small z-Offset for missile exploding effect - prevents ugly wall-clipping
pv.z -= F1_0;
glVertex3f(f2glf(pv.x),f2glf(pv.y),-f2glf(pv.z));
}
glEnd();
glDepthMask(GL_TRUE);
return 0;
}