Hehe, no ideaNow how can we re-implement the SoBRepFaceSet::renderShape with it. This is where I am a little bit lost now


Hehe, no ideaNow how can we re-implement the SoBRepFaceSet::renderShape with it. This is where I am a little bit lost now
What is great with FreeCAD is that we are learning everydayickby wrote:Hehe, no ideaNow how can we re-implement the SoBRepFaceSet::renderShape with it. This is where I am a little bit lost nowA wild guess would be that coin does make the VBO setup in the rendering code before encountering the IndexedFaceSet, when it finds the SoCoordinate3 node. So that part would need to be done in BrepFaceSet too as there we don't use coordinate nodes. But from here on you are alone, I have only ver little knoweledge about coin internals and openGL coin general. I looked at your code and did not even really understand it
I know how you feel.ickby wrote:I looked at your code and did not even really understand it
Yep agree this is what I read yesterday night. I am currently finishing the VBO implementation on Coin side. I think I found ways to get the color working with VBO. let's see if it works, this is part of my learning curve. And if yes, how we could replicate that with Coinwmayer wrote:Here is a short description how to use VBO in Coin: https://grey.colorado.edu/coin3d/vbo_rendering.html So it's basically a matter of structuring the scene graph accordingly.
However, with custom nodes VBO support is getting a bit harder because all the related classes are internal classes. So one way is to go with SoShape::startVertexArray/SoShape::finishVertexArray or everything is done independent of Coin.
Having it documented would for sure be useful.vejmarie wrote:I will post probably a Wiki entry on what I have done and how it works if you are interested.
Agree. I can now select standard surface ! Last step is to update properly the VBO when a part change occurs. I need to find a way to keep track of such event and reload the VBO with the right datas and I'll be done. Don't know yet the ETA, but progress are on tracktriplus wrote:Having it documented would for sure be useful.vejmarie wrote:I will post probably a Wiki entry on what I have done and how it works if you are interested.
You can easily trigger that from the viewprovider in the onChanged method. Look out if the changed property is the shape one and call a setup method in your node.vejmarie wrote: Last step is to update properly the VBO when a part change occurs. I need to find a way to keep track of such event and reload the VBO with the right datas and I'll be done. Don't know yet the ETA, but progress are on track
Thanks, you just saved me some times and this is great !. Will try to run the implementation tonight.ickby wrote:You can easily trigger that from the viewprovider in the onChanged method. Look out if the changed property is the shape one and call a setup method in your node.vejmarie wrote: Last step is to update properly the VBO when a part change occurs. I need to find a way to keep track of such event and reload the VBO with the right datas and I'll be done. Don't know yet the ETA, but progress are on track