Re: Texture Problem (probably gl.glTexImage2D)
Posted by
PedDavid on
Jun 02, 2015; 10:21am
URL: https://forum.jogamp.org/Texture-Problem-probably-gl-glTexImage2D-tp4034564p4034570.html
This isn't a project and I'm trying to learn so reinventing the wheel could be good (if done right, currently is getting frustrating)
I've seen a lot of examples, but a lot of them use buffereddata for the image (what I tought was more "primitive"). When you say jogl-demos you're talking about this for example right?
https://github.com/sgothel/jogl-demos/blob/master/src/demos/texture/TestTexture.javaAnd when you say my texture already has an ID you're refering to the texture object right? I was thinking in using int to ID each texture so I don't have to "move the textures around" but having the texture as a field and just passing it as parameter would probably be easier.
I've read some documentation but for a beginner is pretty overwhelming...
Edit:
So, if I use the glGenTextures anyway (to give a int ID to the texture) but only create the texture after (don't know how to be fair) I wouldn't be giving it 2 ID's like I am now right?