I can use texture of size 32x32, 512x512 without any problems. If I try to display sizes 64x16, 8x4 and so one the textures get “repeated”.
The png file:
https://www.dropbox.com/s/nbizfw2fuysler4/RecTex-Original.png
The processed result:
https://www.dropbox.com/s/aj7b2zv9w0a23sd/RecTex-OpenGL.png
I just don’t know what’s going on. It seems to get repeated vertically!??
Here’s the code I use to enable and bind the texture:
gl.glColor3d(1D, 1D, 1D);
gl.glEnable(GL2.GL_TEXTURE_2D);
gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, this.minInterpolation);
gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, this.magInterpolation);
gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_CLAMP_TO_EDGE);
gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_CLAMP_TO_EDGE);
if ( this.alpha ) {
gl.glEnable(GL2.GL_BLEND);
gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);
}
gl.glBindTexture(GL2.GL_TEXTURE_2D, this.textureID);
I appreciate any tips!