Bug in mesh buffer for 2 t coords

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Bug in mesh buffer for 2 t coords

Post by REDDemon »

Image[/list]

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);
the standard mesh buffer with S3dvertex work correctly. the texture loaded correctly
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I tried to reproduce this problem and added a test case for this. Seems to work correctly, though, as the mesh renders correctly. Did I do something wrong? Code is here:
http://irrlicht.svn.sourceforge.net/vie ... threv=3498
Post Reply