Open CASCADE Technology  7.2.0
Public Member Functions | Static Public Member Functions

OpenGl_Context Class Reference

This class generalize access to the GL context and available extensions. More...

#include <OpenGl_Context.hxx>

Inheritance diagram for OpenGl_Context:
Inheritance graph
[legend]

Public Member Functions

 OpenGl_Context (const Handle< OpenGl_Caps > &theCaps=NULL)
 Empty constructor. You should call Init() to perform initialization with bound GL context. More...
 
virtual ~OpenGl_Context ()
 Destructor. More...
 
void forcedRelease ()
 Release all resources, including shared ones. More...
 
void Share (const Handle< OpenGl_Context > &theShareCtx)
 Share GL context resources. theShareCtx - handle to context to retrieve handles to shared resources. More...
 
Standard_Boolean Init (const Standard_Boolean theIsCoreProfile=Standard_False)
 Initialize class from currently bound OpenGL context. Method should be called only once. More...
 
Standard_Boolean IsValid () const
 
Standard_Boolean Init (const Aspect_Drawable theWindow, const Aspect_Display theDisplay, const Aspect_RenderingContext theGContext, const Standard_Boolean theIsCoreProfile=Standard_False)
 Initialize class from specified window and rendering context. Method should be called only once. More...
 
Aspect_Drawable Window () const
 
Standard_Boolean CheckExtension (const char *theExtName) const
 Check if theExtName extension is supported by active GL context. More...
 
template<typename FuncType_t >
Standard_Boolean FindProc (const char *theFuncName, FuncType_t &theFuncPtr)
 Auxiliary template to retrieve GL function pointer. Pointer to function retrieved from library is statically casted to requested type - there no way to check real signature of exported function. The context should be bound before call. More...
 
Standard_Boolean IsGlGreaterEqual (const Standard_Integer theVerMajor, const Standard_Integer theVerMinor) const
 
Standard_Integer VersionMajor () const
 Return cached GL version major number. More...
 
Standard_Integer VersionMinor () const
 Return cached GL version minor number. More...
 
const OpenGl_GlFunctionsFunctions () const
 Access entire map of loaded OpenGL functions. More...
 
bool ResetErrors (const bool theToPrintErrors=false)
 Clean up errors stack for this GL context (glGetError() in loop). More...
 
Standard_Boolean IsCurrent () const
 This method uses system-dependent API to retrieve information about GL context bound to the current thread. More...
 
Standard_Boolean MakeCurrent ()
 Activates current context. Class should be initialized with appropriate info. More...
 
void SwapBuffers ()
 Swap front/back buffers for this GL context (should be activated before!). More...
 
Standard_Boolean SetSwapInterval (const Standard_Integer theInterval)
 Setup swap interval (VSync). More...
 
Standard_Boolean IsRender () const
 Return true if active mode is GL_RENDER (cached state) More...
 
Standard_Boolean IsFeedback () const
 Return true if active mode is GL_FEEDBACK (cached state) More...
 
Standard_Size AvailableMemory () const
 This function retrieves information from GL about free GPU memory that is: More...
 
TCollection_AsciiString MemoryInfo () const
 This function retrieves information from GL about GPU memory and contains more vendor-specific values than AvailableMemory(). More...
 
void MemoryInfo (TColStd_IndexedDataMapOfStringString &theDict) const
 This function retrieves information from GL about GPU memory. More...
 
void DiagnosticInformation (TColStd_IndexedDataMapOfStringString &theDict, Graphic3d_DiagnosticInfo theFlags) const
 Fill in the dictionary with OpenGL info. Should be called with bound context. More...
 
const Handle< OpenGl_Resource > & GetResource (const TCollection_AsciiString &theKey) const
 Access shared resource by its name. More...
 
template<typename TheHandleType >
Standard_Boolean GetResource (const TCollection_AsciiString &theKey, TheHandleType &theValue) const
 Access shared resource by its name. More...
 
Standard_Boolean ShareResource (const TCollection_AsciiString &theKey, const Handle< OpenGl_Resource > &theResource)
 Register shared resource. Notice that after registration caller shouldn't release it by himself - it will be automatically released on context destruction. More...
 
void ReleaseResource (const TCollection_AsciiString &theKey, const Standard_Boolean theToDelay=Standard_False)
 Release shared resource. If there are more than one reference to this resource (also used by some other existing object) then call will be ignored. This means that current object itself should nullify handle before this call. Notice that this is unrecommended operation at all and should be used only in case of fat resources to release memory for other needs. More...
 
template<class T >
void DelayedRelease (Handle< T > &theResource)
 Append resource to queue for delayed clean up. Resources in this queue will be released at next redraw call. More...
 
void ReleaseDelayed ()
 Clean up the delayed release queue. More...
 
OpenGl_ClippingChangeClipping ()
 
const OpenGl_ClippingClipping () const
 
const Handle< OpenGl_ShaderManager > & ShaderManager () const
 
Standard_Integer TextureWrapClamp () const
 Either GL_CLAMP_TO_EDGE (1.2+) or GL_CLAMP (1.1). More...
 
Standard_Integer MaxDegreeOfAnisotropy () const
 
Standard_Integer MaxTextureSize () const
 
Standard_Integer MaxCombinedTextureUnits () const
 
Standard_Integer MaxMsaaSamples () const
 
Standard_Integer MaxDrawBuffers () const
 
Standard_Integer MaxColorAttachments () const
 
Standard_Integer MaxClipPlanes () const
 Get maximum number of clip planes supported by OpenGl. This value is implementation dependent. At least 6 planes should be supported by OpenGl (see specs). More...
 
Standard_Boolean HasRayTracing () const
 
Standard_Boolean HasRayTracingTextures () const
 
Standard_Boolean HasRayTracingAdaptiveSampling () const
 
bool ToUseVbo () const
 Returns true if VBO is supported and permitted. More...
 
Standard_Boolean IsGlNormalizeEnabled () const
 
Standard_Boolean SetGlNormalizeEnabled (Standard_Boolean isEnabled)
 Sets GL_NORMALIZE enabled or disabled. More...
 
Standard_Integer PolygonMode () const
 
Standard_Integer SetPolygonMode (const Standard_Integer theMode)
 Sets polygon rasterization mode (glPolygonMode() function). More...
 
bool IsPolygonHatchEnabled () const
 
