Fix for spheremap rendering, texcoords are flipped in OpenGL.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2393 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-05-16 17:45:19 +00:00
parent 9d9024f5d6
commit 71a154ef5e
1 changed files with 4 additions and 0 deletions

View File

@ -543,6 +543,10 @@ public:
{ {
Driver->disableTextures(1); Driver->disableTextures(1);
Driver->setTexture(0, material.getTexture(0)); Driver->setTexture(0, material.getTexture(0));
// texture needs to be flipped for OpenGL
core::matrix4 tmp = Driver->getTransform(ETS_TEXTURE_0);
tmp[5]*=-1;
Driver->setTransform(ETS_TEXTURE_0, tmp);
Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates)