Commit Graph

99 Commits

Author SHA1 Message Date
Robert Osfield
9499b19b43 Moved the ArrayDispatchers management so that osg::State now has a ArrayDispatchers object that any osg::Geometry can reuse,
and optimized the implementation to reduce the CPU overhead.
2009-10-21 11:18:13 +00:00
Robert Osfield
6a56b6e6be Refactored osg::Geometry::drawImplementation(..) to use new osg::ArrayDispatchers that encapsulate the task
of dispatch osg::Array data as OpenGL attributes.
2009-10-20 19:34:24 +00:00
Robert Osfield
aefd1513f4 Ported osg::Geometry across to supporting the aliasing of vertex, color and normal etc. calls to Vertex Attributes.
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.
2009-10-16 16:26:27 +00:00
Robert Osfield
9e2567cb88 Made the use of the new projection and modelview matrix uniforms optional 2009-10-11 06:05:19 +00:00
Robert Osfield
f6166d1119 Introduced new uniforms for tracking the modelview and project matrices in shaders using non built-ins. 2009-10-09 13:39:11 +00:00
Robert Osfield
32b21dbb89 Introduced new GLBufferObject pool for managing the memory footprint taken up by VertexBufferObejct, ElementBufferObject and PixelBufferObject. 2009-10-03 09:25:23 +00:00
Robert Osfield
f75013d534 Introduced new BufferObject design + implementation in preperation of implementing a pool system for buffer objects 2009-10-01 20:19:42 +00:00
Robert Osfield
3d75054e2c Preliminary work on support for a texture object pool that is designed to help manage resources down the GPU more tightly. 2009-09-22 18:45:24 +00:00
Robert Osfield
8138a7698f Moved getAttributeVec into public: to allow 3rd party code to access without having to subclass 2009-05-12 05:49:36 +00:00
Robert Osfield
411431f3be Fixed warnings, updated NEWS 2009-01-30 10:55:28 +00:00
Robert Osfield
69f9377093 Fixed effective leak in Program::PerContextProgram caused by previously osg::State keeping a set of std::ref_ptr<Program::PerContextProgram> without ever pruning this list.
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.
2009-01-26 15:16:24 +00:00
Robert Osfield
4f3b1baee4 Added support for primitive instancing 2009-01-06 14:55:49 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
c346f5b943 Introduce new osgViewer::Renderer class for implementing of the rendering
of cameras in viewers
2007-08-02 11:02:47 +00:00
Robert Osfield
ab4398e440 From Farshid Lashkari, "I made a modification to the setClientActiveTextureUnit and
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.xml
http://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml
"
2007-05-15 11:25:14 +00:00
Robert Osfield
859bcf3c4b Further perfomrmance optimizations and clean up on new VBO/EBO/PBO API. 2007-05-01 18:03:32 +00:00
Robert Osfield
40db1a8934 Moved VBO switching code into inline methods into osg::State to speed performance 2007-05-01 06:28:20 +00:00
Robert Osfield
9db23e0b22 Fixed bug associated with complex RenderBin setup. 2007-04-16 12:18:56 +00:00
Robert Osfield
fd0ea388c2 Began work on providing support for threading camera cull traversals in parallel with
the previous frames draw traversal.  Changes range from osg::State, through osgUtil::RenderBin, through to osgViewer
2007-01-29 22:44:29 +00:00
Robert Osfield
36330f7e40 Changed osgUtil::RenderBin and osg::State to allow nesting of StateSet's associated with RenderBin's. 2007-01-27 11:13:01 +00:00
Robert Osfield
def74d3471 Introduced new osg::View, and osg::RenderInfo classes into the core OSG to help
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).
2006-09-18 20:54:48 +00:00
Robert Osfield
0336231321 Moved extension function pointer initilization into a method, and the pointers from
being static to be local member variables.  This should avoid issues under Windows
with multiple graphics contexts have seperate entry points.
2006-08-02 16:14:17 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
7d3ddc0e1b From Paul Martz, clean up of comments. 2006-06-08 12:09:51 +00:00
Robert Osfield
32b929a493 Added support for OpenGL mode black listing to provide better support
for extension checking and invalidation of OpenGL modes associated with
extensions.
2006-02-22 14:31:13 +00:00
Robert Osfield
b9e651baf1 Added new osg::GraphicsContext base class 2005-07-20 15:55:07 +00:00
Robert Osfield
7c90800822 From Jan Ciger, gcc 4.0 compile fix. 2005-05-12 20:35:15 +00:00
Robert Osfield
1afd5e48a7 Added support for PROTECTED and OVERRIDE to uniforms. 2005-05-10 13:56:05 +00:00
Robert Osfield
97daa561f4 Added support for lazy state updating of uniforms. 2005-05-03 21:46:47 +00:00
Robert Osfield
7117ff4bd3 Added support for controlling the frequency of checking for OpenGL errors
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; }
2005-04-29 20:56:20 +00:00
Robert Osfield
62994ac4a2 From Tony Horrobin, fix for VS6.0 2005-04-17 09:41:48 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
e7ce7c0529 Fixed getUniformLocation and getAttribLocation methods 2005-04-14 20:05:16 +00:00
Robert Osfield
2e10cffb4d Work in progress on shader language uniform support 2005-04-13 12:00:28 +00:00
Robert Osfield
d268cf46fa Renamed SG_LIBRARY and SG_EXPORT macro's to OSG_LIBRARY and OSG_EXPORT 2005-04-11 17:14:17 +00:00
Robert Osfield
aa8dbea11c From Mike Weiblen, updates to Shander Language support 2005-04-04 10:08:15 +00:00
Robert Osfield
60cecb8959 Added State::getActiveUnit and usage of it in the glTexCopyImage*() implementations 2005-03-25 11:07:48 +00:00
Robert Osfield
b7bd8075de From, Leandro Motta Barros, Doxygen comments.
Ammendments by Robert Osfield, a few comment rewrites to better reflect API functionality/usage.
2005-02-02 15:08:55 +00:00
Robert Osfield
40632c97b0 From Tree, moved GL_ #define's out of osg namespaces 2005-01-07 19:00:40 +00:00
Robert Osfield
edb15e17bc Added new getMember() method and TypeMemberPair into StateAttribute and
support for the unsigned int member to be paired with types in osg::StateSet
so that lights, clipplanes and other attributes that have a type group but
then need to differentiate within that group via a member uint.
2004-10-13 11:15:50 +00:00
Robert Osfield
c204628d1a Fix of tabbing and typo 2004-09-13 17:19:05 +00:00
Robert Osfield
21691f2d56 From Geoff Michel, typo and spelling fixes 2004-09-02 19:10:33 +00:00
Robert Osfield
857d8e2435 Added the ability to set the global stateset, as use this RenderStageLighting 2004-08-07 09:42:19 +00:00
Robert Osfield
69c4e87bb7 Added osg::State::popAllStateSets() method to pop all remain StateSet's off
the state stack, thus readying the state object to recieve a new frame.

