#endif
#endif
- memset (myFuncs.operator->(), 0, sizeof(OpenGl_GlFunctions));
+ memset (myFuncs.get(), 0, sizeof(OpenGl_GlFunctions));
myShaderManager = new OpenGl_ShaderManager (this);
}
// function : GetBufferSubData
// purpose :
// =======================================================================
-bool OpenGl_Context::GetBufferSubData (GLenum theTarget, GLintptr theOffset, GLsizeiptr theSize, void* theData)
+bool OpenGl_Context::GetBufferSubData (unsigned int theTarget, intptr_t theOffset, intptr_t theSize, void* theData)
{
if (!hasGetBufferData)
{
#include <TColStd_IndexedDataMapOfStringString.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
#include <OpenGl_Clipping.hxx>
-#include <OpenGl_GlCore11.hxx>
#include <NCollection_Shared.hxx>
+#include <memory>
+
//! Forward declarations
#if defined(__APPLE__)
#import <TargetConditionals.h>
struct OpenGl_ArbTexBindless;
struct OpenGl_ExtGS;
+struct OpenGl_GlCore11Fwd;
+struct OpenGl_GlCore11;
struct OpenGl_GlCore12;
struct OpenGl_GlCore13;
struct OpenGl_GlCore14;
Standard_Integer VersionMinor() const { return myGlVerMinor; }
//! Access entire map of loaded OpenGL functions.
- const OpenGl_GlFunctions* Functions() const { return myFuncs.operator->(); }
+ const OpenGl_GlFunctions* Functions() const { return myFuncs.get(); }
//! Clean up errors stack for this GL context (glGetError() in loop).
//! @return true if some error has been cleared
return theIndex >= myDrawBuffers.Lower()
&& theIndex <= myDrawBuffers.Upper()
? myDrawBuffers.Value (theIndex)
- : GL_NONE;
+ : 0; // GL_NONE
}
//! Switch draw buffer, wrapper for ::glDrawBuffer().
//! - OpenGL 1.5+ (desktop) via glGetBufferSubData();
//! - OpenGL ES 3.0+ via glMapBufferRange();
//! - WebGL 2.0+ via gl.getBufferSubData().
- //! @param theTarget [in] target buffer to map
- //! @param theOffset [in] offset to the beginning of sub-data
- //! @param theSize [in] number of bytes to read
- //! @param theData [out] destination pointer to fill
+ //! @param[in] theTarget target buffer to map {GLenum}
+ //! @param[in] theOffset offset to the beginning of sub-data {GLintptr}
+ //! @param[in] theSize number of bytes to read {GLsizeiptr}
+ //! @param[out] theData destination pointer to fill
//! @return FALSE if functionality is unavailable
- Standard_EXPORT bool GetBufferSubData (GLenum theTarget, GLintptr theOffset, GLsizeiptr theSize, void* theData);
+ Standard_EXPORT bool GetBufferSubData (unsigned int theTarget, intptr_t theOffset, intptr_t theSize, void* theData);
//! Return Graphics Driver's vendor.
const TCollection_AsciiString& Vendor() const { return myVendor; }
OpenGl_Clipping myClippingState; //!< state of clip planes
void* myGlLibHandle; //!< optional handle to GL library
- NCollection_Handle<OpenGl_GlFunctions>
+ std::unique_ptr<OpenGl_GlFunctions>
myFuncs; //!< mega structure for all GL functions
Aspect_GraphicsLibrary myGapi; //!< GAPI name
Handle(Image_SupportedFormats)