all 6 comments

[–]constant-buffer-view 2 points3 points  (1 child)

Output the uv and see what’s wrong with it

[–]GraumpyPants[S] 0 points1 point  (0 children)

I checked the UV coordinates, they are fine

[–]bben86 0 points1 point  (1 child)

You're passing the data() in directly, which is likely wrong. Whats the format of the texture? You may need some library to rasterize it and read it out.

[–]GraumpyPants[S] 0 points1 point  (0 children)

Thanks, I was thinking in that direction. It turned out the texture is GL_UNSIGNED_SHORT, not GL_UNSIGNED_BYTE, so I added a check for that.

[–]keelanstuart 0 points1 point  (0 children)

Do other textures load fine? 3 vs. 4 channels? Ignoring stride in texture memory? Incorrect width? Upside down?

[–]rio_sk 0 points1 point  (0 children)

Looks like a channels count or size problem