Login  Register

Re: Adding a texture to a cube made of triangles

Posted by gouessej on Mar 21, 2017; 8:46am
URL: https://forum.jogamp.org/Adding-a-texture-to-a-cube-made-of-triangles-tp4037804p4037810.html

Your texture coordinates were wrong. Each vertex of each triangle should have some texture coordinates. Please look at the rudimentary example in the wiki and in jogl-demos.

Have you looked at this simple example?
https://github.com/JogAmp/jogl-demos/blob/master/src/redbook/src/glredbook11/texbind.java
Julien Gouesse | Personal blog | Website