| 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 | |
|---|
| 14 | #ifndef OSG_GLOBJECTS |
|---|
| 15 | #define OSG_GLOBJECTS 1 |
|---|
| 16 | |
|---|
| 17 | #include <osg/Export> |
|---|
| 18 | |
|---|
| 19 | namespace osg { |
|---|
| 20 | |
|---|
| 21 | /** Flush all deleted OpenGL objects within the specified availableTime. |
|---|
| 22 | * Note, must be called from a thread which has current the graphics context associated with contextID. */ |
|---|
| 23 | extern OSG_EXPORT void flushDeletedGLObjects(unsigned int contextID, double currentTime, double& availableTime); |
|---|
| 24 | |
|---|
| 25 | /** Flush all deleted OpenGL objects. |
|---|
| 26 | * Note, must be called from a thread which has current the graphics context associated with contextID. */ |
|---|
| 27 | extern OSG_EXPORT void flushAllDeletedGLObjects(unsigned int contextID); |
|---|
| 28 | |
|---|
| 29 | /** Do a GL delete all OpenGL objects. |
|---|
| 30 | * Note, must be called from a thread which has current the graphics context associated with contextID. */ |
|---|
| 31 | extern OSG_EXPORT void deleteAllGLObjects(unsigned int contextID); |
|---|
| 32 | |
|---|
| 33 | /** Discard all OpenGL objects. |
|---|
| 34 | * Note, unlike deleteAllObjectObjects discard does not |
|---|
| 35 | * do any OpenGL calls so can be called from any thread, but as a consequence it |
|---|
| 36 | * also doesn't remove the associated OpenGL resource so discard should only be |
|---|
| 37 | * called when the associated graphics context is being/has been closed. */ |
|---|
| 38 | extern OSG_EXPORT void discardAllGLObjects(unsigned int contextID); |
|---|
| 39 | |
|---|
| 40 | } |
|---|
| 41 | |
|---|
| 42 | #endif |
|---|