Re: Using float values for textures

Posted by Scyla on
URL: https://forum.jogamp.org/Using-float-values-for-textures-tp4025119p4025768.html

Hi there.

Lately I had some time to revisit the problem and after al little bit of fiddling I found a solution. So for everyone who is interested...

1. I forget the
pixelBuffer.flip()
 method call in the
getImageTile
 method (so no more allocation errors)

2. The correct call of the
glTexImage2D
 method is
gl.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA32F, textureHDR.getWidth(), textureHDR.getHeight(), 0, GL2.GL_RGBA, GL2.GL_FLOAT, textureHDR.getPixels());

Now everything ist working properly and I'm one happy programmer

Thanks to everyone who tried to help.

Greetings