mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-10 16:32:31 +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
|
@ -142,7 +142,7 @@ void Beam::render()
|
|||
void Beam::onRender()
|
||||
{
|
||||
#ifdef BBGE_BUILD_OPENGL
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
Vector diff = endPos - position;
|
||||
Vector side = diff;
|
||||
//side.normalize2D();
|
||||
|
|
|
@ -62,7 +62,7 @@ void CurrentRender::onRender()
|
|||
{
|
||||
#ifdef BBGE_BUILD_OPENGL
|
||||
// note: Leave cull_face disabled!?
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
//int qs = 0;
|
||||
for (Path *p = dsq->game->getFirstPathOfType(PATH_CURRENT); p; p = p->nextOfType)
|
||||
{
|
||||
|
@ -308,7 +308,7 @@ void CurrentRender::onRender()
|
|||
//glEnd();
|
||||
|
||||
}
|
||||
glEnable(GL_CULL_FACE);
|
||||
//glEnable(GL_CULL_FACE);
|
||||
|
||||
/*
|
||||
std::ostringstream os;
|
||||
|
|
|
@ -130,7 +130,7 @@ HairNode *Hair::getHairNode(int idx)
|
|||
void Hair::onRender()
|
||||
{
|
||||
#ifdef BBGE_BUILD_OPENGL
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
float texBits = 1.0f / (hairNodes.size()-1);
|
||||
|
@ -192,7 +192,7 @@ void Hair::onRender()
|
|||
}
|
||||
|
||||
*/
|
||||
glEnable(GL_CULL_FACE);
|
||||
//glEnable(GL_CULL_FACE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ void SteamRender::onUpdate(float dt)
|
|||
void SteamRender::onRender()
|
||||
{
|
||||
#ifdef BBGE_BUILD_OPENGL
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
//int qs = 0;
|
||||
|
||||
for (Path *p = dsq->game->getFirstPathOfType(PATH_STEAM); p; p = p->nextOfType)
|
||||
|
@ -121,7 +121,7 @@ void SteamRender::onRender()
|
|||
}
|
||||
}
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
//glEnable(GL_CULL_FACE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ void Web::onRender()
|
|||
//glDisable(GL_BLEND);
|
||||
|
||||
glLineWidth(4);
|
||||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_CULL_FACE);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
glBegin(GL_LINES);
|
||||
|
|
|
@ -266,9 +266,9 @@ protected:
|
|||
q->setBlendType(BLEND_ADD);
|
||||
addChild(q, PM_POINTER);
|
||||
|
||||
std::ostringstream os;
|
||||
os << "children: " << children.size();
|
||||
debugLog(os.str());
|
||||
//std::ostringstream os;
|
||||
//os << "children: " << children.size();
|
||||
//debugLog(os.str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue