root/OpenSceneGraph/trunk/src/osg/GLObjects.cpp @ 7821

Revision 7821, 3.4 kB (checked in by robert, 6 years ago)

Removed redundental vertex buffer object flush methods

Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under 
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13#include <osg/GLObjects>
14
15#include <osg/Texture>
16#include <osg/VertexProgram>
17#include <osg/FragmentProgram>
18#include <osg/Shader>
19#include <osg/BufferObject>
20#include <osg/FrameBufferObject>
21#include <osg/Drawable>
22#include <osg/OcclusionQueryNode>
23
24void osg::flushDeletedGLObjects(unsigned int contextID, double currentTime, double& availableTime)
25{
26    osg::BufferObject::flushDeletedBufferObjects(contextID,currentTime,availableTime);
27    osg::Drawable::flushDeletedDisplayLists(contextID,availableTime);
28    osg::FragmentProgram::flushDeletedFragmentProgramObjects(contextID,currentTime,availableTime);
29    osg::FrameBufferObject::flushDeletedFrameBufferObjects(contextID,currentTime,availableTime);
30    osg::Program::flushDeletedGlPrograms(contextID,currentTime,availableTime);
31    osg::RenderBuffer::flushDeletedRenderBuffers(contextID,currentTime,availableTime);
32    osg::Shader::flushDeletedGlShaders(contextID,currentTime,availableTime);
33    osg::Texture::flushDeletedTextureObjects(contextID,currentTime,availableTime);
34    osg::VertexProgram::flushDeletedVertexProgramObjects(contextID,currentTime,availableTime);
35    osg::OcclusionQueryNode::flushDeletedQueryObjects(contextID,currentTime,availableTime);
36}
37
38void osg::flushAllDeletedGLObjects(unsigned int contextID)
39{
40    double currentTime = DBL_MAX;
41    double availableTime = DBL_MAX;
42    osg::BufferObject::flushDeletedBufferObjects(contextID,currentTime,availableTime);
43    osg::Drawable::flushAllDeletedDisplayLists(contextID);
44    osg::FragmentProgram::flushDeletedFragmentProgramObjects(contextID,currentTime,availableTime);
45    osg::FrameBufferObject::flushDeletedFrameBufferObjects(contextID,currentTime,availableTime);
46    osg::Program::flushDeletedGlPrograms(contextID,currentTime,availableTime);
47    osg::RenderBuffer::flushDeletedRenderBuffers(contextID,currentTime,availableTime);
48    osg::Shader::flushDeletedGlShaders(contextID,currentTime,availableTime);
49    osg::Texture::flushAllDeletedTextureObjects(contextID);
50    osg::VertexProgram::flushDeletedVertexProgramObjects(contextID,currentTime,availableTime);
51    osg::OcclusionQueryNode::flushDeletedQueryObjects(contextID,currentTime,availableTime);
52}
53
54void osg::discardAllDeletedGLObjects(unsigned int contextID)
55{
56    osg::BufferObject::discardDeletedBufferObjects(contextID);
57    osg::Drawable::discardAllDeletedDisplayLists(contextID);
58    osg::FragmentProgram::discardDeletedFragmentProgramObjects(contextID);
59    osg::FrameBufferObject::discardDeletedFrameBufferObjects(contextID);
60    osg::Program::discardDeletedGlPrograms(contextID);
61    osg::RenderBuffer::discardDeletedRenderBuffers(contextID);
62    osg::Shader::discardDeletedGlShaders(contextID);
63    osg::Texture::discardAllDeletedTextureObjects(contextID);
64    osg::VertexProgram::discardDeletedVertexProgramObjects(contextID);
65    osg::OcclusionQueryNode::discardDeletedQueryObjects(contextID);
66}
Note: See TracBrowser for help on using the browser.