mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023428: Extend OpenGl_Context to use Geometry Shaders extension
Additional corrective integration
This commit is contained in:
parent
d891ede670
commit
37eb478791
@ -28,6 +28,7 @@
|
|||||||
#include <OpenGl_ArbTBO.hxx>
|
#include <OpenGl_ArbTBO.hxx>
|
||||||
#include <OpenGl_ArbIns.hxx>
|
#include <OpenGl_ArbIns.hxx>
|
||||||
#include <OpenGl_ExtFBO.hxx>
|
#include <OpenGl_ExtFBO.hxx>
|
||||||
|
#include <OpenGl_ExtGS.hxx>
|
||||||
#include <OpenGl_GlCore20.hxx>
|
#include <OpenGl_GlCore20.hxx>
|
||||||
|
|
||||||
#include <Standard_ProgramError.hxx>
|
#include <Standard_ProgramError.hxx>
|
||||||
@ -77,6 +78,7 @@ OpenGl_Context::OpenGl_Context()
|
|||||||
arbTBO (NULL),
|
arbTBO (NULL),
|
||||||
arbIns (NULL),
|
arbIns (NULL),
|
||||||
extFBO (NULL),
|
extFBO (NULL),
|
||||||
|
extGS (NULL),
|
||||||
atiMem (Standard_False),
|
atiMem (Standard_False),
|
||||||
nvxMem (Standard_False),
|
nvxMem (Standard_False),
|
||||||
mySharedResources (new OpenGl_ResourcesMap()),
|
mySharedResources (new OpenGl_ResourcesMap()),
|
||||||
@ -125,6 +127,7 @@ OpenGl_Context::~OpenGl_Context()
|
|||||||
delete myGlCore20;
|
delete myGlCore20;
|
||||||
delete arbVBO;
|
delete arbVBO;
|
||||||
delete extFBO;
|
delete extFBO;
|
||||||
|
delete extGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
@ -530,6 +533,18 @@ void OpenGl_Context::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// initialize GS extension (EXT)
|
||||||
|
if (CheckExtension ("GL_EXT_geometry_shader4"))
|
||||||
|
{
|
||||||
|
extGS = new OpenGl_ExtGS();
|
||||||
|
memset (extGS, 0, sizeof(OpenGl_ExtGS)); // nullify whole structure
|
||||||
|
if (!FindProcShort (extGS, glProgramParameteriEXT))
|
||||||
|
{
|
||||||
|
delete extGS;
|
||||||
|
extGS = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
myGlCore20 = new OpenGl_GlCore20();
|
myGlCore20 = new OpenGl_GlCore20();
|
||||||
memset (myGlCore20, 0, sizeof(OpenGl_GlCore20)); // nullify whole structure
|
memset (myGlCore20, 0, sizeof(OpenGl_GlCore20)); // nullify whole structure
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ struct OpenGl_ArbVBO;
|
|||||||
struct OpenGl_ArbTBO;
|
struct OpenGl_ArbTBO;
|
||||||
struct OpenGl_ArbIns;
|
struct OpenGl_ArbIns;
|
||||||
struct OpenGl_ExtFBO;
|
struct OpenGl_ExtFBO;
|
||||||
|
struct OpenGl_ExtGS;
|
||||||
|
|
||||||
//! This class generalize access to the GL context and available extensions.
|
//! This class generalize access to the GL context and available extensions.
|
||||||
//!
|
//!
|
||||||
@ -234,6 +235,7 @@ public: // extensions
|
|||||||
OpenGl_ArbTBO* arbTBO; //!< GL_ARB_texture_buffer_object
|
OpenGl_ArbTBO* arbTBO; //!< GL_ARB_texture_buffer_object
|
||||||
OpenGl_ArbIns* arbIns; //!< GL_ARB_draw_instanced
|
OpenGl_ArbIns* arbIns; //!< GL_ARB_draw_instanced
|
||||||
OpenGl_ExtFBO* extFBO; //!< GL_EXT_framebuffer_object
|
OpenGl_ExtFBO* extFBO; //!< GL_EXT_framebuffer_object
|
||||||
|
OpenGl_ExtGS* extGS; //!< GL_EXT_geometry_shader4
|
||||||
Standard_Boolean atiMem; //!< GL_ATI_meminfo
|
Standard_Boolean atiMem; //!< GL_ATI_meminfo
|
||||||
Standard_Boolean nvxMem; //!< GL_NVX_gpu_memory_info
|
Standard_Boolean nvxMem; //!< GL_NVX_gpu_memory_info
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user