Hi, > Hi, > > >>>Sven Widderich schrieb: >>> >>> >>>>This is the first time I'm using this mailing list, so I hope this is the >>>>right way to ask. >>>> >>> >>>Welcome.on board... > > > Thank you ;) > > >>>>I've read the tutorials quiet often but I don't get the point with OpenSG >>>>rendering. >>>> >>>>My Questions: >>>>How can I tell OpenSG to render a Node or a Geometry as VBO? >>>> Is this done by just turning off "display lists"? >>>> >>> >>> >>>As far as I know, OpenSG uses VBOs by default for some time now. To be >>>sure, you can call >>> >>>geo->setDlistCache(false); >>>geo->setVbo(true); >>> >>>on your Geometry (surrounded by the oblig. begin/endEditCP of course...). >> >>calling geo->setVbo(true); is enough this overwrites DlistCache state. > > > // I guess this is want you meant > beginEditCP( geo, Geometry::VboFieldMask ); > geo->setVbo(true); > endEditCP( geo, Geometry::VboFieldMask );
yes. > >>>>How can I verify OpenSG is using VBO's? >>>> >>>>How do I get the VBO Identifier (that is returned by glGenBuffers)? >>>> I need this to register the VBO to Nvidia CUDA. >>>> >>> >>> >>>No clue and / or no time to have a look - sorry. >> >>right now that's not possible but I could add an public method. But >>there is no single VBO Identifier there is one for each geometry >>property (positions, normals, indices, ...) >> > > > I found with geo->getVbo() you are able to get want you've > set with geo->setVbo()... but not more? > It's not saying OpenSG is actually using VBO rendering... > I suppose so due to geo->getVbo() returns true even with no support for > VBO-extension. yes. > (btw: setVbo() is declared in GeometryBase Header but not defined in > GeometryBase.cpp) that's defined in OSGGeometryBase.inl > A workaround solution for my problem would be: > 1.) Traverse the graph > Found geometry core > Add vertex positions to my own array > > 2.) Register VBO to CUDA > 3.) Render using OpenGL directly (Is this a problem? What's to consider?) I added a new method getVboObject() to the Geometry class. #include <OpenSG/OSGGeometry.h> #include <OpenSG/OSGGeoPumpFactory.h> GeoVBO *vbo = geo->getVboObject(win); GLuint positions_id = vbo->getPositions(); getVboObject() returns a NULL pointer if vbo rendering is disabled or vbo rendering is not supported. Andreas > Regards, > Sven > > -- > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Opensg-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensg-users > -- VREC Robert-Bosch-Straße 7 D-64293 Darmstadt Tel. 06151-4921035 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
