Hi Rui,

On 2 December 2014 at 01:55, Wang Rui <[email protected]> wrote:

> Sorry for the delay.. I agree that glEnablei/glDisablei() function should
> be added to osg::State although it only supports GL_BLEND and GL_SCISSOR_TEST
> at present. And for the new state attribute classes, em.. why don't we
> merge the new separated-buffer-handling functionality directly into
> original ColorMask/BlendFunc/BlendEquation classes?


I thought about extending these classes but the extra buffer index value
needs to be handled in an way that doesn't confuse the function of the
usage when you don't want to use the indexed versions of the gl functions.
I considered having a special index value for none indexed values but in
the end have concluded such cludges aren't good, it's better to subclasses
and add the indexed versions.


>
> A setUseSeparatedBuffer(bool) method can be introduced to switch between
> traditional method and new extensions. And a static method
> createAttrbuteAndModesForCamera() can be provided to read from
> osg::Camera::BufferAttachments and generate all related state attributes at
> one time.
>

I'm confused trying to work out precisely what you mean.

As a general note, my preference will be try to stick to similar language
and meaning to the underlying gl functions/functionality.

--

I am currently focused on implementing the new glEnablei/glDisablei and
ColorMaski/BlendFunci/BlendFunctioni classes.  The sticky issue of how to
get and use the GL function pointers is something I'd like to resolve in a
more elegant way that has been done in the OSG up to now.  I really don't
like the overly complicated setup or various Extentions classes so am using
the mutli-buffer function work as a prototype of how we can clean up
management of GL extensions in the OSG.  Looking at the wider issues of how
to manage extension does mean the work will take a little longer.

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

Reply via email to