Re: Texture Problem (probably gl.glTexImage2D)
Posted by
gouessej on
Jun 02, 2015; 11:14am
URL: https://forum.jogamp.org/Texture-Problem-probably-gl-glTexImage2D-tp4034564p4034573.html
You mix the low level API with some calls to high level methods and helpers. When you use TextureIO or AWTTextureIO to create a texture, it creates the identifier for you and glTexImage2D isn't necessary too. Texture.getTextureObject(GL) generates the identifier if necessary and returns it.
OpenGL isn't the kind of thing that you can learn in a few days. I advise you to look at the OpenGL red book and its examples have been ported to JOGL (in jogl-demos too).
In my humble opinion, just follow the example that you have found, call enable(), bind() and disable().