question about joGL (glTexImage2D)

Posted by Nour on Stack Overflow See other posts from Stack Overflow or by Nour
Published on 2010-01-19T15:46:12Z Indexed on 2010/05/24 2:00 UTC
Read the original article Hit count: 503

Filed under:
|
|
|

Hi everybody

I was trying to load a texture using joGL library but it seems that something is missing when using this method glTexImage2D at :

IOStream wdis = new IOStream(fileName);
wdis.skipBytes(18);
int width = wdis.readIntW(); // dis.skipBytes(2);
int height = wdis.readIntW(); // dis.skipBytes(2);
wdis.skipBytes(28);
byte buf[] = new byte[wdis.available()];
wdis.read(buf);
wdis.close();
gl.glBindTexture(GL.GL_TEXTURE_2D, BMPtextures[index]);
gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, 3, width, height, 0, GL.GL_BGR, GL.GL_UNSIGNED_BYTE, buf);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);

as IOStream is a class that extends DataInputStream

it shows a message that glTexImage2D(int,int,int,int,int,int,int,int,byte[]) is not found at javax.media.opengl.GL

I couldn't figure the problem her because it's an open source code and it seems to work perfectly with my friends but unfortunately not with me even though we are using the same library and the same JDK version what shall I do ??

© Stack Overflow or respective owner

Related posts about java

Related posts about loading