All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GlfContextCaps Class Reference

#include <contextCaps.h>

Static Public Member Functions

static GLF_API void InitInstance ()
static GLF_API const
GetInstance ()

Public Attributes

int glVersion
bool coreProfile
int maxArrayTextureLayers
int maxUniformBlockSize
int maxShaderStorageBlockSize
int maxTextureBufferSize
int uniformBufferOffsetAlignment
bool arrayTexturesEnabled
bool shaderStorageBufferEnabled
bool bufferStorageEnabled
bool directStateAccessEnabled
bool multiDrawIndirectEnabled
bool bindlessTextureEnabled
bool bindlessBufferEnabled
int glslVersion
bool explicitUniformLocation
bool shadingLanguage420pack
bool shaderDrawParametersEnabled
bool copyBufferEnabled
bool floatingPointBuffersEnabled


class TfSingleton< GlfContextCaps >

Detailed Description

This class is intended to be a cache of the capabilites (resource limits and features) of the underlying GL context.

It serves two purposes. Firstly to reduce driver transition overhead of querying these values. Secondly to provide access to these values from other threads that don't have the context bound.

In the event of failure (InitInstance() wasn't called or an issue accessing the GL context), a reasonable set of defaults, based on GL minimums, is provided.

TO DO (bug #124971):

  • LoadCaps() should be called whenever the context changes.
  • Provide a mechanism where other Hd systems can subscribe to when the caps changes, so they can update and invalidate.

Definition at line 58 of file contextCaps.h.

Member Function Documentation

static GLF_API const GlfContextCaps& GlfContextCaps::GetInstance ( )

GetInstance() returns the filled capabilities structure. This function will not populate the caps and will issue a coding error if it hasn't been filled.

static GLF_API void GlfContextCaps::InitInstance ( )

InitInstance queries the GL context for its capabilities. It should be called by the application before using systems that depend on the caps, such as Hydra. A good example would be to pair the call to initialize after a call to GlfGlewInit().

Friends And Related Function Documentation

friend class TfSingleton< GlfContextCaps >

Definition at line 120 of file contextCaps.h.

Member Data Documentation

bool GlfContextCaps::arrayTexturesEnabled

Definition at line 91 of file contextCaps.h.

bool GlfContextCaps::bindlessBufferEnabled

Definition at line 98 of file contextCaps.h.

bool GlfContextCaps::bindlessTextureEnabled

Definition at line 97 of file contextCaps.h.

bool GlfContextCaps::bufferStorageEnabled

Definition at line 93 of file contextCaps.h.

bool GlfContextCaps::copyBufferEnabled

Definition at line 107 of file contextCaps.h.

bool GlfContextCaps::coreProfile

Definition at line 81 of file contextCaps.h.

bool GlfContextCaps::directStateAccessEnabled

Definition at line 94 of file contextCaps.h.

bool GlfContextCaps::explicitUniformLocation

Definition at line 102 of file contextCaps.h.

bool GlfContextCaps::floatingPointBuffersEnabled

Definition at line 109 of file contextCaps.h.

int GlfContextCaps::glslVersion

Definition at line 101 of file contextCaps.h.

int GlfContextCaps::glVersion

Definition at line 78 of file contextCaps.h.

int GlfContextCaps::maxArrayTextureLayers

Definition at line 84 of file contextCaps.h.

int GlfContextCaps::maxShaderStorageBlockSize

Definition at line 86 of file contextCaps.h.

int GlfContextCaps::maxTextureBufferSize

Definition at line 87 of file contextCaps.h.

int GlfContextCaps::maxUniformBlockSize

Definition at line 85 of file contextCaps.h.

bool GlfContextCaps::multiDrawIndirectEnabled

Definition at line 95 of file contextCaps.h.

bool GlfContextCaps::shaderDrawParametersEnabled

Definition at line 104 of file contextCaps.h.

bool GlfContextCaps::shaderStorageBufferEnabled

Definition at line 92 of file contextCaps.h.

bool GlfContextCaps::shadingLanguage420pack

Definition at line 103 of file contextCaps.h.

int GlfContextCaps::uniformBufferOffsetAlignment

Definition at line 88 of file contextCaps.h.

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