Re: Adding a texture to a cube made of triangles
Posted by
elect on
Mar 21, 2017; 8:19am
URL: https://forum.jogamp.org/Adding-a-texture-to-a-cube-made-of-triangles-tp4037804p4037809.html
John wrote
Thanks I'll look into that. So my code displays a black screen because it's deprecated?
No, but it's no worth to look into that, because you can't really transfer the knowledge when you will learn current OpenGL.
You should put your vertices and texture coordinates into a buffer, transfer it on the gpu.
Express transformations through matrices and put them into buffer or uniform variable.
And then tell OpenGL how to fetch the data from the buffer and use the matrices to multiply your vertices in the shaders.