You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I'm creating a 3D roguelike game where the dungeon is randomly generated. If I represent each 'tile' of the wall by a cube mesh, the rendering speed is too slow even when I use bitplane's CBatchingMesh.
So I decided to use a scaled up cube mesh for adjacent 'tiles' and the speed improved a lot. The problem is: It's texture also get scaled up and it looks ugly.
I know I can mess with the UV of the vertices, but I don't know how to set it correctly by code. I only know how to do UV mapping in modellers, however the dungeon is randomly generated .
Please help. I need specific code to show how the UV of all 8 vertices should be set up so that the texture keeps its original size when applied to the cube. Just assume that the texture's dimension is w*h .
Last edited by bull on Wed Jul 30, 2008 12:49 pm, edited 1 time in total.
Or you can probably use the texture matrix to tile the texture by scaling it down or something. I've not used the texture matrix before so check the docs for it (use the .chm in Irrlicht/docs and use the the search function it provides)