bool SetPolygonHatchEnabled (const bool theIsEnabled)
 Sets enabled state of polygon hatching rasterization without affecting currently selected hatching pattern. More...
 
Standard_Integer PolygonHatchStyle () const
 
Standard_Integer SetPolygonHatchStyle (const Handle< Graphic3d_HatchStyle > &theStyle)
 Sets polygon hatch pattern. Zero-index value is a default alias for solid filling. More...
 
void ApplyModelWorldMatrix ()
 Applies matrix stored in ModelWorldState to OpenGl. More...
 
void ApplyWorldViewMatrix ()
 Applies matrix stored in WorldViewState to OpenGl. More...
 
void ApplyModelViewMatrix ()
 Applies combination of matrices stored in ModelWorldState and WorldViewState to OpenGl. More...
 
void ApplyProjectionMatrix ()
 Applies matrix stored in ProjectionState to OpenGl. More...
 
const Handle< Message_Messenger > & Messenger () const
 
void PushMessage (const unsigned int theSource, const unsigned int theType, const unsigned int theId, const unsigned int theSeverity, const TCollection_ExtendedString &theMessage)
 Callback for GL_ARB_debug_output extension. More...
 
Standard_Boolean ExcludeMessage (const unsigned int theSource, const unsigned int theId)
 Adds a filter for messages with theId and theSource (GL_DEBUG_SOURCE_) More...
 
Standard_Boolean IncludeMessage (const unsigned int theSource, const unsigned int theId)
 Removes a filter for messages with theId and theSource (GL_DEBUG_SOURCE_) More...
 
Standard_Boolean HasStereoBuffers () const
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Static Public Member Functions

static Standard_Integer GetPowerOfTwo (const Standard_Integer theNumber, const Standard_Integer theThreshold)
 Function for getting power of to number larger or equal to input number. More...
 
static void ReadGlVersion (Standard_Integer &theGlVerMajor, Standard_Integer &theGlVerMinor)
 Read OpenGL version information from active context. More...
 
static Standard_Boolean CheckExtension (const char *theExtString, const char *theExtName)
 Check if theExtName extension is in extensions string. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Data Fields

core profiles
OpenGl_GlCore11core11
 OpenGL 1.1 core functionality. More...
 
OpenGl_GlCore11Fwdcore11fwd
 OpenGL 1.1 without deprecated entry points. More...
 
OpenGl_GlCore15core15
 OpenGL 1.5 core functionality. More...
 
OpenGl_GlCore15Fwdcore15fwd
 OpenGL 1.5 without deprecated entry points. More...
 
OpenGl_GlCore20core20
 OpenGL 2.0 core functionality (includes 1.5) More...
 
OpenGl_GlCore20Fwdcore20fwd
 OpenGL 2.0 without deprecated entry points. More...
 
OpenGl_GlCore32core32
 OpenGL 3.2 core profile. More...
 
OpenGl_GlCore32Backcore32back
 OpenGL 3.2 backward compatibility profile. More...
 
OpenGl_GlCore33core33
 OpenGL 3.3 core profile. More...
 
OpenGl_GlCore33Backcore33back
 OpenGL 3.3 backward compatibility profile. More...
 
OpenGl_GlCore41core41
 OpenGL 4.1 core profile. More...
 
OpenGl_GlCore41Backcore41back
 OpenGL 4.1 backward compatibility profile. More...
 
OpenGl_GlCore42core42
 OpenGL 4.2 core profile. More...
 
OpenGl_GlCore42Backcore42back
 OpenGL 4.2 backward compatibility profile. More...
 
OpenGl_GlCore43core43
 OpenGL 4.3 core profile. More...
 
OpenGl_GlCore43Backcore43back
 OpenGL 4.3 backward compatibility profile. More...
 
OpenGl_GlCore44core44
 OpenGL 4.4 core profile. More...
 
OpenGl_GlCore44Backcore44back
 OpenGL 4.4 backward compatibility profile. More...
 
Handle< OpenGl_Capscaps
 context options More...
 
extensions
Standard_Boolean hasHighp
 highp in GLSL ES fragment shader is supported More...
 
Standard_Boolean hasUintIndex
 GLuint for index buffer is supported (always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_element_index_uint) More...
 
Standard_Boolean hasTexRGBA8
 always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_rgb8_rgba8 More...
 
OpenGl_FeatureFlag hasDrawBuffers
 Complex flag indicating support of multiple draw buffers (desktop OpenGL 2.0, OpenGL ES 3.0, GL_ARB_draw_buffers, GL_EXT_draw_buffers) More...
 
OpenGl_FeatureFlag hasFloatBuffer
 Complex flag indicating support of float color buffer format (desktop OpenGL 3.0, GL_ARB_color_buffer_float, GL_EXT_color_buffer_float) More...
 
OpenGl_FeatureFlag hasHalfFloatBuffer
 Complex flag indicating support of half-float color buffer format (desktop OpenGL 3.0, GL_ARB_color_buffer_float, GL_EXT_color_buffer_half_float) More...
 
OpenGl_FeatureFlag hasSampleVariables
 Complex flag indicating support of MSAA variables in GLSL shader (desktop OpenGL 4.0, GL_ARB_sample_shading) More...
 
Standard_Boolean arbDrawBuffers
 GL_ARB_draw_buffers. More...
 
Standard_Boolean arbNPTW
 GL_ARB_texture_non_power_of_two. More...
 
Standard_Boolean arbTexRG
 GL_ARB_texture_rg. More...
 
Standard_Boolean arbTexFloat
 GL_ARB_texture_float (on desktop OpenGL - since 3.0 or as extension GL_ARB_texture_float; on OpenGL ES - since 3.0) More...
 
OpenGl_ArbSamplerObjectarbSamplerObject
 GL_ARB_sampler_objects (on desktop OpenGL - since 3.3 or as extension GL_ARB_sampler_objects; on OpenGL ES - since 3.0) More...
 
OpenGl_ArbTexBindlessarbTexBindless
 GL_ARB_bindless_texture. More...
 
OpenGl_ArbTBOarbTBO
 GL_ARB_texture_buffer_object. More...
 
Standard_Boolean arbTboRGB32
 GL_ARB_texture_buffer_object_rgb32 (3-component TBO), in core since 4.0. More...
 
OpenGl_ArbInsarbIns
 GL_ARB_draw_instanced. More...
 
