robertosfield wrote:
> The PreserveDataType and AttribDivisor are entirely
> new and are intended to support new extensions being added to the OSG
> - but their implementation will have to wait till the GeometryNew
> refactor is further down the road.
This is great !
robertosfield wrote:
> Alternatively we just drop backwards compatibility and
> force uses to set the binding directly on the array.
I prefer this solution, sometimes changes are simply needed.
robertosfield wrote:
> The naming of Binding is something I'm note yet sure of, with the
> introduction of AttribDivisor the binding becomes a bit less clearly
> defined as well. Not sure what to make of this yet...
Maybe a single parameter, something like "get/setRate", using an enum :
enum Rate
{
RATE_OFF=0, // Attribute is never emitted =>BIND_OFF -
attribDivisor = 0
RATE_SINGLESHOT // Attribute is emitted once =>BIND_OVERALL -
attribDivisor = 0
RATE_PRIMITIVE_SET, // Attribute is emitted at each start of a
primitive set => BIND_PRIMITIVE_SET - attribDivisor = 0
RATE_VERTEX , // Attribute is emitted at each vertex =>
BIND_VERTEX - attribDivisor = 0
RATE_INSTANCE_0, // Attribute is emitted at each vertex =>
BIND_VERTEX - attribDivisor = 0
RATE_INSTANCE_1, // Attribute is emitted at each instance =>
BIND_VERTEX - attribDivisor = 1
RATE_INSTANCE_2, // Attribute is emitted at each 2 instances =>
BIND_VERTEX - attribDivisor = 2
...
RATE_INSTANCE_9, // Attribute is emitted at each 2 instances =>
BIND_VERTEX - attribDivisor = 9
};
Of course, user can do setRate(RATE_INSTANCE_0 + 25) to have attribDivisor = 25
robertosfield wrote:
> I have now completed the removal of ArrayData container and all slow
> path support from GeometryNew. The size is now down to less than
> 2/3rd the size of the original Geometry.cpp. The largest bloat left
> is with helper functions for verifying and correcting bindings, but I
> now believe these should be placed into osgUtil as helper functions
> rather osg::Geometry so I'll likely remove these and the size will go
> small still.
Great work !
I have a question about immediate mode deprecation : does that mean the array
dispatchers are no more needed ? Do the osg::geometryNew class set
vertex/normal/textcoords... pointers directly on the osg::State ?
And about display list : I understand that it's too early to remove them, in
some situations it's still usefull. But maybe it's time to use it per default ?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54456#54456
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org