#130820 - a128 - Fri Jun 08, 2007 2:07 pm
I draw two boxes
One box is translucent , the box behind is solid, flad shaded box
The Problem i can not see solid box THRU the translucent box. The translucent box is in fact translucent and in front of the solid box.
BTW the Solid box does not have any GFX_NORMAL commands, because it's a flat shaded box. So I do not turn POLY_FORMAT_LIGHT0 on
The code below just reflects the parameters for the translucent/solid part
I use
Last edited by a128 on Mon Jun 11, 2007 3:26 pm; edited 1 time in total
One box is translucent , the box behind is solid, flad shaded box
The Problem i can not see solid box THRU the translucent box. The translucent box is in fact translucent and in front of the solid box.
BTW the Solid box does not have any GFX_NORMAL commands, because it's a flat shaded box. So I do not turn POLY_FORMAT_LIGHT0 on
The code below just reflects the parameters for the translucent/solid part
I use
Code: |
#define POLY_FORMAT_LIGHTFLAGS (flags for 1 light or more) //Bit15 is 1 !!!!! GFX_DIFFUSE_AMBIENT = 0x18c6f1fc; GFX_SPECULAR_EMISSION = 0x18c6; //Solid Box glPolyFmt(POLY_ID(0) | POLY_ALPHA(31) | POLY_CULL_BACK| 0); glBegin(GL_QUADS); .... //Translucent Box /*setMaterial0()*/ GFX_DIFFUSE_AMBIENT = 0x18c6ffff; GFX_SPECULAR_EMISSION = 0x18c6; /* translucent level 10 */ glPolyFmt(POLY_ID(1) | POLY_ALPHA(10) | POLY_CULL_NONE| POLY_FORMAT_LIGHTFLAGS); glBegin(GL_QUADS); .... glFlush(0); //Is this automaic sorting?! or glFlush(1)?! |
Last edited by a128 on Mon Jun 11, 2007 3:26 pm; edited 1 time in total