diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2013-08-14 06:59:09 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2013-08-14 06:59:09 +0400 |
commit | eccde9f72a07e5191b76632df6c5753ef2a7933e (patch) | |
tree | 0aedc4b2161b7544791956e29cf24e1aaec42bc7 /source/gameengine/Ketsji | |
parent | 5157eea9777182016fc648262077d644c736184b (diff) |
BGE Dome: bugfix - Warp Mesh not working
Fix: to swap the drawing order for the warp mesh polygon
The code was drawing CW instead of CCW.
It would work in some cases where the drawing flags would allow for the
back faces to be visible.
More specifically the alternative fix were:
glDisable ( GL_CULL_FACE );
glFrontFace( GL_CW );
Bug originally reported in the small_planetarium mailing list.
This bug fix was a comissioned job by a group who prefer not to be
credited. Thanks regardless.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_Dome.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index aa082c7ef19..85fa0b2b3ce 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -401,21 +401,21 @@ void KX_Dome::GLDrawWarpQuads(void) if (warp.nodes[i][j].i < 0 || warp.nodes[i+1][j].i < 0 || warp.nodes[i+1][j+1].i < 0 || warp.nodes[i][j+1].i < 0) continue; - glColor3f(warp.nodes[i][j].i, warp.nodes[i][j].i, warp.nodes[i][j].i); - glTexCoord2f((warp.nodes[i][j].u * uv_width), (warp.nodes[i][j].v * uv_height)); - glVertex3f(warp.nodes[i][j].x, warp.nodes[i][j].y,0.0); - - glColor3f(warp.nodes[i+1][j].i, warp.nodes[i+1][j].i, warp.nodes[i+1][j].i); - glTexCoord2f((warp.nodes[i+1][j].u * uv_width), (warp.nodes[i+1][j].v * uv_height)); - glVertex3f(warp.nodes[i+1][j].x, warp.nodes[i+1][j].y,0.0); + glColor3f(warp.nodes[i][j+1].i, warp.nodes[i][j+1].i, warp.nodes[i][j+1].i); + glTexCoord2f((warp.nodes[i][j+1].u * uv_width), (warp.nodes[i][j+1].v * uv_height)); + glVertex3f(warp.nodes[i][j+1].x, warp.nodes[i][j+1].y,0.0); glColor3f(warp.nodes[i+1][j+1].i, warp.nodes[i+1][j+1].i, warp.nodes[i+1][j+1].i); glTexCoord2f((warp.nodes[i+1][j+1].u * uv_width), (warp.nodes[i+1][j+1].v * uv_height)); glVertex3f(warp.nodes[i+1][j+1].x, warp.nodes[i+1][j+1].y,0.0); - glColor3f(warp.nodes[i][j+1].i, warp.nodes[i][j+1].i, warp.nodes[i][j+1].i); - glTexCoord2f((warp.nodes[i][j+1].u * uv_width), (warp.nodes[i][j+1].v * uv_height)); - glVertex3f(warp.nodes[i][j+1].x, warp.nodes[i][j+1].y,0.0); + glColor3f(warp.nodes[i+1][j].i, warp.nodes[i+1][j].i, warp.nodes[i+1][j].i); + glTexCoord2f((warp.nodes[i+1][j].u * uv_width), (warp.nodes[i+1][j].v * uv_height)); + glVertex3f(warp.nodes[i+1][j].x, warp.nodes[i+1][j].y,0.0); + + glColor3f(warp.nodes[i][j].i, warp.nodes[i][j].i, warp.nodes[i][j].i); + glTexCoord2f((warp.nodes[i][j].u * uv_width), (warp.nodes[i][j].v * uv_height)); + glVertex3f(warp.nodes[i][j].x, warp.nodes[i][j].y,0.0); } } glEnd(); |