Removed the state.reset() call in osgUtil::SceneView::cull() as this was
causing problems with stats producing inheritance of state when toggling
stats on.
2003-09-10 21:22:47 +00:00
Robert Osfield
5b93250eb0 Added support for Matrixd and Matrixf implementations, with the default
Matrix typedef's to either Matrixd or Matrixf.
2003-09-05 20:48:42 +00:00
Robert Osfield
e530912744 Made Matrix a typedef to Matrixf, and converted the old Matrix to Matrixf, as
part of prep for supporting both Matrixf (float) and Matrixd (double).

Added osg::Matrixf::glLoadMatrix() and osg::Matrixf::glMultiMatrix() methods
and changed corresponding usage of glLoad/MultMatrixf() calls across to use these
methods. Again prep for support Matrixd.

Fixes for VisualStudio 6.0 compile.
2003-09-02 17:19:18 +00:00
Robert Osfield
0ed56936ce Removed suplerfluous inline from setInitialViewMatrix(). 2003-08-25 13:31:31 +00:00
Robert Osfield
bd798a6c4e Added getInitialInverseViewMatrix() to osg::State. 2003-08-25 13:06:15 +00:00
Robert Osfield
ee30f2e30c Added support for osg::State::s/getInitialViewMatrix();
Added slideshow3D examples to the runexamples.bat.

Fixed DatabasePager to work with the latest OpenThreads.
2003-07-22 21:03:59 +00:00
Robert Osfield
b5442ac835 Added support for the ARB_vertex_buffer_object into osg::Geometry. 2003-06-29 21:41:57 +00:00