OpenGl_ArbDbgarbDbg
 GL_ARB_debug_output. More...
 
OpenGl_ArbFBOarbFBO
 GL_ARB_framebuffer_object. More...
 
OpenGl_ArbFBOBlitarbFBOBlit
 glBlitFramebuffer function, moved out from OpenGl_ArbFBO structure for compatibility with OpenGL ES 2.0 More...
 
Standard_Boolean arbSampleShading
 GL_ARB_sample_shading. More...
 
Standard_Boolean extFragDepth
 GL_EXT_frag_depth on OpenGL ES 2.0 (gl_FragDepthEXT built-in variable, before OpenGL ES 3.0) More...
 
Standard_Boolean extDrawBuffers
 GL_EXT_draw_buffers. More...
 
OpenGl_ExtGSextGS
 GL_EXT_geometry_shader4. More...
 
Standard_Boolean extBgra
 GL_EXT_bgra or GL_EXT_texture_format_BGRA8888 on OpenGL ES. More...
 
Standard_Boolean extAnis
 GL_EXT_texture_filter_anisotropic. More...
 
Standard_Boolean extPDS
 GL_EXT_packed_depth_stencil. More...
 
Standard_Boolean atiMem
 GL_ATI_meminfo. More...
 
Standard_Boolean nvxMem
 GL_NVX_gpu_memory_info. More...
 
Standard_Boolean oesSampleVariables
 GL_OES_sample_variables. More...
 

methods to alter or retrieve current state

static Standard_Boolean CheckIsTransparent (const OpenGl_AspectFace *theAspect, const Handle< Graphic3d_PresentationAttributes > &theHighlight, Standard_ShortReal &theAlphaFront, Standard_ShortReal &theAlphaBack)
 Checks if transparency is required for the given aspect and highlight style. More...
 
static Standard_Boolean CheckIsTransparent (const OpenGl_AspectFace *theAspect, const Handle< Graphic3d_PresentationAttributes > &theHighlight)
 Checks if transparency is required for the given aspect and highlight style. More...
 
const Standard_IntegerViewport () const
 Return cached viewport definition (x, y, width, height). More...
 
void ResizeViewport (const Standard_Integer theRect[4])
 Resize the viewport (alias for glViewport). More...
 
const Standard_IntegerVirtualViewport () const
 Return virtual viewport definition (x, y, width, height). More...
 
Standard_Integer ReadBuffer ()
 Return active read buffer. More...
 
void SetReadBuffer (const Standard_Integer theReadBuffer)
 Switch read buffer, wrapper for ::glReadBuffer(). More...
 
Standard_Integer DrawBuffer (const Standard_Integer theIndex=0)
 Return active draw buffer attached to a render target referred by index (layout location). More...
 
void SetDrawBuffer (const Standard_Integer theDrawBuffer)
 Switch draw buffer, wrapper for ::glDrawBuffer(). More...
 
void SetDrawBuffers (const Standard_Integer theNb, const Standard_Integer *theDrawBuffers)
 Switch draw buffer, wrapper for ::glDrawBuffers (GLsizei, const GLenum*). More...
 
void SetReadDrawBuffer (const Standard_Integer theBuffer)
 Switch read/draw buffers. More...
 
bool ToCullBackFaces () const
 Return back face culling state. More...
 
void SetCullBackFaces (bool theToEnable)
 Enable or disable back face culling (glEnable (GL_CULL_FACE)). More...
 
void FetchState ()
 Fetch OpenGl context state. This class tracks value of several OpenGl state variables. Consulting the cached values is quicker than doing the same via OpenGl API. Call this method if any of the controlled OpenGl state variables has a possibility of being out-of-date. More...
 
const Handle< OpenGl_TextureSet > & ActiveTextures () const
 
Handle< OpenGl_TextureSetBindTextures (const Handle< OpenGl_TextureSet > &theTextures)
 Bind specified texture set to current context, or unbind previous one when NULL specified. More...
 
const Handle< OpenGl_ShaderProgram > & ActiveProgram () const
 
Standard_Boolean BindProgram (const Handle< OpenGl_ShaderProgram > &theProgram)
 Bind specified program to current context, or unbind previous one when NULL specified. More...
 
void SetShadingMaterial (const OpenGl_AspectFace *theAspect, const Handle< Graphic3d_PresentationAttributes > &theHighlight)
 Setup current shading material. More...
 
void SetColor4fv (const OpenGl_Vec4 &theColor)
 Setup current color. More...
 
void SetTypeOfLine (const Aspect_TypeOfLine theType, const Standard_ShortReal theFactor=1.0f)
 Setup type of line. More...
 
void SetLineWidth (const Standard_ShortReal theWidth)
 Setup width of line. More...
 
void SetPointSize (const Standard_ShortReal theSize)
 Setup point size. More...
 
void SetPointSpriteOrigin ()
 Setup point sprite origin using GL_POINT_SPRITE_COORD_ORIGIN state: More...
 
void SetTextureMatrix (const Handle< Graphic3d_TextureParams > &theParams)
 Setup texture matrix to active GLSL program or to FFP global state using glMatrixMode (GL_TEXTURE). More...
 
void BindDefaultVao ()
 Bind default Vertex Array Object. More...
 
const Handle< OpenGl_FrameBuffer > & DefaultFrameBuffer () const
 Default Frame Buffer Object. More...
 
Handle< OpenGl_FrameBufferSetDefaultFrameBuffer (const Handle< OpenGl_FrameBuffer > &theFbo)
 Setup new Default Frame Buffer Object and return previously set. This call doesn't change Active FBO! More...
 
Standard_Boolean IsDebugContext () const
 Return debug context initialization state. More...
 
void EnableFeatures () const
 Checks if transparency is required for the given aspect and highlight style. More...
 
void DisableFeatures () const
 Checks if transparency is required for the given aspect and highlight style. More...
 
unsigned int Resolution () const
 Return resolution for rendering text. More...
 
Standard_ShortReal ResolutionRatio () const
 Resolution scale factor (rendered resolution to standard resolution). This scaling factor for parameters like text size to be properly displayed on device (screen / printer). More...
 
Standard_ShortReal RenderScale () const
 Rendering scale factor (rendering viewport height to real window buffer height). More...
 
Standard_Boolean HasRenderScale () const
 Return TRUE if rendering scale factor is not 1. More...
 
Standard_ShortReal RenderScaleInv () const
 Rendering scale factor (inverted value). More...
 
