Only Rectangle_Ext w/ LWJGL ?

Started by broumbroum, December 19, 2008, 01:46:35

Previous topic - Next topic

broumbroum

Hi !
I've been porting my renderer from JOGL to LWJGL and everything worked fine but the texture rendering did change so that I had to switch on Rectangle_texture : see the resulting screen with POT textures and Rectangle_EXT disabled (attached as jxa-lwjgl-noextRect.jpg).
When enabling Rectangle_EXT to substitute GL_TEXTURE_2D every works fine, for my card is an ATI Radeon, but with a Core Duo and NVidia integrated this doesn't work, I get the blank quads.
Is there any issues at LWJGL about that ?

Matzon

It doesn't make sense that it should be an lwjgl issue. This should be a driver issue and therefore visible regardless if you use lwjgl or jogl.

broumbroum

Well is there any tutorials about loading textures from std image files ? I saw some time ago something about DevIL but it ain't no more supported on LWJGL 2.0.1. What about loading texture with ImageIO ?
I use (BufferedImage).getRaster().getData() after having converted the BufferedImage to a POT Dimension which should enable no-rect_EXT support...

broumbroum

Hi !
I've jsut found the bug in my code : I wasn't able to display GL_TEXTURE2D because the wrapping of s,t coords was not correctly initialized. Each new texture must be set up with the glTexParam... .
GL11.glTexParameteri(Sf3Texture._EXTtex, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE);

        GL11.glTexParameteri(Sf3Texture._EXTtex, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE);

        GL11.glTexParameteri(Sf3Texture._EXTtex, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);

        GL11.glTexParameteri(Sf3Texture._EXTtex, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);

Sf3Texture._EXTtex is equal to GL11.GL_TEXTURE2D when no rect extension is found.
:)