Dear OpenSG Users,
First of all, I appreciate always for your great answers. I have two
questions related to texture-mapped polygons:
Q1. What is the maximum number of texture references in OpenSG? I am
trying to load more than 100 images and map those texture onto simple
plane polygons(made by makePlane()). Do you think that is possible?
if not, is there any way to show 100 images at one single scene?
Q2. When I make a simple texture mapped plane polygon, I can use the
following code to construct a texture mapped plane. Then, should I
repeat this same code with different pointer names in one hudred
times? My code is going to be over several thousand lines. I feel
there is another way. at least I would like to use "for" loops to
construct each textured plane.
Child_1_Main= Node::create();
GeometryPtr Child_1_Geo = makePlaneGeo(4,3,1,1);
ImagePtr image1 = Image::create();
image1->read("data/001.jpg");
SimpleTexturedMaterialPtr tex1 = SimpleTexturedMaterial::create();
beginEditCP(tex1);
tex1->setImage(image1);
endEditCP(tex1);
beginEditCP(Child_1_Geo, Geometry::MaterialFieldMask);
Child_1_Geo->setMaterial(tex1);
endEditCP(Child_1_Geo, Geometry::MaterialFieldMask);
beginEditCP(Child_1_Main, Node::CoreFieldMask);
Child_1_Main->setCore(Child_1_Geo);
endEditCP(Child_1_Main, Node::CoreFieldMask);
//-
Child_1_Trans = Transform::create();
beginEditCP(Child_1_Trans, Transform::MatrixFieldMask);
m.setIdentity();
Child_1_Trans->setMatrix(m);
endEditCP(Child_1_Trans, Transform::MatrixFieldMask);
//-
Child_1_TransMain = Node::create();
beginEditCP(Child_1_TransMain, Node::CoreFieldMask |
Node::ChildrenFieldMask);
Child_1_TransMain->setCore(Child_1_Trans);
Child_1_TransMain->addChild(Child_1_Main);
endEditCP(Child_1_TransMain, Node::CoreFieldMask |
Node::ChildrenFieldMask);
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users