Iam deriving a class Triangle from Drawable .
class Triangle :public Drawable {
public:
// Here I provide the implementation of virtual drawImplementation
Function of the Drawable Class.
virtual void drawImplementation (State & state) const {
cout << "Came here" << endl;
glBegin(GL_TRIANGLES); // Drawing
Using Triangles
glVertex3f( 0.0f, 1.0f, 0.0f); // Top
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom
Right
glEnd();
}
};
Now I create a geode and attach this Triangle object to the geode and create
a scene graph that contains only a root and a geode containing this triangle
Drawable. But when the program is run I cant see the triangle.
Should I be doing more stuff than this ?
Amal.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/