I'm trying to put texture on the quads of a quadbatch, but setting the TextureState to the QuadBatch doesnt work, or just partially. The color of the Quads are of one color and doesnt show the texture correctly. What should I do?
QuadBatch qbStrips = new QuadBatch[10*10];
Texture qtexture = TextureManager.loadTexture("./data/textures/low/"+"grass21.jpg",Texture.MM_LINEAR,
Thanks for giving attention to it. It would be very nice to have a working example, to see, if my code is wrong, or is it really some kind of bug or an unimplemented feature?
Than let me ask a question if I can workaround the whole thing. So the thing is, I want batched (not dynamic, but static, unmoving in the first round) Grass in my JME project. I've found that QuadBatches are very fast rendered in big quantity too, so I tried to texturize it with my texture (maybe later I want to use transparent textured bigger quads, not thin grass like quads) but that didnt work. So what do you advice, how to create grass in a JME app without great performance loss? (I've tried with blender plane meshes with transparent texture, but it was very slow in big quantity.)
FYI: MrCoder just informed me that he was able to get texturing to work on all mesh batch types in the mentioned Test by simply assigning proper tex coords and a texture. I'll let him describe any steps or update the test though.
Updated the test(TestBatchMesh) and added texturing, so have a look at that. Nothing special, cause every batch type is textured exactly the same way, so there's nothing special with QuadBatches(only the indexing is different).