From: Paolo Farinelli (paolo++at++sgi.com)
Date: 05/30/2002 14:40:26
Hi Ken,
Cliptexture emulation will currently not work properly if you use either
texgen or a texture matrix.
There are two reasons: first, the texcoord values found on geosets are
used to precompute texcoord-bounding boxes, which are then used on each
frame to determine which cliplevel will be used for rendering each
geoset.
Secondly, the cliptexture emulation implementation itself uses texture
matrices when rendering roaming textures, and currently we don't combine
our texmatrix with user texmats on geostates.
In theory, for your specific case, both these limitations could be
worked
around: by brutally setting your own tex-coord bounds for your gsets
(gset->setTexBBox), and by adding pre and post draw callbacks to your
geostates, from which you would have to premult current gl-tex-mat with
your own gstate-texmat (which is a simple scale by 0.5)..
..Sounds like remapping your terrain geometry is a much easier and
certainly more efficient option, but let me know if you want to try the
above workarounds, and I'll try to help you out.
ciao,
Paolo
DANIEL BASS wrote:
>
> You could just apply a texture matrix that scales one of the texture
> coords by 0.5.
>
> --daniel
>
> >>> Kenneth Sewell <sewell++at++dramail.com> 05/29/02 10:18AM >>>
>
> With that solution, all of the tex coords on my terrain would
> have
> to be remapped, it was built under the assumption that the texture
> coords
> are in the range of 0.0 to 1.0 for both dimensions. If I only used
> half of the cliptexture, then the t component is only valid for half
> of
> that. If possible, I was hoping to avoid remapping the tex coords
> for all of my terrain. Also, I'm using the cliptexture under linux,
> and
> as I understand it, texgen cannot be used with software cliptexture
> emulation.
>
> Ken Sewell Defense Research Associates
> Project Engineer 3915 Germany Lane, Suite 102
> 937-431-1644 Beavercreek, Ohio 45431-1608
> sewell++at++dramail.com
-- Paolo Farinelli paolo++at++sgi.com Member of Technical Staff, OpenGL Performer 1-650-933-1808 Silicon Graphics 1600 Amphitheatre Pkwy, Mountain View, CA 94043
This archive was generated by hypermail 2b29 : Thu May 30 2002 - 14:40:35 PDT