Original Post
So in Java OpenGL I've noticed there are two ways to have/use a texture. I was wondering what or if there are any differences between the two? Don't worry about the actual semantics of the code just the method 1.
Texture myTex = new Texture();
myTex = TextureIO.TextureIO.newTexture(new File(fileName), false);
//then to use
myTex.bind();
//Draw object routine
Versus 2.
int[] textureId = new int[nbTexture];
gl.glGenTextures( nbTexture, textureId, 0 );
gl.glBindTexture( GL.GL_TEXTURE_2D, textureId[4] );
Currently I am experiancing some problems using the first method, when it comes to replacing a texture(very strange errors). Which makes me wonder if the first method is meant to be dynamic or not? Anyone with any articles, or knowledge would be greatly appreciated, because this is holding me back from doing a lot of things.