Re: TX_SELECT for Performer or OpenGL?
Angus Dorbie (dorbie++at++sgi.com)
Tue, 29 Sep 1998 10:55:00 -0700
Stephen Maher wrote:
>
> I had no responses to this in comp.sys.sgi.graphics and
> comp.graphics.api.opengl. I actually need to do this in Performer, so I
> thought I'd ask here ...
>
> > On an SGI IR in OpenGL, I need to clamp textures such that no pixels are
> drawn which fall outside the 0.0 to 1.0 texture coordinate range -
> essentially the same as what TX_SELECT did in IrisGL.
>
> Using glTexParameter, a GL_TEXTURE_WRAP value of
> GL_CLAMP_TO_BORDER_SGIS, with GL_TEXTURE_BORDER_COLOR set to x00000000
> (e.g., zero alpha) would probably do what I need, but texture borders
> aren't available on IRs.
>
> Setting the outside pixels of the texture to zero alpha would work, but
> is problematic in our case because we want to be able to do this
> dynamically (programmatically), which is fine for standard textures, but
> we also need to support clipmapped textures (where getting into the
> texture and changing the edge pixels on the fly is not practical,
> AFAIK).
>
> I've thought about stencil buffers, etc., to mask the area I *don't want
> drawn, but haven't come up with anything.
>
> Any tips?
There is no other equivalent of TX_SELECT in OpenGL.
Check out the UAV section on www.dorbie.com to
see an example of using stencil operations for this
type of function.
Cheers,Angus.
--
"Only the mediocre are always at their best." -- Jean Giraudoux
For advanced 3D graphics Performer + OpenGL based examples and tutors:
http://www.dorbie.com/
This archive was generated by hypermail 2.0b2
on Tue Sep 29 1998 - 10:55:12 PDT