When I use the Texture matrix to scale texture coordinates i get very pixelated textures on the device, but when the same code runs in the emulator it shows up at the expected resolution.
Here is the code i am using;
glActiveTexture(GL_TEXTURE1);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(detailscale, detailscale, detailscale);
glBindTexture(GL_TEXTURE_2D, detail);
glMatrixMode(GL_MODELVIEW);
Is there a limitation with the MBX lite chip for this or would this be a memory ot mipmap issue?
Any help would be appreciated.
You might run into problems if your texture coordinates or your scale factor are too large. MBX texture coordinate range is a bit more limited than that of the latest PC GPUs.
I suppose you have a small detail texture and want to repeat it many times over a surface. How large do your texture coordinates get? Can you modify them to “restart” at some edges in your mesh? Centering your coordinate range on 0 instead of using only positive values should also help.
Thank-you, I will try those suggestions.
Another note is that when I manually set the texture scale in the uv coordinates to the same as that when using the glScalef everything looks like it should on the device. it is only when using the Texture Matrix stack that I get the issue.
That is odd. Which device is it you’re targeting?