EMI: Enable backface culling. Fixes #900
This commit is contained in:
parent
8f7ce221dc
commit
d80c84ad97
3 changed files with 19 additions and 0 deletions
|
@ -508,6 +508,9 @@ void GfxOpenGLS::startActorDraw(const Actor *actor) {
|
|||
const float alpha = actor->getEffectiveAlpha();
|
||||
|
||||
if (g_grim->getGameType() == GType_MONKEY4) {
|
||||
glEnable(GL_CULL_FACE);
|
||||
glFrontFace(GL_CW);
|
||||
|
||||
const Math::Matrix4 &viewMatrix = _currentQuat.toMatrix();
|
||||
Math::Matrix4 modelMatrix = actor->getFinalMatrix();
|
||||
modelMatrix.transpose();
|
||||
|
@ -589,6 +592,9 @@ void GfxOpenGLS::startActorDraw(const Actor *actor) {
|
|||
void GfxOpenGLS::finishActorDraw() {
|
||||
_currentActor = NULL;
|
||||
glDisable(GL_POLYGON_OFFSET_FILL);
|
||||
if (g_grim->getGameType() == GType_MONKEY4) {
|
||||
glDisable(GL_CULL_FACE);
|
||||
}
|
||||
}
|
||||
|
||||
void GfxOpenGLS::setShadow(Shadow *shadow) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue