Raytrix Light Field SDK  5.0
Rx::LFR::Net::OpenGlInterop Class Reference

Detailed Description

Provides methods for using OpenGL contexts and textures.

Inherits Rx::Net::NativeInterfaceWrapper< Rx::LFR::COpenGlInterop, Rx::LFR::Net::Interfaces::EOpenGlInterop >.

Public Member Functions

 OpenGlInterop ()
 Default constructor. More...
 
 ~OpenGlInterop ()
 Default Destructor. More...
 
void CreateContextSharedWithCurrent ()
 Creates an OpenGL context that is shared with the current OpenGL context. This requires a current OpenGL context. More...
 
void DeleteStoredContext ()
 Deletes the stored context (if it has been created by CreateContextSharedWithCurrent). More...
 
void DestroyTexture (EImage eImgID)
 Destroys the OpenGL texture of the image defined by the given ID. More...
 
void DestroyTextures ()
 Destroys all OpenGL textures. More...
 
virtual System::Object ^ GetInterface (Rx::LFR::Net::Interfaces::EOpenGlInterop eData)
 Gets the interface. More...
 
unsigned GetTextureID (EImage eImgID)
 Gets the OpenGL texture ID of the image defined by the given ID. More...
 
bool HasStoredContext ()
 Query if this object has a valid OpenGL context stored. More...
 
bool MakeStoredContextCurrent ()
 Makes the stored OpenGL rendering context the calling thread's current rendering context. More...
 
void ReleaseContext ()
 Releases the OpenGL context. Changes the calling thread's current rendering context so it's no longer current. This method does not delete the stored OpenGL context. More...
 
void StoreCurrentContext ()
 Stores the current OpenGL context. Throws an exception if the calling thread hasn't a current OpenGL context. More...
 

Static Public Member Functions

static void GetVersion (RX_OUT int % iMajor, RX_OUT int % iMinor)
 Gets the OpenGL version. More...
 

Constructor & Destructor Documentation

◆ OpenGlInterop()

Rx::LFR::Net::OpenGlInterop::OpenGlInterop ( )
inline

Default constructor.

◆ ~OpenGlInterop()

Rx::LFR::Net::OpenGlInterop::~OpenGlInterop ( )
inline

Default Destructor.

Member Function Documentation

◆ CreateContextSharedWithCurrent()

void Rx::LFR::Net::OpenGlInterop::CreateContextSharedWithCurrent ( )
inline

Creates an OpenGL context that is shared with the current OpenGL context. This requires a current OpenGL context.

◆ DeleteStoredContext()

void Rx::LFR::Net::OpenGlInterop::DeleteStoredContext ( )
inline

Deletes the stored context (if it has been created by CreateContextSharedWithCurrent).

◆ DestroyTexture()

void Rx::LFR::Net::OpenGlInterop::DestroyTexture ( EImage  eImgID)
inline

Destroys the OpenGL texture of the image defined by the given ID.

Attention: An OpenGL context must be stored before by calling StoreCurrentContext.

Parameters
eImgID[in] The image ID.

◆ DestroyTextures()

void Rx::LFR::Net::OpenGlInterop::DestroyTextures ( )
inline

Destroys all OpenGL textures.

Attention: An OpenGL context must be stored before by calling StoreCurrentContext.

◆ GetInterface()

virtual System::Object ^ Rx::Net::NativeInterfaceWrapper< Rx::LFR::COpenGlInterop , Rx::LFR::Net::Interfaces::EOpenGlInterop >::GetInterface ( Rx::LFR::Net::Interfaces::EOpenGlInterop  eData)
inlinevirtualinherited

Gets the interface.

Returns
The interface.

◆ GetTextureID()

unsigned Rx::LFR::Net::OpenGlInterop::GetTextureID ( EImage  eImgID)
inline

Gets the OpenGL texture ID of the image defined by the given ID.

If the desired texture has not been created yet, the returned texture ID is 0.

Attention: An OpenGL context must be stored before by calling StoreCurrentContext.

Parameters
eImgID[in] The image ID.
Returns
The texture ID or 0.

◆ GetVersion()

static void Rx::LFR::Net::OpenGlInterop::GetVersion ( RX_OUT int %  iMajor,
RX_OUT int %  iMinor 
)
inlinestatic

Gets the OpenGL version.

Parameters
iMajor[out] The major part of the version.
iMinor[out] The minor part of the version.

◆ HasStoredContext()

bool Rx::LFR::Net::OpenGlInterop::HasStoredContext ( )
inline

Query if this object has a valid OpenGL context stored.

Returns
True if OpenGL context stored, false if not.

◆ MakeStoredContextCurrent()

bool Rx::LFR::Net::OpenGlInterop::MakeStoredContextCurrent ( )
inline

Makes the stored OpenGL rendering context the calling thread's current rendering context.

Returns
Returns true if the calling thread hadn't the context BEFORE the call.

◆ ReleaseContext()

void Rx::LFR::Net::OpenGlInterop::ReleaseContext ( )
inline

Releases the OpenGL context. Changes the calling thread's current rendering context so it's no longer current. This method does not delete the stored OpenGL context.

◆ StoreCurrentContext()

void Rx::LFR::Net::OpenGlInterop::StoreCurrentContext ( )
inline

Stores the current OpenGL context. Throws an exception if the calling thread hasn't a current OpenGL context.