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-e03cc46cb475master
parent
9d9024f5d6
commit
71a154ef5e
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue