Commit 8796542e authored by hybrid's avatar hybrid

Fix texture size of terrain mesh.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3230 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 7a4c4a4a
...@@ -265,7 +265,7 @@ IMesh* CGeometryCreator::createTerrainMesh(video::IImage* texture, ...@@ -265,7 +265,7 @@ IMesh* CGeometryCreator::createTerrainMesh(video::IImage* texture,
{ {
c8 textureName[64]; c8 textureName[64];
// create texture for this block // create texture for this block
video::IImage* img = new video::CImage(texture->getColorFormat(), texture->getDimension()); video::IImage* img = new video::CImage(texture->getColorFormat(), core::dimension2d<u32>(core::floor32(blockSize.Width*thRel.X), core::floor32(blockSize.Height*thRel.Y)));
texture->copyTo(img, core::position2di(0,0), core::recti( texture->copyTo(img, core::position2di(0,0), core::recti(
core::position2d<s32>(core::floor32(processed.X*thRel.X), core::floor32(processed.Y*thRel.Y)), core::position2d<s32>(core::floor32(processed.X*thRel.X), core::floor32(processed.Y*thRel.Y)),
core::dimension2d<u32>(core::floor32(blockSize.Width*thRel.X), core::floor32(blockSize.Height*thRel.Y))), 0); core::dimension2d<u32>(core::floor32(blockSize.Width*thRel.X), core::floor32(blockSize.Height*thRel.Y))), 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment