Rudy Darken (darken++at++enews.nrl.navy.mil)
Tue, 7 Jun 94 12:09:21 -0400
It would seem that this should be a common thing to want to do. Obviously,
I want the material properties of the lines to remain constant throughout
the process. I don't want them inheriting state from other geometry. In
fact, since line rendering does not benefit greatly by a lighting model,
I don't even care if they are lighted, provided other objects in my scene
still can be. I have tried all suggestions so far with the same results.
Hasn't anyone rendered lines before? How do you get line geometry to keep
its state without inheriting?
void *arena;
pfGeode *geode;
pfMaterial *material;
pfGeoState *geostate;
pfGeoSet *gset;
pfVec3 *vertices;
pfVec4 *colors;
arena = pfGetSharedArena ();
geode = pfNewGeode ();
material = pfNewMtl (arena);
pfMtlColor (material, PFMTL_AMBIENT, color[0], color[1], color[2]);
pfMtlColor (material, PFMTL_DIFFUSE, color[0], color[1], color[2]);
// What goes here?
// pfMtlColorMode ()?
// pfMtlSide ()?
geostate = pfNewGState (arena);
// Is this correct?
pfGStateAttr (geostate, PFSTATE_FRONTMTL, material);
pfGStateMode (geostate, PFSTATE_CULLFACE, PFCF_OFF);
gset = pfNewGSet (arena);
pfGSetPrimType (gset, PFGS_LINES);
pfGSetGState (gset, geostate);
// Load geometry here
pfGSetAttr (gset, PFGS_COORD3, PFGS_PER_VERTEX, vertices, NULL);
pfGSetAttr (gset, PFGS_COLOR4, PFGS_PER_VERTEX, colors, NULL);
pfAddGSet (geode, gset);
return geode;
_______________________________________________________________
Rudy Darken <202> 767-6814
darken++at++enews.nrl.navy.mil The U.S. Naval Research Laboratory
darken++at++seas.gwu.edu The George Washington University
_______________________________________________________________
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:19 PDT