Stephen Maher (maher++at++holodeck.gsfc.nasa.gov)
Tue, 29 Sep 1998 13:02:53 -0400 (EDT)
> 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?
Thanks,
Steve
-- stephen.maher++at++gsfc.nasa.gov (301) 286-3368 fax:(301) 286-1776 http://holodeck.gsfc.nasa.gov/vr/vr.html NASA Goddard Space Flight Center
This archive was generated by hypermail 2.0b2 on Tue Sep 29 1998 - 10:09:28 PDT