I would like display more than one texture in screen. I’m working on OpenGl JAVA. Code Example:
gl.glEnable(GL2.GL_TEXTURE_2D); //carga texturas:
try {
File in = new File("mariosprite1.png");
InputStream stream = getClass().getResourceAsStream("mariosprite1.png");
TextureData data = TextureIO.newTextureData(gl.getGLProfile(),in, GL2.GL_RGBA16, GL2.GL_RGBA, false, "png");
t = TextureIO.newTexture(data);
}catch(IOException e) {
e.printStackTrace();
System.exit(1);
}
try {
File in3 = new File("goomba.png");
InputStream stream3 = getClass().getResourceAsStream("goomba.png");
TextureData data3 = TextureIO.newTextureData(gl.getGLProfile(),in3, GL2.GL_RGBA16, GL2.GL_RGBA, false, "png");*/
t3 = TextureIO.newTexture(data3);
}catch(IOException e) {
e.printStackTrace();
System.exit(2);
}
The second texture isn’t being displayed, why?