amidofu wrote:
> Hi,
> 
> I currently wrote code to use OSG on android, right now I basically just try 
> to do something similar but simpler to the osgAndroidExampleES1. Right now I 
> can show the blue screen, but no geometry is rendered ( I use OpenGLES1.x).  
> My root node does have children (I print out the number of children) but it's 
> still just blue screen there.  I use android sdk 2.2 run on android 2.2 moto 
> phone.
> 
> Does any one have idea for what cause this?
> 
> BTW, does osgAndroidExampleES1 show any model? I just got blue screen and 3 
> buttons.
> 
> Thank you!
> 
> Cheers,
> James


OK I know why there is only the blue screen. I need to specify the DrawArray 
type to draw triangles.

so just add
osg::ref_ptr<osg::Geometry> geometry=new osg::Geometry;
geometry->setVertexArray(vertices);
osg::ref_ptr<osg::DrawArray> array=new 
osg::DrawArray<GL_TRIANGLES,0,number_of_vertices>;
geometry->addPrimitiveSet(array);

Thanks

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47406#47406





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to