oglrender: support wireframe
This commit is contained in:
parent
b5dfdc501c
commit
1ba3351f6e
|
@ -829,6 +829,7 @@ static void OGLRender()
|
|||
|
||||
VERT *vert0 = &gfx3d.vertlist->list[poly->vertIndexes[0]];
|
||||
u8 alpha = material_5bit_to_8bit[poly->getAlpha()];
|
||||
if(wireframe) alpha = 255;
|
||||
u8 color0[4] = {
|
||||
material_5bit_to_8bit[vert0->color[0]],
|
||||
material_5bit_to_8bit[vert0->color[1]],
|
||||
|
@ -836,6 +837,9 @@ static void OGLRender()
|
|||
alpha
|
||||
};
|
||||
|
||||
//this draws things as a fan to prepare for the day when the clipping is done in gfx3d
|
||||
//and funny shaped polys find their way into here.
|
||||
//of course it could really be drawn as a fan, i suppose.. i dont remember why we did it this way
|
||||
for(int j = 1; j < (type-1); j++)
|
||||
{
|
||||
VERT *vert1 = &gfx3d.vertlist->list[poly->vertIndexes[j]];
|
||||
|
|
|
@ -546,9 +546,6 @@ static void gfx3d_glPolygonAttrib_cache()
|
|||
|
||||
// back face culling
|
||||
cullingMask = (polyAttr>>6)&3;
|
||||
|
||||
// Alpha value, actually not well handled, 0 should be wireframe
|
||||
colorRGB[3] = colorAlpha = ((polyAttr>>16)&0x1F);
|
||||
}
|
||||
|
||||
static void gfx3d_glTexImage_cache()
|
||||
|
|
|
@ -84,7 +84,8 @@ struct POLY {
|
|||
bool isTranslucent()
|
||||
{
|
||||
//alpha != 31 -> translucent
|
||||
if((polyAttr&0x001F0000) != 0x001F0000)
|
||||
//except for alpha 0 which is wireframe (unless it has a translucent tex)
|
||||
if((polyAttr&0x001F0000) != 0x001F0000 && (polyAttr&0x001F0000) != 0)
|
||||
return true;
|
||||
int texFormat = (texParam>>26)&7;
|
||||
|
||||
|
|
Loading…
Reference in New Issue