void SetResolution (unsigned int theResolution, Standard_ShortReal theRatio, Standard_ShortReal theScale)
 Set resolution ratio. Note that this method rounds to nearest integer. More...
 
void SetResolutionRatio (const Standard_ShortReal theRatio)
 Set resolution ratio. Note that this method rounds to nearest integer. More...
 

public properties tracking current state

OpenGl_MatrixState< Standard_ShortRealModelWorldState
 state of orientation matrix More...
 
OpenGl_MatrixState< Standard_ShortRealWorldViewState
 state of orientation matrix More...
 
OpenGl_MatrixState< Standard_ShortRealProjectionState
 state of projection matrix More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 

Detailed Description

This class generalize access to the GL context and available extensions.

Functions related to specific OpenGL version or extension are grouped into structures which can be accessed as fields of this class. The most simple way to check that required functionality is available - is NULL check for the group:

if (myContext->core20 != NULL)
{
myGlProgram = myContext->core20->glCreateProgram();
.. do more stuff ..
}
else
{
.. compatibility with outdated configurations ..
}

Current implementation provide access to OpenGL core functionality up to 4.4 version (core12, core13, core14, core15, fields core20) as well as several extensions (arbTBO, arbFBO, etc.).

OpenGL context might be initialized in Core Profile. In this case deprecated functionality become unavailable. To make code easily adaptable to wide range of OpenGL versions, function sets related to each version has two kinds of suffixes:

To select which core** function set should be used in specific case:

Simplified extensions classification:

Notice that some systems provide mechanisms to simultaneously incorporate with GL contexts with different capabilities. For this reason OpenGl_Context should be initialized and used for each GL context independently.

Constructor & Destructor Documentation

◆ OpenGl_Context()

OpenGl_Context::OpenGl_Context ( const Handle< OpenGl_Caps > &  theCaps = NULL)

Empty constructor. You should call Init() to perform initialization with bound GL context.

◆ ~OpenGl_Context()

virtual OpenGl_Context::~OpenGl_Context ( )
virtual

Destructor.

Member Function Documentation

◆ ActiveProgram()

const Handle< OpenGl_ShaderProgram >& OpenGl_Context::ActiveProgram ( ) const
inline
Returns
active GLSL program

◆ ActiveTextures()

const Handle< OpenGl_TextureSet >& OpenGl_Context::ActiveTextures ( ) const
inline
Returns
active textures

◆ ApplyModelViewMatrix()

void OpenGl_Context::ApplyModelViewMatrix ( )

Applies combination of matrices stored in ModelWorldState and WorldViewState to OpenGl.

◆ ApplyModelWorldMatrix()

void OpenGl_Context::ApplyModelWorldMatrix ( )

Applies matrix stored in ModelWorldState to OpenGl.

◆ ApplyProjectionMatrix()

void OpenGl_Context::ApplyProjectionMatrix ( )

Applies matrix stored in ProjectionState to OpenGl.

◆ ApplyWorldViewMatrix()

void OpenGl_Context::ApplyWorldViewMatrix ( )

Applies matrix stored in WorldViewState to OpenGl.

◆ AvailableMemory()

Standard_Size OpenGl_Context::AvailableMemory ( ) const

This function retrieves information from GL about free GPU memory that is:

  • OS-dependent. On some OS it is per-process and on others - for entire system.
  • Vendor-dependent. Currently available only on NVIDIA and AMD/ATi drivers only.
  • Numbers meaning may vary. You should use this info only for diagnostics purposes.
    Returns
    free GPU dedicated memory in bytes.

◆ BindDefaultVao()

void OpenGl_Context::BindDefaultVao ( )

Bind default Vertex Array Object.

◆ BindProgram()

Standard_Boolean OpenGl_Context::BindProgram ( const Handle< OpenGl_ShaderProgram > &  theProgram)

Bind specified program to current context, or unbind previous one when NULL specified.

Returns
true if some program is bound to context

◆ BindTextures()

Handle< OpenGl_TextureSet > OpenGl_Context::BindTextures ( const Handle< OpenGl_TextureSet > &  theTextures)

Bind specified texture set to current context, or unbind previous one when NULL specified.

◆ ChangeClipping()

OpenGl_Clipping& OpenGl_Context::ChangeClipping ( )
inline
Returns
tool for management of clippings within this context.

◆ CheckExtension() [1/2]

Standard_Boolean OpenGl_Context::CheckExtension ( const char *  theExtName) const

Check if theExtName extension is supported by active GL context.

◆ CheckExtension() [2/2]

static Standard_Boolean OpenGl_Context::CheckExtension ( const char *  theExtString,
const char *  theExtName 
)
static

Check if theExtName extension is in extensions string.

◆ CheckIsTransparent() [1/2]

static Standard_Boolean OpenGl_Context::CheckIsTransparent ( const OpenGl_AspectFace theAspect,
const Handle< Graphic3d_PresentationAttributes > &  theHighlight,
Standard_ShortReal theAlphaFront,
Standard_ShortReal theAlphaBack 
)
static

Checks if transparency is required for the given aspect and highlight style.

◆ CheckIsTransparent() [2/2]

static Standard_Boolean OpenGl_Context::CheckIsTransparent ( const OpenGl_AspectFace theAspect,
const Handle< Graphic3d_PresentationAttributes > &  theHighlight 
)
inlinestatic

Checks if transparency is required for the given aspect and highlight style.

◆ Clipping()

const OpenGl_Clipping& OpenGl_Context::Clipping ( ) const
inline
Returns
tool for management of clippings within this context.

◆ DefaultFrameBuffer()

const Handle< OpenGl_FrameBuffer >& OpenGl_Context::DefaultFrameBuffer ( ) const
inline

Default Frame Buffer Object.

◆ DelayedRelease()

template<class T >
void OpenGl_Context::DelayedRelease ( Handle< T > &  theResource)
inline

Append resource to queue for delayed clean up. Resources in this queue will be released at next redraw call.

◆ DiagnosticInformation()

void OpenGl_Context::DiagnosticInformation ( TColStd_IndexedDataMapOfStringString theDict,
Graphic3d_DiagnosticInfo  theFlags 
) const

Fill in the dictionary with OpenGL info. Should be called with bound context.

◆ DisableFeatures()

void OpenGl_Context::DisableFeatures ( ) const

Checks if transparency is required for the given aspect and highlight style.

◆ DrawBuffer()

Standard_Integer OpenGl_Context::DrawBuffer ( const Standard_Integer  theIndex = 0)
inline

Return active draw buffer attached to a render target referred by index (layout location).

◆ EnableFeatures()

void OpenGl_Context::EnableFeatures ( ) const

Checks if transparency is required for the given aspect and highlight style.

◆ ExcludeMessage()

Standard_Boolean OpenGl_Context::ExcludeMessage ( const unsigned int  theSource,
const unsigned int  theId 
)

Adds a filter for messages with theId and theSource (GL_DEBUG_SOURCE_)

◆ FetchState()

void OpenGl_Context::FetchState ( )

Fetch OpenGl context state. This class tracks value of several OpenGl state variables. Consulting the cached values is quicker than doing the same via OpenGl API. Call this method if any of the controlled OpenGl state variables has a possibility of being out-of-date.

◆ FindProc()

template<typename FuncType_t >
Standard_Boolean OpenGl_Context::FindProc ( const char *  theFuncName,
FuncType_t &  theFuncPtr 
)
inline

Auxiliary template to retrieve GL function pointer. Pointer to function retrieved from library is statically casted to requested type - there no way to check real signature of exported function. The context should be bound before call.

◆ forcedRelease()

void OpenGl_Context::forcedRelease ( )

Release all resources, including shared ones.

◆ Functions()

const OpenGl_GlFunctions* OpenGl_Context::Functions ( ) const
inline

Access entire map of loaded OpenGL functions.

◆ GetPowerOfTwo()

static Standard_Integer OpenGl_Context::GetPowerOfTwo ( const Standard_Integer  theNumber,
const Standard_Integer  theThreshold 
)
inlinestatic

Function for getting power of to number larger or equal to input number.

Parameters
theNumbernumber to 'power of two'
theThresholdupper threshold
Returns
power of two number

◆ GetResource() [1/2]

const Handle< OpenGl_Resource >& OpenGl_Context::GetResource ( const TCollection_AsciiString theKey) const

Access shared resource by its name.

Parameters
theKey- unique identifier;
Returns
handle to shared resource or NULL.

◆ GetResource() [2/2]

template<typename TheHandleType >
Standard_Boolean OpenGl_Context::GetResource ( const TCollection_AsciiString theKey,
TheHandleType &  theValue 
) const
inline

Access shared resource by its name.

Parameters
theKey- unique identifier;
theValue- handle to fill;
Returns
true if resource was shared.

◆ HasRayTracing()

Standard_Boolean OpenGl_Context::HasRayTracing ( ) const
inline
Returns
TRUE if ray tracing mode is supported

◆ HasRayTracingAdaptiveSampling()

Standard_Boolean OpenGl_Context::HasRayTracingAdaptiveSampling ( ) const
inline
Returns
TRUE if adaptive screen sampling in ray tracing mode is supported

◆ HasRayTracingTextures()

Standard_Boolean OpenGl_Context::HasRayTracingTextures ( ) const
inline
Returns
TRUE if textures in ray tracing mode are supported

◆ HasRenderScale()

Standard_Boolean OpenGl_Context::HasRenderScale ( ) const
inline

Return TRUE if rendering scale factor is not 1.

◆ HasStereoBuffers()

Standard_Boolean OpenGl_Context::HasStereoBuffers ( ) const
inline
Returns
true if OpenGl context supports left and right rendering buffers.

◆ IncludeMessage()

Standard_Boolean OpenGl_Context::IncludeMessage ( const unsigned int  theSource,
const unsigned int  theId 
)

Removes a filter for messages with theId and theSource (GL_DEBUG_SOURCE_)

◆ Init() [1/2]

Standard_Boolean OpenGl_Context::Init ( const Standard_Boolean  theIsCoreProfile = Standard_False)

Initialize class from currently bound OpenGL context. Method should be called only once.

Returns
false if no GL context is bound to the current thread

◆ Init() [2/2]

Standard_Boolean OpenGl_Context::Init ( const Aspect_Drawable  theWindow,
const Aspect_Display  theDisplay,
const Aspect_RenderingContext  theGContext,
const Standard_Boolean  theIsCoreProfile = Standard_False 
)

Initialize class from specified window and rendering context. Method should be called only once.

Returns
false if OpenGL context can not be bound to specified window

◆ IsCurrent()

Standard_Boolean OpenGl_Context::IsCurrent ( ) const

This method uses system-dependent API to retrieve information about GL context bound to the current thread.

Returns
true if current thread is bound to this GL context

◆ IsDebugContext()

Standard_Boolean OpenGl_Context::IsDebugContext ( ) const
inline

Return debug context initialization state.

◆ IsFeedback()

Standard_Boolean OpenGl_Context::IsFeedback ( ) const
inline

Return true if active mode is GL_FEEDBACK (cached state)

◆ IsGlGreaterEqual()

Standard_Boolean OpenGl_Context::IsGlGreaterEqual ( const Standard_Integer  theVerMajor,
const Standard_Integer  theVerMinor 
) const
inline
Returns
true if detected GL version is greater or equal to requested one.

◆ IsGlNormalizeEnabled()

Standard_Boolean OpenGl_Context::IsGlNormalizeEnabled ( ) const
inline
Returns
cached state of GL_NORMALIZE.

◆ IsPolygonHatchEnabled()

bool OpenGl_Context::IsPolygonHatchEnabled ( ) const
inline
Returns
cached enabled state of polygon hatching rasterization.

◆ IsRender()

Standard_Boolean OpenGl_Context::IsRender ( ) const
inline

Return true if active mode is GL_RENDER (cached state)

◆ IsValid()

Standard_Boolean OpenGl_Context::IsValid ( ) const
inline
Returns
true if this context is valid (has been initialized)

◆ MakeCurrent()

Standard_Boolean OpenGl_Context::MakeCurrent ( )

Activates current context. Class should be initialized with appropriate info.

◆ MaxClipPlanes()

Standard_Integer OpenGl_Context::MaxClipPlanes ( ) const
inline

Get maximum number of clip planes supported by OpenGl. This value is implementation dependent. At least 6 planes should be supported by OpenGl (see specs).

Returns
value for GL_MAX_CLIP_PLANES

◆ MaxColorAttachments()

Standard_Integer OpenGl_Context::MaxColorAttachments ( ) const
inline
Returns
value for GL_MAX_COLOR_ATTACHMENTS

◆ MaxCombinedTextureUnits()

Standard_Integer OpenGl_Context::MaxCombinedTextureUnits ( ) const
inline
Returns
value for GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS

◆ MaxDegreeOfAnisotropy()

Standard_Integer OpenGl_Context::MaxDegreeOfAnisotropy ( ) const
inline
Returns
maximum degree of anisotropy texture filter

◆ MaxDrawBuffers()

Standard_Integer OpenGl_Context::MaxDrawBuffers ( ) const
inline
Returns
value for GL_MAX_DRAW_BUFFERS

◆ MaxMsaaSamples()

Standard_Integer OpenGl_Context::MaxMsaaSamples ( ) const
inline
Returns
value for GL_MAX_SAMPLES

◆ MaxTextureSize()

Standard_Integer OpenGl_Context::MaxTextureSize ( ) const
inline
Returns
value for GL_MAX_TEXTURE_SIZE

◆ MemoryInfo() [1/2]

TCollection_AsciiString OpenGl_Context::MemoryInfo ( ) const

This function retrieves information from GL about GPU memory and contains more vendor-specific values than AvailableMemory().

◆ MemoryInfo() [2/2]

void OpenGl_Context::MemoryInfo ( TColStd_IndexedDataMapOfStringString theDict) const

This function retrieves information from GL about GPU memory.

◆ Messenger()

const Handle< Message_Messenger >& OpenGl_Context::Messenger ( ) const
inline
Returns
messenger instance

◆ PolygonHatchStyle()

Standard_Integer OpenGl_Context::PolygonHatchStyle ( ) const
inline
Returns
cached state of polygon hatch type.

◆ PolygonMode()

Standard_Integer OpenGl_Context::PolygonMode ( ) const
inline
Returns
cached state of polygon rasterization mode (glPolygonMode()).

◆ PushMessage()

void OpenGl_Context::PushMessage ( const unsigned int  theSource,
const unsigned int  theType,
const unsigned int  theId,
const unsigned int  theSeverity,
const TCollection_ExtendedString theMessage 
)

Callback for GL_ARB_debug_output extension.

Parameters
theSourcemessage source within GL_DEBUG_SOURCE_ enumeration
theTypemessage type within GL_DEBUG_TYPE_ enumeration
theIdmessage ID within source
theSeveritymessage severity within GL_DEBUG_SEVERITY_ enumeration
theMessagethe message itself

◆ ReadBuffer()

Standard_Integer OpenGl_Context::ReadBuffer ( )
inline

Return active read buffer.

◆ ReadGlVersion()

static void OpenGl_Context::ReadGlVersion ( Standard_Integer theGlVerMajor,
Standard_Integer theGlVerMinor 
)
static

Read OpenGL version information from active context.

◆ ReleaseDelayed()

void OpenGl_Context::ReleaseDelayed ( )

Clean up the delayed release queue.

◆ ReleaseResource()

void OpenGl_Context::ReleaseResource ( const TCollection_AsciiString theKey,
const Standard_Boolean  theToDelay = Standard_False 
)

Release shared resource. If there are more than one reference to this resource (also used by some other existing object) then call will be ignored. This means that current object itself should nullify handle before this call. Notice that this is unrecommended operation at all and should be used only in case of fat resources to release memory for other needs.

Parameters
theKeyunique identifier
theToDelaypostpone release until next redraw call

◆ RenderScale()

Standard_ShortReal OpenGl_Context::RenderScale ( ) const
inline

Rendering scale factor (rendering viewport height to real window buffer height).

◆ RenderScaleInv()

Standard_ShortReal OpenGl_Context::RenderScaleInv ( ) const
inline

Rendering scale factor (inverted value).

◆ ResetErrors()

bool OpenGl_Context::ResetErrors ( const bool  theToPrintErrors = false)

Clean up errors stack for this GL context (glGetError() in loop).

Returns
true if some error has been cleared

◆ ResizeViewport()

void OpenGl_Context::ResizeViewport ( const Standard_Integer  theRect[4])

Resize the viewport (alias for glViewport).

Parameters
theRectviewport definition (x, y, width, height)

◆ Resolution()

unsigned int OpenGl_Context::Resolution ( ) const
inline

Return resolution for rendering text.

◆ ResolutionRatio()

Standard_ShortReal OpenGl_Context::ResolutionRatio ( ) const
inline

Resolution scale factor (rendered resolution to standard resolution). This scaling factor for parameters like text size to be properly displayed on device (screen / printer).

◆ SetColor4fv()

void OpenGl_Context::SetColor4fv ( const OpenGl_Vec4 theColor)

Setup current color.

◆ SetCullBackFaces()

void OpenGl_Context::SetCullBackFaces ( bool  theToEnable)

Enable or disable back face culling (glEnable (GL_CULL_FACE)).

◆ SetDefaultFrameBuffer()

Handle< OpenGl_FrameBuffer > OpenGl_Context::SetDefaultFrameBuffer ( const Handle< OpenGl_FrameBuffer > &  theFbo)

Setup new Default Frame Buffer Object and return previously set. This call doesn't change Active FBO!

◆ SetDrawBuffer()

void OpenGl_Context::SetDrawBuffer ( const Standard_Integer  theDrawBuffer)

Switch draw buffer, wrapper for ::glDrawBuffer().

◆ SetDrawBuffers()

void OpenGl_Context::SetDrawBuffers ( const Standard_Integer  theNb,
const Standard_Integer theDrawBuffers 
)

Switch draw buffer, wrapper for ::glDrawBuffers (GLsizei, const GLenum*).

◆ SetGlNormalizeEnabled()

Standard_Boolean OpenGl_Context::SetGlNormalizeEnabled ( Standard_Boolean  isEnabled)

Sets GL_NORMALIZE enabled or disabled.

Returns
old value of the flag

◆ SetLineWidth()

void OpenGl_Context::SetLineWidth ( const Standard_ShortReal  theWidth)

Setup width of line.

◆ SetPointSize()

void OpenGl_Context::SetPointSize ( const Standard_ShortReal  theSize)

Setup point size.

◆ SetPointSpriteOrigin()

void OpenGl_Context::SetPointSpriteOrigin ( )

