ImFusion SDK 4.3
ContextWindows Class Referencefinal

#include <ImFusion/Core/GL/ContextWindows.h>

OpenGL context using WGL as backend. More...

+ Inheritance diagram for ContextWindows:

Detailed Description

OpenGL context using WGL as backend.

Public Member Functions

std::unique_ptr< Contextclone () override
 Instantiates a new OpenGL context that is shared with this one.
 
bool makeCurrent () const override
 Make context current.
 
bool doneCurrent () const override
 Disable context.
 
void * internalHandle () const override
 Returns the native handle (HGLRC) of this OpenGL context.
 
void * deviceContextHandle () const
 Returns the device context handle (HDC) of this OpenGL context.
 
- Public Member Functions inherited from Context
virtual void detachFromCurrentThread ()
 Removes the binding of the OpenGL context to the current (i.e., calling) thread.
 
virtual void moveToCurrentThread ()
 Moves the OpenGL context to the current (i.e., calling) thread.
 

Static Public Member Functions

static std::unique_ptr< ContextWindowscreate (CreateInfo createInfo)
 Factory function for creating a new Windows OpenGL context.
 
static void * current ()
 Returns the native handle (HGLRC) representing the OpenGL context current in the calling thread.
 
static bool hasCurrent ()
 Returns whether the calling thread has a current OpenGL context.
 
- Static Public Member Functions inherited from Context
static std::unique_ptr< Contextcreate (CreateInfo createInfo)
 Factory function for creating a new offscreen OpenGL context.
 

Additional Inherited Members

- Protected Member Functions inherited from Context
virtual void deinitialize ()
 Clean up internal resources attached to this context.
 
- Static Protected Member Functions inherited from Context
static int defaultPixelBufferSize ()
 Default width and height of the pixel buffer of newly created offscreen contexts.
 
static void installDefaultDebugMessageHandler ()
 Sets up the Debug::defaultMessageCallback handler.
 

Member Function Documentation

◆ hasCurrent()

static bool hasCurrent ( )
static

Returns whether the calling thread has a current OpenGL context.

Convenience function for current() != nullptr.

◆ clone()

std::unique_ptr< Context > clone ( )
overridevirtual

Instantiates a new OpenGL context that is shared with this one.

The freshly created context will be made current. This method will throw if the context could not be initialized.

Note
If you plan to use this context in a different thread, you will need to call moveToCurrentThread() on the returned context before.

Implements Context.

◆ makeCurrent()

bool makeCurrent ( ) const
overridevirtual

Make context current.

Implements Context.

◆ doneCurrent()

bool doneCurrent ( ) const
overridevirtual

Disable context.

Implements Context.

◆ internalHandle()

void * internalHandle ( ) const
overridevirtual

Returns the native handle (HGLRC) of this OpenGL context.

Implements Context.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close