Hi Aurelien,

On 4 June 2013 21:33, Aurelien Albert <[email protected]> wrote:
> 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

I was wondering about the overlap between AttribDivisor and Binding,
combining the two would avoid issues with users setting
BIND_OVERALL/BIND_PER_PRIMITIVE_SET and AttribDivisor and expecting it
somehow to work.

Right now I feel that sticking with the same naming convention that
users have been used will make for a smoother transition to the new
osg::Geometry.  Ideally I want most users just to recompile their code
and not have any problems..  Extending the enum Binding with
BIND_INSTANCE_DIVISOR_0 etc, would be one way, it's a bit cludgy but
would avoid the overlap in functionality issue.

I am busy with other work today so will have to return to this topic tomorrow.

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

Reply via email to