Summary: | NPOT textures don't work | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | paolofuse <paolo> |
Component: | macosx | Assignee: | Sven Gothel <sgothel> |
Status: | VERIFIED INVALID | ||
Severity: | major | CC: | gouessej |
Priority: | --- | ||
Version: | 2.3.2 | ||
Hardware: | All | ||
OS: | macosx | ||
Type: | DEFECT | SCM Refs: | |
Workaround: | --- | ||
Attachments: |
test image
NPOT screenshot POT screenshot gluegen test results |
Description
paolofuse
2015-09-15 10:12:22 CEST
no problem here on GNU/Linux w/ 'modern GPU/GL'. Also note that most of our test textures have NPOT dimensions. You have to query whether your GL context supports NPOT, see: https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GLContext.html#isNPOTTextureAvailable%28%29 I query my GL with isNPOTTextureAvailable() and it returns TRUE. And still my NPOT textures are not display. I attach 2 screenshot, with NPOT and POT texture, made with https://github.com/sgothel/jogl-demos/blob/master/src/demos/texture/TestTexture.java Created attachment 735 [details]
NPOT screenshot
Created attachment 736 [details]
POT screenshot
Please can you run all tests and post the logs? I wonder whether there is a problem with your driver. Sorry for late replay. I post all jogl and gluegen test results. I run the tests on other machine (my old Mac was busy), where the problem with NPOT textures still remains. This is my new configuration: Mac Book Pro Video Card AMD Radeon R9 M370X OSX 10.10.5 Java Version 1.8.0.60 JOGL version 27/03/2015 Created attachment 752 [details]
gluegen test results
All gluegen test results.
Well I've tried on others Mac with another video cards. On GeForce video card and on Iris Pro the NPOT texture is displayed well. So I think the problem is with ATI video cards, because both of my video cards are ATI: AMD Radeon HD 6490M AMD Radeon R9 M370X Is this a bug? Is it possible to fix it? I'm also unable to play movie with GLMediaPlayer and FFMPEG, because the method TextureFrame.getTexture() gives me a not displayable NPOT texture. Thanks. More information: loading my NPOT texture with TextureIO.newTexture I get GL_TEXTURE_RECTANGLE as texture's target. And this is coherent with the docs: "Further more, GL_ARB_texture_rectangle (RECT) will be attempted on OSX w/ ATI drivers" But the texture is not display well, there's a colored rectangle instead. I figured out the problem. My texture has a GL_TEXTURE_RECTANGLE target and the range of texture coordinates corresponding to the entire texture image is [0.0, width] x [0.0, height], on the contrary the range of texture coordinates for GL_TEXTURE_2D is [0.0, 1.0] x [0.0, 1.0]. The bug is on texture.getImageTexCoords(). It gives [h: 0.0 - 1.0, v: 0.0 - 1.0] also with GL_TEXTURE_RECTANGLE, for this the texture is not displayed correctly. If you update tex coords by manually calling for example setMustFlipVertically() the returned coords are correct. (In reply to paolofuse from comment #10) > I figured out the problem. > My texture has a GL_TEXTURE_RECTANGLE target and the range of texture > coordinates corresponding to the entire texture image is [0.0, width] x > [0.0, height], on the contrary the range of texture coordinates for > GL_TEXTURE_2D is [0.0, 1.0] x [0.0, 1.0]. > > The bug is on texture.getImageTexCoords(). It gives [h: 0.0 - 1.0, v: 0.0 - > 1.0] also with GL_TEXTURE_RECTANGLE, for this the texture is not displayed > correctly. > > If you update tex coords by manually calling for example > setMustFlipVertically() the returned coords are correct. Thank you, confirmed and created Bug 1241 for this issue! |