this code show the builint font textures instead of the texture i have setted. i tried to set all tetxure layers but seems that in that mesh buffer something is wrong.
Code: Select all
irr::scene::SMeshBufferLightMap mesh;
mesh.Vertices.set_used(4);
mesh.Indices.set_used(6);
mesh.Vertices[0] = irr::video::S3DVertex2TCoords(0,100,0,irr::video::SColor(0,100,100,100),0,1,0,1);
mesh.Vertices[1] = irr::video::S3DVertex2TCoords(100,100,0,irr::video::SColor(0,100,100,100),1,1,1,1);
mesh.Vertices[2] = irr::video::S3DVertex2TCoords(100,0,0,irr::video::SColor(0,100,100,100),1,0,1,0);
mesh.Vertices[3] = irr::video::S3DVertex2TCoords(0,0,0,irr::video::SColor(0,100,100,100),0,0,0,0);
mesh.Indices[0] = 0;
mesh.Indices[1] = 1;
mesh.Indices[2] = 2;
mesh.Indices[3] = 2;
mesh.Indices[4] = 3;
mesh.Indices[5] = 0;
mesh.getMaterial().Lighting = false;
mesh.getMaterial().setTexture(0,Context.driver->
getTexture("tileset.png"));
mesh.getMaterial().setTexture(1,Context.driver->
getTexture("tileset.png"));
mesh.getMaterial().setTexture(2,Context.driver->
getTexture("tileset.png"));
mesh.getMaterial().setTexture(3,Context.driver->
getTexture("tileset.png"));
mesh.setDirty();
Context.driver->drawMeshBuffer(&mesh);