Re: Texture lookup tables and Performer

New Message Reply Date view Thread view Subject view Author view

Chris Tanner (cct++at++faith)
Mon, 24 Oct 1994 11:05:32 -0700


On Oct 24, 9:18am, Ken Sakai wrote:
> Subject: Texture lookup tables and Performer
>
> I would like to utilize 1-component textures and texture look-up tables
> in order to get pseudo-24 bit textures utilizing only 8 bits per pixel
> (and GL tlutdef() and tlutbind()). Does anyone know whether this be done
within
> a Performer application? If so, how does one get a handle upon the index
> of the texure function to be bound in tlutbind(long target,long index)?
> The pfTexture man pages don't indicate how one can get this index from
> a pfTexture.
> Thanks,
> Kenneth N. Sakai Email: sakai++at++lmsc.lockheed.com
> Research Specialist/Computer Graphics Phone: (408) 756-0682
> Lockheed Missiles and Space Co.
> Sunnyvale, CA 94088-3504
>
>
>
>-- End of excerpt from Ken Sakai

This is a GL man page BUG!!!
tlutdef/bind works like texdef/bind, but tables do not get bound to individual
textures.
Rather tlutbind(0,id) cause the gfx hardware to use the TLUT TABLE named id as
defined by
tlutdef. Thus you can only turn on/off texture lookup tables and control the
current lookup table being used...

But just so you know, to get the GL handle for a texture,etc use
pfGetGLHandle(pfObject *obj).

To turn on a specific tlut table for a set of geometry, define all your tables
up front and
then put a DRAW callback on a node encompassing all of geometry that you want
to use a particular tlut table:

pfNodeTravFuncs(Node, PFTRAV_DRAW, preDrawTLut, postDrawTLut);

where preDrawTLut does a tlutbind to the appropriate table:

tlutbind(0,tlutID)

where postDrawTLut does a tlutbind to id 0 to turn off texture lookups
altogether

tlutbind(0,0);

Remember that if you are using a Performer MP process model(seperate processes
for application, culling, drawing -- APP_CULL_DRAW, APPCULL_DRAW, etc) which is
the default on machines with multiple CPUs, your callbacks will happen in the
draw process and not be able to share static data with the application...

That should do it...

On a side note, do customers think it useful to have state callbacks as well as
node callbacks -
if so maybe this will make into a future release...

Later,
Chris Tanner
IRIS Performer

-- 

_____________________________________________________________ Chris Tanner (cct++at++faith.asd.sgi.com) Silicon Graphics - Advanced Graphics Division _____________________________________________________________


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:36 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.