GL_RGBA , GL_TEXTURE_RECTANGLE_EXT and ATI Mac

Is there any limitations on ATI Radeon boards (on MacOS only) when using GL_RGBA texture with GL_TEXTURE_RECTANGLE_EXT ? Minimum size of aspect ratio ?

I found some weird problems on a GPL game I’ve just ported on MacOSX.

There is screenshot
of the problem here (see the ‘white squares’). Apparently the texture failed to load on thoses boards.

It works on every boards on PC (ATI Radeon 9800, nVidia) and (at least) on all nVidia graphics on MacOSX ?

I cannot reproduce the bug on my Mac, because I have an nVidia chipset.

The Source code page is here (especially the gl_gx.cpp file).

If some has any ideas ?

are you checking things like the max texture size, setting things like the pixel alignment and texture min filter, &c?

Yes, texture max size is checked, but it shouldn’t be a problem. The ‘largest’ is 640x480.

Now for the texture alignement / pixel unpacking. I don’t use thoses values (uses the default values).

If I’m using a npot texture like 15x23 for example, I’m sending a 15x23x4 bytes textures so where the problem ?

Also I don’t think it’s an ‘hardware’ limitation because the same code running on Windows on the same video card works ?

(here the CVS page link , in particular, the GL_DownloadSprite function, filtering are set correctly).

There is a fallback is the NPOT extension is not there, the sprites are streched to the nearest power of two size. But it look quite degraded.

I can try to disable the NPOT when running on ATI / Mac (ATI / PC and Linux works), but I would like to understand the problem first.

Well, I know of no problems with rectangular textures on ATI, so it seems likely that it is somehow your bug, perhaps a condition that the other renderers don’t enforce. It’s just a bit hard to try to guess what that is.

I presume you’re checking GL errors and coming up clean? Tried using CLAMP_TO_EDGE rather than CLAMP as the S and T wrap modes? (should be better anyway)

CLAMP_TO_EDGE requires an extension, Anyway it doesn’t change anything here (not in that particular case), GL_CLAMP is fine.

I’ve done a pass with GLIntercept, there was indeed a GL_ERROR in the Mag Filtering (used for texture of 3D objects, but 3D objects texturing was fine, the bug affected only the 2D ui thing, and there were not GL_ERROR there.)

Anyway, I have added an option to disable the NPOT usage in the game menu. I think the two options should fix the problem.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.