pfColortable help needed

New Message Reply Date view Thread view Subject view Author view

Carlo L. Tiana (carlo++at++vision.arc.nasa.gov)
Thu, 29 Jun 1995 21:15:03 -0700


I am a little stuck (again) on how to make appropriate use of pfColortable.
I have created a simple database using MultiGen, which consists of just 9
cubes, in a 3 by 3 grid. Each cube is of a different unique primary color
(full red, full green, full blue, cyan, magenta, etc.).

I have minimally hacked main.c of perfly following Example #2 in the
pfColortable man page, as follows:
- Just before the application main loop, I call my routine 'SetupLUT()'
- in that routine, I do the following:
        pfEnable(PFEN_COLORTABLE);
        ctab = (pfColortable *)pfNewCtab(ctabsize, pfGetSharedArena());
        (then a bunch of calls to pfCtabColor for all indices of the table)
        pfApplyCtab(ctab);
        pfOverride(PFSTATE_COLORTABLE | PFSTATE_ENCOLORTABLE, PF_ON);

What appears to me to be happening is that all the pretty colors :-) of
my colored cubes map to index 0 of the color table, so that it does not
actually matter what I set any other index to (or for that matter how long
my colormap is - ie the value of ctabsize above).

Where am I going wrong? I would really appreciate some help, since I have
been beating my head against the wall for a while, and I can't find any
hints in the docs.

Thanks very much!
Carlo.


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:51:37 PDT

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