Fixed the image flip for draw2DImage in OpenGL driver as suggested by omaremad.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1578 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
4a1a067709
commit
e1ed3d4a77
|
@ -1227,7 +1227,7 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture,
|
|||
// now draw it.
|
||||
|
||||
// texcoords need to be flipped horizontally for RTTs
|
||||
const bool isRTT = Material.getTexture(0) && Material.getTexture(0)->isRenderTarget();
|
||||
const bool isRTT = texture->isRenderTarget();
|
||||
const core::dimension2d<s32>& ss = texture->getOriginalSize();
|
||||
const f32 invW = 1.f / static_cast<f32>(ss.Width);
|
||||
const f32 invH = 1.f / static_cast<f32>(ss.Height);
|
||||
|
@ -1272,7 +1272,7 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::rect
|
|||
return;
|
||||
|
||||
// texcoords need to be flipped horizontally for RTTs
|
||||
const bool isRTT = Material.getTexture(0) && Material.getTexture(0)->isRenderTarget();
|
||||
const bool isRTT = texture->isRenderTarget();
|
||||
const core::dimension2d<s32>& ss = texture->getOriginalSize();
|
||||
const f32 invW = 1.f / static_cast<f32>(ss.Width);
|
||||
const f32 invH = 1.f / static_cast<f32>(ss.Height);
|
||||
|
@ -1369,7 +1369,7 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture,
|
|||
const core::dimension2d<s32>& ss = texture->getOriginalSize();
|
||||
core::position2d<s32> targetPos(pos);
|
||||
// texcoords need to be flipped horizontally for RTTs
|
||||
const bool isRTT = Material.getTexture(0) && Material.getTexture(0)->isRenderTarget();
|
||||
const bool isRTT = texture->isRenderTarget();
|
||||
const f32 invW = 1.f / static_cast<f32>(ss.Width);
|
||||
const f32 invH = 1.f / static_cast<f32>(ss.Height);
|
||||
|
||||
|
|
Loading…
Reference in New Issue