PDA

View Full Version : glRasterPos, glBitmap, and GL_IBM_rasterpos_clip



Hampel
02-02-2004, 06:08 AM
I use glRasterPos*() and glBitmap() for rendering some characters into the 3D scene.

If the position specified by glRasterPos*() is outside the visible canvas by 1 pixel the whole bitmap/character is not displayed. According to the OpenGL specification this is the correct behavior.

I think the extension GL_IBM_rasterpos_clip has been specified to overcome this limition/problem. But switching it on (glEnable(GL_RASTER_POSITION_UNCLIPPED_IBM) http://www.opengl.org/discussion_boards/ubb/wink.gif does not change anything... :-(

Any suggestions?

BTW, the extension is supported on a GeForce4 (53.0x), I have checked the extension string for it, I have checked the gl-error-code after the glEnable() call, and I use the value 103010 for GL_RASTER_POSITION_UNCLIPPED_IBM.

Relic
02-02-2004, 07:12 AM
It's working on xy-positions only.
Make sure you're not clipped in z.

Hampel
02-02-2004, 11:25 AM
No, it's not clipped by the z-value. (already double-checked)

dorbie
02-03-2004, 12:43 PM
Is the extension supported?

Just because the token is there doesn't mean you have the extension.

You could try using a textured quad & subloading the image to texture memory.

Hampel
02-04-2004, 07:00 AM
@dorbie: I do the following:

if(glGetError() != GL_NO_ERROR) {
...;
}
if("GL_IBM_rasterpos_clip" is contained in ext-string) {
glEnable(GL_RASTER_POSITION_UNCLIPPED_IBM);
if(glGetError() != GL_NO_ERROR) {
...;
}
}

"error" is in both cases GL_NO_ERROR. So I guess the extension should be supported!?!

dorbie
02-04-2004, 02:05 PM
As long as the strstr finds the string in the extensions list then it should work, if it doesn't you have found a bug.

I see on delphi3D that support for that extension on NVIDIA hardware is very patchy, with GF4 MX support and no GF4 Ti support.

I'd go with the subload to texture and drawing a quad if I had to rely on this feature.

FWIW I always thought the rasterpos clipping built into OpenGL was bloody silly to the point of making drawpixels utterly useless for a lot of stuff that it *should* be ideally suited for.

[This message has been edited by dorbie (edited 02-04-2004).]