Setup point sprite origin using GL_POINT_SPRITE_COORD_ORIGIN state:

  • GL_UPPER_LEFT when GLSL program is active; flipping should be handled in GLSL program for compatibility with OpenGL ES
  • GL_LOWER_LEFT for FFP

◆ SetPolygonHatchEnabled()

bool OpenGl_Context::SetPolygonHatchEnabled ( const bool  theIsEnabled)

Sets enabled state of polygon hatching rasterization without affecting currently selected hatching pattern.

Returns
previous state of polygon hatching mode.

◆ SetPolygonHatchStyle()

Standard_Integer OpenGl_Context::SetPolygonHatchStyle ( const Handle< Graphic3d_HatchStyle > &  theStyle)

Sets polygon hatch pattern. Zero-index value is a default alias for solid filling.

Parameters
thetype of hatch supported by base implementation of OpenGl_LineAttributes (Aspect_HatchStyle) or the type supported by custom implementation derived from OpenGl_LineAttributes class.
Returns
old type of hatch.

◆ SetPolygonMode()

Standard_Integer OpenGl_Context::SetPolygonMode ( const Standard_Integer  theMode)

Sets polygon rasterization mode (glPolygonMode() function).

Returns
old value of the rasterization mode.

◆ SetReadBuffer()

void OpenGl_Context::SetReadBuffer ( const Standard_Integer  theReadBuffer)

Switch read buffer, wrapper for ::glReadBuffer().

◆ SetReadDrawBuffer()

void OpenGl_Context::SetReadDrawBuffer ( const Standard_Integer  theBuffer)
inline

Switch read/draw buffers.

◆ SetResolution()

void OpenGl_Context::SetResolution ( unsigned int  theResolution,
Standard_ShortReal  theRatio,
Standard_ShortReal  theScale 
)
inline

Set resolution ratio. Note that this method rounds to nearest integer.

◆ SetResolutionRatio()

void OpenGl_Context::SetResolutionRatio ( const Standard_ShortReal  theRatio)
inline

Set resolution ratio. Note that this method rounds to nearest integer.

◆ SetShadingMaterial()

void OpenGl_Context::SetShadingMaterial ( const OpenGl_AspectFace theAspect,
const Handle< Graphic3d_PresentationAttributes > &  theHighlight 
)

Setup current shading material.

◆ SetSwapInterval()

Standard_Boolean OpenGl_Context::SetSwapInterval ( const Standard_Integer  theInterval)

Setup swap interval (VSync).

◆ SetTextureMatrix()

void OpenGl_Context::SetTextureMatrix ( const Handle< Graphic3d_TextureParams > &  theParams)

Setup texture matrix to active GLSL program or to FFP global state using glMatrixMode (GL_TEXTURE).

◆ SetTypeOfLine()

void OpenGl_Context::SetTypeOfLine ( const Aspect_TypeOfLine  theType,
const Standard_ShortReal  theFactor = 1.0f 
)

Setup type of line.

◆ ShaderManager()

const Handle< OpenGl_ShaderManager >& OpenGl_Context::ShaderManager ( ) const
inline
Returns
tool for management of shader programs within this context.

◆ Share()

void OpenGl_Context::Share ( const Handle< OpenGl_Context > &  theShareCtx)

Share GL context resources. theShareCtx - handle to context to retrieve handles to shared resources.

◆ ShareResource()

Standard_Boolean OpenGl_Context::ShareResource ( const TCollection_AsciiString theKey,
const Handle< OpenGl_Resource > &  theResource 
)

Register shared resource. Notice that after registration caller shouldn't release it by himself - it will be automatically released on context destruction.

Parameters
theKey- unique identifier, shouldn't be empty;
theResource- new resource to register, shouldn't be NULL.

◆ SwapBuffers()

void OpenGl_Context::SwapBuffers ( )

Swap front/back buffers for this GL context (should be activated before!).

◆ TextureWrapClamp()

Standard_Integer OpenGl_Context::TextureWrapClamp ( ) const
inline

Either GL_CLAMP_TO_EDGE (1.2+) or GL_CLAMP (1.1).

◆ ToCullBackFaces()

bool OpenGl_Context::ToCullBackFaces ( ) const
inline

Return back face culling state.

◆ ToUseVbo()

bool OpenGl_Context::ToUseVbo ( ) const
inline

Returns true if VBO is supported and permitted.

◆ VersionMajor()

Standard_Integer OpenGl_Context::VersionMajor ( ) const
inline

Return cached GL version major number.

◆ VersionMinor()

Standard_Integer OpenGl_Context::VersionMinor ( ) const
inline

Return cached GL version minor number.

◆ Viewport()

const Standard_Integer* OpenGl_Context::Viewport ( ) const
inline

Return cached viewport definition (x, y, width, height).

◆ VirtualViewport()

const Standard_Integer* OpenGl_Context::VirtualViewport ( ) const
inline

Return virtual viewport definition (x, y, width, height).

◆ Window()

Aspect_Drawable OpenGl_Context::Window ( ) const
inline
Returns
the window handle (GLXDrawable) currently bound to this OpenGL context

Field Documentation

◆ arbDbg

OpenGl_ArbDbg* OpenGl_Context::arbDbg

GL_ARB_debug_output.

◆ arbDrawBuffers

Standard_Boolean OpenGl_Context::arbDrawBuffers

GL_ARB_draw_buffers.

◆ arbFBO

OpenGl_ArbFBO* OpenGl_Context::arbFBO

GL_ARB_framebuffer_object.

◆ arbFBOBlit

OpenGl_ArbFBOBlit* OpenGl_Context::arbFBOBlit

glBlitFramebuffer function, moved out from OpenGl_ArbFBO structure for compatibility with OpenGL ES 2.0

◆ arbIns

OpenGl_ArbIns* OpenGl_Context::arbIns

GL_ARB_draw_instanced.

◆ arbNPTW

Standard_Boolean OpenGl_Context::arbNPTW

GL_ARB_texture_non_power_of_two.

◆ arbSamplerObject

OpenGl_ArbSamplerObject* OpenGl_Context::arbSamplerObject

GL_ARB_sampler_objects (on desktop OpenGL - since 3.3 or as extension GL_ARB_sampler_objects; on OpenGL ES - since 3.0)

◆ arbSampleShading

Standard_Boolean OpenGl_Context::arbSampleShading

GL_ARB_sample_shading.

◆ arbTBO

OpenGl_ArbTBO* OpenGl_Context::arbTBO

