Deactivated depth writing fo g3_draw_bitmap() sprites to prevent rendering errors when clipped in some cases
This commit is contained in:
parent
4974579254
commit
15582a707c
|
@ -2,7 +2,9 @@ D2X-Rebirth Changelog
|
||||||
|
|
||||||
20081126
|
20081126
|
||||||
--------
|
--------
|
||||||
main/gameseq.c: Fixed logical code flow error when player dies in a secret level entered after base level destroyes which is also the last level
|
main/gameseq.c: Fixed logical code flow error when player dies in a secret level entered after base level destroyed which is also the last level
|
||||||
|
arch/ogl/ogl.c: Deactivated depth writing fo g3_draw_bitmap() sprites to prevent rendering errors when clipped in some cases
|
||||||
|
|
||||||
20081122
|
20081122
|
||||||
--------
|
--------
|
||||||
main/kconfig.c: Completly forgot to make mouse axis values static so they can be used in intervals - shame on me!
|
main/kconfig.c: Completly forgot to make mouse axis values static so they can be used in intervals - shame on me!
|
||||||
|
|
|
@ -818,6 +818,7 @@ bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm, int ori
|
||||||
OGL_ENABLE(TEXTURE_2D);
|
OGL_ENABLE(TEXTURE_2D);
|
||||||
ogl_bindbmtex(bm);
|
ogl_bindbmtex(bm);
|
||||||
ogl_texwrap(bm->gltexture,GL_CLAMP_TO_EDGE);
|
ogl_texwrap(bm->gltexture,GL_CLAMP_TO_EDGE);
|
||||||
|
glDepthMask(GL_FALSE);
|
||||||
|
|
||||||
if (Endlevel_sequence)
|
if (Endlevel_sequence)
|
||||||
glDepthFunc(GL_ALWAYS);
|
glDepthFunc(GL_ALWAYS);
|
||||||
|
@ -833,7 +834,10 @@ bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm, int ori
|
||||||
obj->id==POW_SHIELD_BOOST || // shield boost
|
obj->id==POW_SHIELD_BOOST || // shield boost
|
||||||
obj->id==POW_CLOAK || // cloak
|
obj->id==POW_CLOAK || // cloak
|
||||||
obj->id==POW_INVULNERABILITY)) // invulnerability
|
obj->id==POW_INVULNERABILITY)) // invulnerability
|
||||||
|
{
|
||||||
|
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
|
||||||
glColor4f(1.0,1.0,1.0,0.6); // ... with 0.6 alpha
|
glColor4f(1.0,1.0,1.0,0.6); // ... with 0.6 alpha
|
||||||
|
}
|
||||||
else
|
else
|
||||||
glColor3f(1.0,1.0,1.0);
|
glColor3f(1.0,1.0,1.0);
|
||||||
width = fixmul(width,Matrix_scale.x);
|
width = fixmul(width,Matrix_scale.x);
|
||||||
|
@ -864,12 +868,13 @@ bool g3_draw_bitmap(vms_vector *pos,fix width,fix height,grs_bitmap *bm, int ori
|
||||||
break;
|
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;
|
pv.z -= F1_0;
|
||||||
|
|
||||||
glVertex3f(f2glf(pv.x),f2glf(pv.y),-f2glf(pv.z));
|
glVertex3f(f2glf(pv.x),f2glf(pv.y),-f2glf(pv.z));
|
||||||
}
|
}
|
||||||
glEnd();
|
glEnd();
|
||||||
|
glDepthMask(GL_TRUE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue