From: Mr. Rajesh R (rajeshr++at++cair.res.in)
Date: 01/18/2004 21:15:51
Dear All,
I wanted to attach a tree billboard in my application. So I added the
following code for creating and placing the billboard. I found that
billboard is not visible in the application.Any suggestions please .
application.
/* Important part of the code */
if ((root = pfdLoadFile(argv[1])) == NULL)
{
pfExit();
exit(-1);
}
/* Attaching a coordinate system to the scene */
DCSNode = pfNewDCS();
pfAddChild(DCSNode,root);
/* Adding the Billboard to the scene */
geode = pfNewGeode();
gset = pfNewGSet(arena);
pfSetVec3(pos, 15.0, 15.0, 15.0);
/* MakeABill Function Copied from the example billboard.c */
billboard = MakeABill(pos,gset,PF_Y);
pfAddChild(billboard,root);
I also created the texture object and appended the following code in
MakeABill.
texture = pfNewTex(arena);
strcpy(texture_filename,"tree.rgb");
pfGStateMode(gst,PFSTATE_ENLIGHTING,PF_OFF);
pfLoadTexFile(texture,texture_filename);
pfGStateAttr(gst,PFSTATE_TEXTURE,texture);
pfGStateMode(gst,PFSTATE_ENTEXTURE,PF_ON);
Please tell me where I am going wrong.
With regards
Rajesh.R
VR Lab,IRIS,c/o CAIR
Bangalore -1
Phone 2256473,2262126(Ext-260)
This archive was generated by hypermail 2b29 : Sun Jan 18 2004 - 21:24:41 PST