I have just checked in my revision to osg::ClampColor. This change should make it possible to set all the vertex, fragment and read clamp modes together and removes the use of the enum with TRUE and FALSE so should fix the OSX build issue.
Please test and let me know how you get on,
Robert.
On 9/12/06, Robert Osfield <[EMAIL PROTECTED]
> wrote:
Hi All,
With the recent report of problems of compiling osg::ClampColor under certain combinations of OSX I thought I'd review the code to see if I could spot any problems. I believe the code is OK, the particular problem its probably just down to a previous include doing #define TRUE and #define FALSE and thus poluting the namespace, I can see this happening in users code but would be surprised at the core OSG tripping over this.. I can't think of a more approrpaite name than TRUE and FALSE, adding or remove from this will only obscure what the enum map to which is GL_TRUE and GL_FALSE, so perhaps the only route out of this would be to drop the enum and just use the OpenGL versions.
Aside from this I also reviewed the general osg::ClampColor API a bit more, and believe perhaps it need tweaking. The way its implemented you can only set one of CLAMP_VERTEX_COLOR, CLAMP_FRAGMENT_COLOR or CLAMP_READ_COLOR, but you can't set them all, or any combination of them. The most flexible implmentation would be to have three seperate StateAttributes, ClampVertexColorm ClampFragmentColor and ClampReadColor, but this would entail an number of changes, way too close to 1.2, and I feel is a bit of overkill in terms of class poliferation. The other alternative is to set all three clamping modes within the single osg::ClampColor.
I am going to code this last option, as its theleast intrusive alteration that enables one to control all the clamp modes, it alas will break user code that is using it right now though, not too many users will be using these feature yet though so it should be too great a change.
Shout if you can forsee a problem.
Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
