mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023226: Extend OpenGl_Context to store map of shared GPU resources
OpenGl_Resource was slightly corrected and OpenGl_Element was extended with Release method to manage GPU resources. OpenGl_PrimitiveArray now uses new OpenGl_VertexBuffer class (requires OpenGL 1.5+). Strange workarounds for feedback mode were removed. OpenGl_Context now provides access to shared GPU resources and manages resources queue for delayed release (replaces functionality of removed OpenGl_ResourceCleaner). Loaded GL_ARB_texture_buffer_object and GL_ARB_draw_instanced extensions. Global maps of views, workspaces and structures were moved to OpenGl_GraphicDriver members. UserDrawCallback() function moved to OpenGl_GraphicDriver methods. Aspect_GraphicCallbackStruct now holds handle of OpenGl_Context instead of system-dependent pointers to GL context definition. New classes NCollection_Vec2, NCollection_Vec3 and NCollection_Vec4 implements interface to low-level data (points, vertices, colors) in GLSL-style. Removed EnableVBO argument from vdrawparray Draw Harness command Corrected compilation errors Fixed wrong argument in Index VBO initialization Fixed several cases of incorrect memory management in TKV3d Visual3d_ViewManager::Remove() Destroy structures before last view removed for correct GPU resources management. Graphic3d_Structure::GraphicClear() Remove groups to avoid usage of dead OpenGl_Group pointers. V3d_View::Remove() Fixed mistake in #0000280 patch. Small correction Fixed OCC280 test command Replace removed view within created one in ViewerTest EventManager. ViewerTest, do not create unused 3D view In current design NIS_View always created and used for both - NIS objects and AIS objects.
This commit is contained in:
@@ -15,18 +15,13 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
/*============================================================================*/
|
||||
/*==== Titre: Aspect_GraphicCallbackProc.hxx */
|
||||
/*==== Role : The header file of primitive type "GraphicCallbackProc" from package */
|
||||
/*==== "V3d" */
|
||||
/*==== Implementation: This is a primitive type implemented with typedef */
|
||||
/*============================================================================*/
|
||||
|
||||
#ifndef _Aspect_GraphicCallbackProc_HeaderFile
|
||||
#define _Aspect_GraphicCallbackProc_HeaderFile
|
||||
|
||||
#include <Aspect_Display.hxx>
|
||||
#include <Aspect_Drawable.hxx>
|
||||
#include <Aspect_RenderingContext.hxx>
|
||||
#include <Handle_Standard_Transient.hxx>
|
||||
|
||||
// The flags below provide additional information to define the moment when
|
||||
// callback was invoked in redraw procedure. These flags are bitwise OR'ed
|
||||
@@ -42,29 +37,20 @@
|
||||
// mask for all additional callbacks that invoked in process of redrawing
|
||||
#define OCC_REDRAW_ADDITIONAL_CALLBACKS ( OCC_PRE_REDRAW | OCC_PRE_OVERLAY )
|
||||
|
||||
typedef struct {
|
||||
int reason;
|
||||
int wsID;
|
||||
int viewID;
|
||||
Aspect_Display display;
|
||||
Aspect_Drawable window;
|
||||
Aspect_RenderingContext gcontext;
|
||||
} Aspect_GraphicCallbackStruct;
|
||||
typedef struct
|
||||
{
|
||||
int reason;
|
||||
int wsID;
|
||||
int viewID;
|
||||
Handle(Standard_Transient) glContext;
|
||||
} Aspect_GraphicCallbackStruct;
|
||||
|
||||
typedef int (*Aspect_GraphicCallbackProc)(
|
||||
Aspect_Drawable /* Window ID */,
|
||||
void* /* user data */,
|
||||
Aspect_GraphicCallbackStruct* /* call data */
|
||||
);
|
||||
// Prototype for callback function to perform custom drawing within the same window and GL context.
|
||||
typedef int (*Aspect_GraphicCallbackProc) (Aspect_Drawable theWindowID,
|
||||
void* theUserData,
|
||||
Aspect_GraphicCallbackStruct* theCallData);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
/*==== Definition de Type ====================================================*/
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
class Handle(Standard_Type);
|
||||
const Handle(Standard_Type)& STANDARD_TYPE(Aspect_GraphicCallbackProc);
|
||||
|
||||
/*============================================================================*/
|
||||
#endif
|
||||
|
||||
#endif /* _Aspect_GraphicCallbackProc_HeaderFile */
|
||||
|
Reference in New Issue
Block a user