Hi Robert,
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? this may lead to fewer confusions to
beginners. And as one will never use BlendFunc and BlendFunci in the same
stateset, maybe it is also a waste to have two classes implementing the same
work?
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.
Wang Rui
------------------ Original ------------------
From: "Robert Osfield";<[email protected]>;
Date: Sat, Nov 29, 2014 01:35 AM
To: "OpenSceneGraph Submissions"<[email protected]>;
Subject: Re: [osg-submissions] Separated blending for multiplerenderingtargets
Hi All,
I've been looking at the extensions and while I haven't made a final decision
my current inclination is to introduce a couple of new classes:
ColorMaski
BlendFunci
BeldnEquationi
These will subclass from ColorMask/BlendFunc/BlendEquation respectively and add
an Index parameter that is mapped to the StateAttribute::Member value allow us
to individual set each of the appropriate parameters.
The glEnablei/glDisablei would also need supporting, for this I'm think that we
might need a osg::StateSet::setModei(..) method to complimant the standard
setMode() and have osg::State handle the glEnablei/glDisablei depending on
whether a particular target is ON/OFF.
Thoughts?
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org