class OpenGl_Sampler;
class OpenGl_ShaderProgram;
class OpenGl_ShaderManager;
+class OpenGl_FrameStats;
enum OpenGl_FeatureFlag
{
friend class OpenGl_Window;
public:
+ typedef NCollection_Shared< NCollection_DataMap<TCollection_AsciiString, Handle(OpenGl_Resource)> > OpenGl_ResourcesMap;
+
//! Function for getting power of to number larger or equal to input number.
//! @param theNumber number to 'power of two'
//! @param theThreshold upper threshold
//! Clean up the delayed release queue.
Standard_EXPORT void ReleaseDelayed();
+ //! Return map of shared resources.
+ const OpenGl_ResourcesMap& SharedResources() const { return *mySharedResources; }
+
//! @return tool for management of clippings within this context.
inline OpenGl_Clipping& ChangeClipping() { return myClippingState; }
public: //! @name methods to alter or retrieve current state
+ //! Return structure holding frame statistics.
+ const Handle(OpenGl_FrameStats)& FrameStats() const { return myFrameStats; }
+
//! Return cached viewport definition (x, y, width, height).
const Standard_Integer* Viewport() const { return myViewport; }
private: // context info
typedef NCollection_Shared< NCollection_DataMap<TCollection_AsciiString, Standard_Integer> > OpenGl_DelayReleaseMap;
- typedef NCollection_Shared< NCollection_DataMap<TCollection_AsciiString, Handle(OpenGl_Resource)> > OpenGl_ResourcesMap;
typedef NCollection_Shared< NCollection_List<Handle(OpenGl_Resource)> > OpenGl_ResourcesStack;
typedef NCollection_SparseArray<Standard_Integer> OpenGl_DrawBuffers;
private: //! @name fields tracking current state
+ Handle(OpenGl_FrameStats) myFrameStats; //!< structure accumulating frame statistics
Handle(OpenGl_ShaderProgram) myActiveProgram; //!< currently active GLSL program
Handle(OpenGl_TextureSet) myActiveTextures; //!< currently bound textures
//!< currently active sampler objects