Hi All,
I’ve loaded a texture in the following way:
ByteBuffer bb = ByteBuffer.wrap(bs);
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT,1);
int[] ids = new int[1];
gl.glGenTextures(1,ids,0);
int id = ids[0];
gl.glBindTexture(GL.GL_TEXTURE_2D,id);
gl.glTexImage2D(
GL.GL_TEXTURE_2D,0,4,w,h,0,GL.GL_RGBA,GL.GL_UNSIGNED_BYTE,bb);
gl.glTexParameterf(
GL.GL_TEXTURE_2D,GL.GL_TEXTURE_WRAP_S,GL.GL_REPEAT);
gl.glTexParameterf(
GL.GL_TEXTURE_2D,GL.GL_TEXTURE_WRAP_T,GL.GL_REPEAT);
gl.glTexParameterf(
GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MAG_FILTER,GL.GL_LINEAR);
gl.glTexParameterf(
GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MIN_FILTER,GL.GL_LINEAR);
gl.glTexEnvf(
GL.GL_TEXTURE_ENV,GL.GL_TEXTURE_ENV_MODE,GL.GL_MODULATE);
This works fine on a GF 6800, but I have problems on a X600. The texture displays correctly, but rendering is extremely slow - around 5fps for just a few textures. Does anyone know if there’s something I’m missing?
Thanks,
Chris