[info-performer] how to do texture mapping on Scene graph

New Message Reply Date view Thread view Subject view Author view

From: Kejian (kjin++at++ucla.edu)
Date: 08/21/2002 18:36:11


Hi, performer,
      I have problems in mapping a texture on the surface of an object.
I am doing the following, but it does not work.
     
      For example, I have a node named cup
Step1: pfNode* node = somedcs->find("cup", pfNode::getClassType());
Step2: then, I create geode node with all the texture and geoset.
geostate
    some thing like that, gstate is the texture state, i have set it
according to texture.C in example.
    gset->setGState(gstate);
    pfGeode *geode1 = new pfGeode;
    geode1->addGSet(gset);
 
step3.
       I add geode1 as a child of the "cup" node
       node->addChild(geode1)
I don't know why the texture is not mapped on the surface of that cup.

Could anyone help? Thank you very much in advance.

ken


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 21 2002 - 18:36:25 PDT

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