By igaz
on Thu, 10/04/2012 - 22:23
Probably a model export issue here:
I created a fresh project with the newest QCAR SDK. All I changed was to view my model with the texture, instead of the teapot.
The texture is completely unaligned with the model. The model renders fine with the texture in MeshLab.
I used the popular Phyton script to convert .obj -> .h and the code works flawlessly with the banana model used as example for this script.
Could there be a general reason for the bad alignment of the texture? Otherwise I'll start posting screenshots and code. Best regards
Igaz
Model rendered with misalligned texture
Indeed, flipping the texture image upside down solves the problem;
if you don't want to flip the image, you can otherwise flip the vertical component of the texture coordinates array,
something like:
for (int i = 0; i < meshNumVertices; ++i)
{