colors problem

New Message Reply Date view Thread view Subject view Author view

Yann Andenmatten (andenmat++at++imtsg11.epfl.ch)
Tue, 10 Dec 1996 13:47:02 +0100


Hello,

I've a problem (certainly easy) that I cannot solve.

I work on a perfly-based application. I've different textured objects
in a scene, and I want to add an axis system with one color by axis.
I can see the colors only if I turn the lighting off.

Does it exist a parameter so that my lines (witch should be green, blue
and red) doesn't appear in white ? (it doesn't seem to be a highlighting
problem)

Thanks for help

                Yann Andenmatten

PS : here's my code :

    // coordinate system
    axisX = new pfGeoSet();
    axisY = new pfGeoSet();
    axisZ = new pfGeoSet();

    /* Define the type of pfGeoSet */
    axisX->setPrimType(PFGS_LINES);
    axisY->setPrimType(PFGS_LINES);
    axisZ->setPrimType(PFGS_LINES);

    /* Set the coord of the lines */
    axisX->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, axisXcoord, NULL);
    axisY->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, axisYcoord, NULL);
    axisZ->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, axisZcoord, NULL);

    /* Set the color of the lines */
    axisX->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, axisXColor, NULL);
    axisY->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, axisYColor, NULL);
    axisZ->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, axisZColor, NULL);

    /* Set the number of lines in the pfGeoSet */
    axisX->setNumPrims(1);
    axisY->setNumPrims(1);
    axisZ->setNumPrims(1);

    char buf1[16];
    sprintf(buf1, "coordSysObject\0");
    coordSys = new pfGeode;
    coordSys->addGSet(axisX);
    coordSys->addGSet(axisY);
    coordSys->addGSet(axisZ);
    coordSys->setName (buf1);

    char buf2[15];
    sprintf(buf2, "coordSysCoord\0");
    coordSysDCS = new pfDCS;
    coordSysDCS->addChild (coordSys);
    coordSysDCS->setName(buf2);

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   [][][]  [][]    [][][]  []     >  Ecole Polytechnique Federale de Lausanne
  []      []   [] []      []      >  Swiss Federal Institute of Technology
 [][]    [][][]  [][]    []       > 
[]      []      []      []        >  Yann Andenmatten, +41.22 693.58.50
[][][]  []      []      [][][]    >  yandenmat++at++di.epfl.ch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

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:54:07 PDT

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