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

New Message Reply Date view Thread view Subject view Author view

From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 08/21/2002 19:24:07


Hello Ken !

Do you see any new geometry (un-textured) on the screen ?
If you see no new geometry, then you may have a bounding box/sphere problem.
Try getting and printing the bounding sphere of your new geode.

Otherwise, you probably have some graphic state problem. You try replacing
your geode generating code with the function:

    build_box

from the sample code:

    /usr/share/Performer/src/pguide/libpf/C/deleteTBox.c

The function build_box creates a simple textured box and places it under a
geode - much like what you are trying to do. I think texture.C is too condensed
and may not be very easy to re-use.

-yair

>
> 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
>
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
>

-- 
\_________  \_____  \__    \__  \_____        
\_________  \_____   \__   \__  \_____         Yair Kurzion
       \__     \__   \____\__      \__         yair++at++sgi.com
       \__          \__  \__                  (650) 933-6502
       \__          \__   \__          
       \__          \__    \__             


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 21 2002 - 19:24:12 PDT

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