mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-08 07:09:52 +00:00
Disable all glEnable/glDisable() calls for GL_CULL_FACE, except one glDisable() during renderer init.
GL_CULL_FACE is effectively always disabled, except for quad strip rendering, and keeping GL_CULL_FACE disabled there does not seem to cause any visual artifacts. Instead, it enhances skeletal animation possibilities (e.g. flipping bone strips over without it disappearing)
This commit is contained in:
parent
811b015983
commit
12ea97f051
13 changed files with 24 additions and 24 deletions
|
@ -301,7 +301,7 @@ bool exists(const std::string &f, bool makeFatal, bool skipVFS)
|
|||
void drawCircle(float radius, int stepSize)
|
||||
{
|
||||
#ifdef BBGE_BUILD_OPENGL
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
|
||||
glBegin(GL_POLYGON);
|
||||
{
|
||||
|
@ -312,7 +312,7 @@ void drawCircle(float radius, int stepSize)
|
|||
}
|
||||
glEnd();
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
//glEnable(GL_CULL_FACE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ void BitmapText::onRender()
|
|||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
*/
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
|
||||
//glScalef(1, -1, 0);
|
||||
|
||||
|
@ -374,7 +374,7 @@ void BitmapText::onRender()
|
|||
}
|
||||
}
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
//glEnable(GL_CULL_FACE);
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -306,7 +306,7 @@ void Emitter::onRender()
|
|||
|
||||
if (data.flipH || (data.copyParentFlip && (pe->isfh() || (pe->getParent() && pe->getParent()->isfh()))))
|
||||
{
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
glRotatef(180, 0, 1, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -499,7 +499,7 @@ void Quad::onRender()
|
|||
if (!strip.empty())
|
||||
{
|
||||
//glDisable(GL_BLEND);gggg
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
|
||||
const float texBits = 1.0f / (strip.size()-1);
|
||||
|
||||
|
@ -517,7 +517,7 @@ void Quad::onRender()
|
|||
}
|
||||
glEnd();
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
//glEnable(GL_CULL_FACE);
|
||||
glBindTexture( GL_TEXTURE_2D, 0 );
|
||||
glColor4f(1,0,0,1);
|
||||
glPointSize(64);
|
||||
|
|
|
@ -59,7 +59,7 @@ void QuadTrail::onRender()
|
|||
if (numPoints < 2) return;
|
||||
|
||||
#ifdef BBGE_BUILD_OPENGL
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
int c = 0;
|
||||
Vector p, diff, dl, dr;
|
||||
Vector lastPoint;
|
||||
|
|
|
@ -629,7 +629,7 @@ void RenderObject::renderCall()
|
|||
glTranslatef(position.x, position.y, position.z);
|
||||
if (isfh())
|
||||
{
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
glRotatef(180, 0, 1, 0);
|
||||
}
|
||||
|
||||
|
@ -655,7 +655,7 @@ void RenderObject::renderCall()
|
|||
glTranslatef(pos.x, pos.y, pos.z);
|
||||
if (isfh())
|
||||
{
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
glRotatef(180, 0, 1, 0);
|
||||
}
|
||||
glRotatef(rotation.z+rotationOffset.z, 0, 0, 1);
|
||||
|
@ -714,7 +714,7 @@ void RenderObject::renderCall()
|
|||
glRotatef(rotation.z+rotationOffset.z, 0, 0, 1);
|
||||
if (isfh())
|
||||
{
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
glRotatef(180, 0, 1, 0);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -105,7 +105,7 @@ void RoundedRect::onRender()
|
|||
//glBindTexture(GL_TEXTURE_2D, 0);
|
||||
int w2 = width/2;
|
||||
int h2 = height/2;
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
float iter = 0.1f;
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
|
@ -167,7 +167,7 @@ void RoundedRect::onRender()
|
|||
|
||||
glEnd();
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
//glEnable(GL_CULL_FACE);
|
||||
}
|
||||
|
||||
void RoundedRect::show()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue