Sylvain Mayer (mayer++at++CAE.CA)
Wed, 07 Oct 1998 18:31:54 -0400
I want to render my scene with a pfColortable. In the draw callback of
the channel, I'm doing the following:
pfEnable(PFEN_COLORTABLE);
ctab->apply();
pfOverride(PFSTATE_COLORTABLE | PFSTATE_ENCOLORTABLE, PF_ON);
pfDraw();
pfDisable(PFEN_COLORTABLE);
pfOverride(PFSTATE_COLORTABLE | PFSTATE_ENCOLORTABLE, PF_OFF);
That worked just fine but within the traversal, I need to render some
billboards without using the pfColortable. To do this, I'm using a
pre/post draw callback to the billboard just like the following but it
does not work. I'm currently rendering the billboard with the
colortable.
static int preDraw(pfTraverser *trav, void*)
{
pfDisable(PFEN_COLORTABLE);
pfOverride(PFSTATE_COLORTABLE | PFSTATE_ENCOLORTABLE, PF_OFF);
return PFTRAV_CONT;
}
static int postDraw(pfTraverser* trav, void*)
{
pfEnable(PFEN_COLORTABLE);
pfOverride(PFSTATE_COLORTABLE | PFSTATE_ENCOLORTABLE, PF_ON);
return PFTRAV_CONT;
}
Does any of you have another way of doing what I want? I'm wondering
why its not working.
thanks, Sylvain
-- Sylvain Mayer, 3D Graphics Developer Graphics Simulation Technology Display Eng. & Special Projects CAE Electronics Ltd. (http://www.cae.ca) mailto:mayer++at++cae.ca Tel: (514) 341-6780 Ext: 3065 Fax: (514) 734-5618
This archive was generated by hypermail 2.0b2 on Wed Oct 07 1998 - 15:34:02 PDT