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:
@@ -50,16 +50,6 @@ typedef enum {
|
||||
TelTriangleFansArrayType
|
||||
} TelPrimitivesArrayType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VBOEdges,
|
||||
VBOVertices,
|
||||
VBOVcolours,
|
||||
VBOVnormals,
|
||||
VBOVtexels,
|
||||
VBOMaxType
|
||||
} VBODataType;
|
||||
|
||||
typedef struct {
|
||||
TelPrimitivesArrayType type; /* Array type */
|
||||
Tint format; /* Array datas format */
|
||||
@@ -75,17 +65,6 @@ typedef struct {
|
||||
tel_texture_coord vtexels; /* Texture Coordinates */
|
||||
Tchar *edge_vis; /* Edge visibility flag*/
|
||||
Tchar *keys; /* Vertex keys*/
|
||||
Tuint bufferVBO[VBOMaxType]; /* VBO IDs for *edges, vertices, vcolours, vnormals, vtexels.
|
||||
default = -1. VBO - Vertex Buffer Object */
|
||||
Tint flagBufferVBO; /* this flag is responded for bufferVBO load status.
|
||||
-1 - Not Initial BufferVBO. Default mean.
|
||||
0 - Error by allocated memory in Graphic Device.
|
||||
Not Initial BufferVBO.
|
||||
1 - Initial BufferVBO */
|
||||
Tint VBOEnabled; /* -1 - it is not known VBO status
|
||||
0 - draw object without VBO
|
||||
1 - draw object with VBO */
|
||||
Standard_Address contextId; /* remember context for VBO */
|
||||
} CALL_DEF_PARRAY;
|
||||
|
||||
#endif /* _InterfaceGraphic_PrimitiveArray_header_file_ */
|
||||
|
Reference in New Issue
Block a user