I would like to declare a pbuffer that is not of size 2^n by 2^n on a Radeon 9700. On nvidia hardware i would use the TEXTURE_RECTANGLE_NV extension, but i can’t fins an equivalent one for ATI. Does anyone have any pointers as to the extension to use, or anything else that can help me.
Your link shows
TEXTURE_RECTANGLE_EXT 0x84F5
TEXTURE_BINDING_RECTANGLE_EXT 0x84F6
PROXY_TEXTURE_RECTANGLE_EXT 0x84F7
MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8
which is the same as in the NV extension. I haven’t used any of them so I don’t know, but I found this out when I saw the EXT version in the extension string of my 8500, and I though that the EXT was a new one which maybe relaxed some of the restrictions of the NV version. Looking at that apple page though it seams that the spec looks very legit and isn’t just a cut’n’paste from the NV spec, so I guess it’s just a error in the wglATi.h.
Strange. You’re right, they don’t match ( the NV and EXT versions should be equivalent according to the apple spec ). There’s a version of the spec on ATIs site here, http://www.ati.com/developer/proginfo.html
The pdf a bit down the page: “ATI OpenGL Supported Extension List”.
So, it seems they are not entirely identicle !? Well, the EXT constants work at least .
Note, I tried the EXT version some time ago ( before it was in the extension string ), so it might have changed since then ( looks like it )… I’ll have to try it out again.
Ok, the NV constants are the ones that are valid now. It works as expected on the 8500 but it messes up my font ( I’ll have to checl if this is my bug ).
Edit:
Looks like there’s a bug in glCopyTexSubImage2D with texture_rectangle on 8500. The copy is fine but it apparently writes into other textures memory.
[This message has been edited by PH (edited 10-13-2002).]
How would i go about using it for the declaration of the pbuffer though?
Currently i choose the attributes as follows:
// set some pbuffer attributes so that we can use this pbuffer as a
// 2D RGBA texture target
int pAttrib[] =
{
WGL_TEXTURE_FORMAT_ARB,
WGL_TEXTURE_RGBA_ARB,
WGL_TEXTURE_TARGET_ARB,
WGL_TEXTURE_2D_ARB,
0
};
I was recently looking for a solution for this. The solution I came up with was to simply make my pbuffer the next power of 2 greater than what I needed and use glViewport() to render only small region of the pbuffer.
Anyways, works like a charm. I suspect the various RECTANGLE extensions basically do the same thing under the hood. Anyways, I found really no good solution online so I thought I would share mine.
In ATI Catalyst 4.12 beta there is an extension called WGL_ATI_render_texture_rectangle. But there is no documentation about it. I’m sure it’s just a constant, like WGL_TEXTURE_RECTANGLE_NV. I havn’t tried it though…