Support Forum G3D Web Page |
Used to set a marker in the GPU instruction stream that the CPU can later query or block on.
More...
Inherits G3D::ReferenceCountedObject.
Public Member Functions | |
~Milestone () | |
bool | completed () const |
Returns true if this milestone has completed execution. More... | |
const String & | name () const |
bool | wait (float timeout=finf()) |
Stalls the CPU until the GPU has finished the milestone. More... | |
Static Public Member Functions | |
static shared_ptr< Milestone > | create (const String &name) |
Create a new Milestone (GL fence) and insert it into the GPU execution queue. More... | |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
Friends | |
class | RenderDevice |
Used to set a marker in the GPU instruction stream that the CPU can later query or block on.
Abstracts the OpenGL ARB_sync/OpenGL 3.2 API (http://www.opengl.org/registry/specs/ARB/sync.txt) that replaced the older NV_fence (http://oss.sgi.com/projects/ogl-sample/registry/NV/fence.txt) API.
G3D names this class 'milestone' instead of 'fence' to clarify that it is not a barrier–the CPU and GPU can both pass a milestone without blocking unless the CPU explicitly requests a block.
G3D::Milestone::~Milestone | ( | ) |
bool G3D::Milestone::completed | ( | ) | const |
Returns true if this milestone has completed execution.
Create a new Milestone (GL fence) and insert it into the GPU execution queue.
This must be called on a thread that has the current OpenGL Context
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
bool G3D::Milestone::wait | ( | float | timeout = finf() | ) |
Stalls the CPU until the GPU has finished the milestone.
|
friend |