Hi Robert,

Robert Osfield schrieb:
Hi Peter,

I'm currently reviewing your submissions, most changes look
appropriate but item 2, is something that needs further discussion:

On Thu, Jun 25, 2009 at 3:07 PM, Peter
Hrenka<[email protected]> wrote:
2. Do not call ElementBufferObject::releaseGLObjects() from DrawElements.
This causes crashes when ElementBufferObjects
are shared. The gl-objects are already properly cleared in the
ElementBufferObject-destructor.


Making releaseGLObjects() and non op is not appropriate, the intention
of this method is to release GL objects, if it doesn't do this then
objects that should be release won't be when the user ask them to be
released.

The point is that the DrawElementsObject does not "own"
the GL-Object, it is owned by the BufferObject.
Deleting/removing one single (out of possibly many) DrawElements
should not trash the shared GL-Object.

I think would be appropriate either to have
DrawElements::releaseGLObjects set the local
ref_ptr<ElementBufferObject> to 0,  or to make sure that the EBO
releaseGLObjects() doesn't cause the crash.

Removing the crash is certainly something which should
be further investigated. I will look into that.

Setting the ref_ptr<ElementBufferObject> to 0 might
lead to a crash later down the road. I'll look into that, too.

5. Provide osgdrawelementsupdate example for verfication

Are you putting this example forward as inclusion as an example?  Or
just for my own testing purposes?

I do not find the example overly instructive, so I leave the decision up to you.

Robert.

Cheers,

Peter
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196

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

Reply via email to