Login  Register

Re: Loading texture error

Posted by Michael Bien on Jul 04, 2010; 6:29pm
URL: https://forum.jogamp.org/Loading-texture-error-tp942252p942737.html

sorry but we don't maintain a JOGL 1.x branch.

If the bug still applies to JOGL 2 we will need more information or even better: a self contained testcase.

bugzilla is here:
http://jogamp.org/bugzilla/

thanks,
michael

On 07/04/2010 03:55 PM, GuilhermeAmorim [via jogamp] wrote:
I need some help here
I trying to load a texture to draw in the screen but I can only get a exception:

java.lang.IndexOutOfBoundsException: Required 196608 remaining bytes in buffer, only had 0
        at com.sun.gluegen.runtime.BufferFactory.rangeCheckBytes(BufferFactory.java:274)
        at com.sun.opengl.impl.GLImpl.glTexImage2D(GLImpl.java:21146)

in this line:

gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGB, textureImage.getWidth(), textureImage.getHeight(), 0, gl.GL_RGB, gl.GL_UNSIGNED_BYTE, buffer);


I tried to make the buffer have twice the size and the exception is gone, but the texture too, remais only the cube in black.

This is the 1.1.1a version

Thanks for reading


View message @ http://jogamp.762907.n3.nabble.com/Loading-texture-error-tp942252p942252.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.


-- 
http://michael-bien.com/