GL_ARB_texture_buffer_object.

◆ arbTboRGB32

Standard_Boolean OpenGl_Context::arbTboRGB32

GL_ARB_texture_buffer_object_rgb32 (3-component TBO), in core since 4.0.

◆ arbTexBindless

OpenGl_ArbTexBindless* OpenGl_Context::arbTexBindless

GL_ARB_bindless_texture.

◆ arbTexFloat

Standard_Boolean OpenGl_Context::arbTexFloat

GL_ARB_texture_float (on desktop OpenGL - since 3.0 or as extension GL_ARB_texture_float; on OpenGL ES - since 3.0)

◆ arbTexRG

Standard_Boolean OpenGl_Context::arbTexRG

GL_ARB_texture_rg.

◆ atiMem

Standard_Boolean OpenGl_Context::atiMem

GL_ATI_meminfo.

◆ caps

Handle< OpenGl_Caps > OpenGl_Context::caps

context options

◆ core11

OpenGl_GlCore11* OpenGl_Context::core11

OpenGL 1.1 core functionality.

◆ core11fwd

OpenGl_GlCore11Fwd* OpenGl_Context::core11fwd

OpenGL 1.1 without deprecated entry points.

◆ core15

OpenGl_GlCore15* OpenGl_Context::core15

OpenGL 1.5 core functionality.

◆ core15fwd

OpenGl_GlCore15Fwd* OpenGl_Context::core15fwd

OpenGL 1.5 without deprecated entry points.

◆ core20

OpenGl_GlCore20* OpenGl_Context::core20

OpenGL 2.0 core functionality (includes 1.5)

◆ core20fwd

OpenGl_GlCore20Fwd* OpenGl_Context::core20fwd

OpenGL 2.0 without deprecated entry points.

◆ core32

OpenGl_GlCore32* OpenGl_Context::core32

OpenGL 3.2 core profile.

◆ core32back

OpenGl_GlCore32Back* OpenGl_Context::core32back

OpenGL 3.2 backward compatibility profile.

◆ core33

OpenGl_GlCore33* OpenGl_Context::core33

OpenGL 3.3 core profile.

◆ core33back

OpenGl_GlCore33Back* OpenGl_Context::core33back

OpenGL 3.3 backward compatibility profile.

◆ core41

OpenGl_GlCore41* OpenGl_Context::core41

OpenGL 4.1 core profile.

◆ core41back

OpenGl_GlCore41Back* OpenGl_Context::core41back

OpenGL 4.1 backward compatibility profile.

◆ core42

OpenGl_GlCore42* OpenGl_Context::core42

OpenGL 4.2 core profile.

◆ core42back

OpenGl_GlCore42Back* OpenGl_Context::core42back

OpenGL 4.2 backward compatibility profile.

◆ core43

OpenGl_GlCore43* OpenGl_Context::core43

OpenGL 4.3 core profile.

◆ core43back

OpenGl_GlCore43Back* OpenGl_Context::core43back

OpenGL 4.3 backward compatibility profile.

◆ core44

OpenGl_GlCore44* OpenGl_Context::core44

OpenGL 4.4 core profile.

◆ core44back

OpenGl_GlCore44Back* OpenGl_Context::core44back

OpenGL 4.4 backward compatibility profile.

◆ extAnis

Standard_Boolean OpenGl_Context::extAnis

GL_EXT_texture_filter_anisotropic.

◆ extBgra

Standard_Boolean OpenGl_Context::extBgra

GL_EXT_bgra or GL_EXT_texture_format_BGRA8888 on OpenGL ES.

◆ extDrawBuffers

Standard_Boolean OpenGl_Context::extDrawBuffers

GL_EXT_draw_buffers.

◆ extFragDepth

Standard_Boolean OpenGl_Context::extFragDepth

GL_EXT_frag_depth on OpenGL ES 2.0 (gl_FragDepthEXT built-in variable, before OpenGL ES 3.0)

◆ extGS

OpenGl_ExtGS* OpenGl_Context::extGS

GL_EXT_geometry_shader4.

◆ extPDS

Standard_Boolean OpenGl_Context::extPDS

GL_EXT_packed_depth_stencil.

◆ hasDrawBuffers

OpenGl_FeatureFlag OpenGl_Context::hasDrawBuffers

Complex flag indicating support of multiple draw buffers (desktop OpenGL 2.0, OpenGL ES 3.0, GL_ARB_draw_buffers, GL_EXT_draw_buffers)

◆ hasFloatBuffer

OpenGl_FeatureFlag OpenGl_Context::hasFloatBuffer

Complex flag indicating support of float color buffer format (desktop OpenGL 3.0, GL_ARB_color_buffer_float, GL_EXT_color_buffer_float)

◆ hasHalfFloatBuffer

OpenGl_FeatureFlag OpenGl_Context::hasHalfFloatBuffer

Complex flag indicating support of half-float color buffer format (desktop OpenGL 3.0, GL_ARB_color_buffer_float, GL_EXT_color_buffer_half_float)

◆ hasHighp

Standard_Boolean OpenGl_Context::hasHighp

highp in GLSL ES fragment shader is supported

◆ hasSampleVariables

OpenGl_FeatureFlag OpenGl_Context::hasSampleVariables

Complex flag indicating support of MSAA variables in GLSL shader (desktop OpenGL 4.0, GL_ARB_sample_shading)

◆ hasTexRGBA8

Standard_Boolean OpenGl_Context::hasTexRGBA8

always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_rgb8_rgba8

◆ hasUintIndex

Standard_Boolean OpenGl_Context::hasUintIndex

GLuint for index buffer is supported (always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_element_index_uint)

◆ ModelWorldState

OpenGl_MatrixState<Standard_ShortReal> OpenGl_Context::ModelWorldState

state of orientation matrix

◆ nvxMem

Standard_Boolean OpenGl_Context::nvxMem

GL_NVX_gpu_memory_info.

◆ oesSampleVariables

Standard_Boolean OpenGl_Context::oesSampleVariables

GL_OES_sample_variables.

◆ ProjectionState

OpenGl_MatrixState<Standard_ShortReal> OpenGl_Context::ProjectionState

state of projection matrix

◆ WorldViewState

OpenGl_MatrixState<Standard_ShortReal> OpenGl_Context::WorldViewState

state of orientation matrix


The documentation for this class was generated from the following file: