http://forum.openscenegraph.org/viewtopic.php?t=7285
This file adds the same string API wrapper to the State object for other older apps that
track Uniforms by string. The original comment about performance is preserved."
hpux. I have skipped irix this time as irix is too dead to keep osg building
there.
As usual, solaris does not like member templates in stl containers.
Some headers missing and link problems due to missing libraries."
Initial email from Tim : "I've implemented using a timestamp, available with ARB_timer_query and OpenGL 3.3, to gather GPU stats. This is nice because it can accurately fix the GPU draw time with respect to the other times on the stats graph, rather than having to estimate the wall time of the end of GPU drawing. This also prevents anomalies like the GPU phase starting before the draw phase..."
Changes to Tim's submission by Robert: Removal of need for swap buffer callback in ViewerBase.cpp, by
integrating a osg::State::frameCompleted() method that does the stats timing collection. Introduction of a
GraphicsContext::swapBuffersCallbackOrImplementation() method that calls the State::frameCompleted() and
the swap buffers callback or the swapImplementation as required.
creation of main shader to ShaderComposer and
collection of ShaderComponent to osg::State.
Also added very basic shader set up in osgshadecomposition example.
glActiveTexture on every State::apply after more than one texunits have been
used.
This is against 2.9.6 (I think SVN head is the same)
Quick Synopsis:
New functions:
State::applyModeOnTexUnit
State::applyAttributeOnTexUnit
State::applyModeMapOnTexUnit
State::applyAttributeMapOnTexUnit
State::applyModeListOnTexUnit
State::applyAttributeListOnTexUnit
All copies of the normal versions, but they also set the active tex unit if
absolutely necessary (i.e. only if they call something OpenGL).
State::apply (*2)
State::applyTextureAttribute
Changed to call the above functions and no longer call setActiveTextureUnit
themselves.
State::setActiveTextureUnit
Made inline, so the benefit of having applyModeOnTexUnit (etc) inline
is retained.
"
Added support for automatic aliasing of vertex, normal, color etc. arrays to Vertex Attribute equivelants.
Added new osg::GLBeginEndAdapter class for runtime conversion from glBegin/glEnd codes to vertex arrray equivelants.
Added automatic shader source conversion from gl_ to osg_ builtins.
The fix was to convert the osg::State to use C pointers for the set of applied PerContexProgram objects, and use the osg::Oberver mechanism to avoid dangling pointers for being maintained in osg::State.
setActiveTextureUnit methods of osg::State so they return false if the
texture unit is outside the range of allowable units for the driver.
Currently, the functions would return true even if the units are
invalid. This would cause the osg::State to become out of sync with
the actual driver state, which can cause some bugs in certain cases.
The change I made would verify that the unit passed to
setClientActiveTextureUnit is below GL_MAX_TEXTURE_COORDS, and the
unit passed to setActiveTextureUnit is below
max(GL_MAX_TEXTURE_COORDS,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS). I
modeled this behavior from the OpenGL docs for these commands which
can be found here:
http://www.opengl.org/sdk/docs/man/xhtml/glClientActiveTexture.xmlhttp://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml
"
handle scenes with multiple views with elements that need coordinating on a per view basis.
Added beginings of new osgText::FadeText class (not functionality yet).
via:
enum CheckForGLErrors
{
/** NEVER_CHECK_GL_ERRORS hints that OpenGL need not be checked for, this
is the fastest option since checking for errors does incurr a small overhead.*/
NEVER_CHECK_GL_ERRORS,
/** ONCE_PER_FRAME means that OpenGl errors will be checked for once per
frame, the overhead is still small, but at least OpenGL errors that are occurring
will be caught, the reporting isn't fine grained enough for debugging purposes.*/
ONCE_PER_FRAME,
/** ONCE_PER_ATTRIBUTE means that OpenGL errors will be checked for after
every attribute is applied, allow errors to be directly associated with
particular operations which makes debugging much easier.*/
ONCE_PER_ATTRIBUTE
};
/** Set whether and how often OpenGL errors should be checked for.*/
void setCheckForGLErrors(CheckForGLErrors check) { _checkGLErrors = check; }
/** Get whether and how often OpenGL errors should be checked for.*/
CheckForGLErrors getCheckForGLErrors() const { return _checkGLErrors; }