small bugfix for ShapeBase::wireCube
by Orion Elenzil · 07/07/2008 (9:52 am) · 3 comments
the first face drawn by ShapeBase::wireCube() has opposite winding than the other five faces.
ordinarily this doesn't matter, since face-culling is disabled in ShapeBase::wireCube,
but if you should happen to enable it, one of your faces will be backwards.
the fix.
shapeBase.cc
change this:
ordinarily this doesn't matter, since face-culling is disabled in ShapeBase::wireCube,
but if you should happen to enable it, one of your faces will be backwards.
the fix.
shapeBase.cc
change this:
static U32 cubeFaces[6][4] = {
{ 0, 2, 6, 4 }, { 0, 2, 3, 1 }, { 0, 1, 5, 4 },
{ 3, 2, 6, 7 }, { 7, 6, 4, 5 }, { 3, 7, 5, 1 }
};to this:static U32 cubeFaces[6][4] = {
[b]{ 0, 4, 6, 2 }[/b], { 0, 2, 3, 1 }, { 0, 1, 5, 4 },
{ 3, 2, 6, 7 }, { 7, 6, 4, 5 }, { 3, 7, 5, 1 }
};About the author

Torque 3D Owner Kevin Rogers