Added missing function for GLX_EXT_swap_control
[LazOpenGLCore.git] / dglOpenGL.pas
index d860acc..09fd40d 100644 (file)
@@ -2,7 +2,6 @@
 
        OpenGL 4.5 - Headertranslation
        Version 4.5
-       Date : 2014/08/23
 
        Supported environments and targets :
         - (Win32) Delphi 4 and up
@@ -306,13 +305,16 @@ type
   p_cl_context = ^_cl_context;
   p_cl_event = ^_cl_event;
 
+  // GL_ARB_compute_variable_group_size
+  TglDispatchComputeGroupSizeARB = procedure (num_groups_x : GLuint; num_groups_y : GLuint; num_groups_z : GLuint; group_size_x : GLuint; group_size_y : GLuint; group_size_z : GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
+
   // GL_ARB_debug_output
   TglDebugProcARB = procedure (source: GLenum; type_: GLenum; id: GLuint; severity: GLenum; length: GLsizei; const message_: PGLchar; userParam: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
 
   // GL_AMD_debug_output
   TglDebugProcAMD = procedure (id: GLuint; category: GLenum; severity: GLenum; length: GLsizei; const message_: PGLchar; userParam: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
 
-       // (4.3) GL_KHR_debug
+  // GL_KHR_debug (4.3)
   TglDebugProc = procedure(source : GLEnum; type_ : GLEnum; id : GLUInt; severity : GLUInt; length : GLsizei; const message_ : PGLCHar; userParam : PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
 
   // GL_NV_vdpau_interop
@@ -667,6 +669,7 @@ var
   GL_ARB_texture_barrier,
 
   GL_ARB_cl_event,
+  GL_ARB_compute_variable_group_size,
   GL_ARB_debug_output,
   GL_ARB_robustness,
   GL_ARB_shader_stencil_export,
@@ -3423,6 +3426,12 @@ const
   GLX_RGBA_FLOAT_TYPE = $20B9;
   GLX_RGBA_FLOAT_BIT = $00000004;
 
+  // GL_ARB_compute_variable_group_size
+  GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = $9344;
+  GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = $90EB;
+  GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = $9345;
+  GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = $91BF;
+
   // GL_ARB_half_float_pixel
   GL_HALF_FLOAT_ARB = $140B;
 
@@ -7212,6 +7221,9 @@ const
   WGL_AUX8_ARB = $208F;
   WGL_AUX9_ARB = $2090;
 
+  // WGL_ARB_robustness_application_isolation
+  WGL_CONTEXT_RESET_ISOLATION_BIT_ARB = $00000008;
+
   // WGL_ARB_create_context
   WGL_CONTEXT_DEBUG_BIT_ARB = $00000001;
   WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = $00000002;
@@ -7500,6 +7512,9 @@ const
   GLX_SAMPLE_BUFFERS_ARB = 100000;
   GLX_SAMPLES_ARB = 100001;
 
+  // GLX_ARB_robustness_application_isolation
+  GLX_CONTEXT_RESET_ISOLATION_BIT_ARB = $00000008;
+
   // GLX_ARB_fbconfig_float
   GLX_RGBA_FLOAT_TYPE_ARB = $20B9;
   GLX_RGBA_FLOAT_BIT_ARB = $00000004;
@@ -9120,7 +9135,7 @@ type
   TglClearNamedBufferDataEXT = procedure(buffer : GLuint; internalformat : GLenum; format : GLEnum; type_ : GLEnum; const data : Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
   TglClearNamedBufferSubDataEXT = procedure(buffer : GLuint; internalformat : GLenum; format : GLenum; type_ : GLenum; offset : GLsizeiptr; size : GLsizeiptr; const data : Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
 
-  // GL_ARB_compute_shader 1
+  // GL_ARB_compute_shader
   TglDispatchCompute = procedure(num_groups_x : GLuint; num_groups_y : GLuint; num_groups_z : GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
   TglDispatchComputeIndirect = procedure(indirect : GLintptr); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
 
@@ -11122,6 +11137,8 @@ type
   // GLX_EXT_texture_from_pixmap
   TglXBindTexImageEXT = procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: GLint; const attrib_list: PGLint); cdecl;
   TglXReleaseTexImageEXT = procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: GLint); cdecl;
+
+  TglXSwapIntervalEXT = procedure (dpy : PDisplay; drawable : GLXDrawable; interval : GLint); cdecl;
 {$ENDIF}
 
   // GL utility functions and procedures
@@ -12736,6 +12753,9 @@ var
   glDebugMessageCallbackARB: TglDebugMessageCallbackARB;
   glGetDebugMessageLogARB: TglGetDebugMessageLogARB;
 
+  // GL_ARB_compute_variable_group_size
+  glDispatchComputeGroupSizeARB : TglDispatchComputeGroupSizeARB;
+
   // GL_ARB_robustness
   glGetGraphicsResetStatusARB: TglGetGraphicsResetStatusARB;
   glGetnMapdvARB: TglGetnMapdvARB;
@@ -14482,6 +14502,8 @@ var
   // GLX_EXT_texture_from_pixmap
   glXBindTexImageEXT: TglXBindTexImageEXT;
   glXReleaseTexImageEXT: TglXReleaseTexImageEXT;
+
+  glXSwapIntervalEXT : TglXSwapIntervalEXT;
 {$ENDIF}
 
   // GL utility functions and procedures
@@ -14666,6 +14688,7 @@ procedure Read_GL_4_5;
 
 //
 procedure Read_GL_ARB_cl_event;
+procedure Read_GL_ARB_compute_variable_group_size;
 procedure Read_GL_ARB_debug_output;
 procedure Read_GL_ARB_robustness;
 procedure Read_GL_ATI_draw_buffers;
@@ -15117,6 +15140,8 @@ begin
       // GLX_EXT_texture_from_pixmap
       glXBindTexImageEXT := dglGetProcAddress('glXBindTexImageEXT');
       glXReleaseTexImageEXT := dglGetProcAddress('glXReleaseTexImageEXT');
+
+      glXSwapIntervalEXT := dglGetProcAddress('glXSwapIntervalEXT');
     {$ENDIF}
 
     Result := True;
@@ -17083,6 +17108,11 @@ begin
   glCreateSyncFromCLeventARB := dglGetProcAddress('glCreateSyncFromCLeventARB');
 end;
 
+procedure Read_GL_ARB_compute_variable_group_size;
+begin
+  glDispatchComputeGroupSizeARB := dglGetProcAddress('glDispatchComputeGroupSizeARB');
+end;
+
 procedure Read_GL_ARB_debug_output;
 begin
   glDebugMessageControlARB := dglGetProcAddress('glDebugMessageControlARB');
@@ -19055,6 +19085,7 @@ begin
   Read_GL_ARB_vertex_attrib_64bit;
   Read_GL_ARB_viewport_array;
   Read_GL_ARB_cl_event;
+  Read_GL_ARB_compute_variable_group_size;
   Read_GL_ARB_debug_output;
   Read_GL_ARB_robustness;
   //
@@ -19522,6 +19553,7 @@ begin
   GL_ARB_shader_precision := Int_CheckExtension(Buffer, 'GL_ARB_shader_precision');
   GL_ARB_vertex_attrib_64bit := Int_CheckExtension(Buffer, 'GL_ARB_vertex_attrib_64bit');
   GL_ARB_viewport_array := Int_CheckExtension(Buffer, 'GL_ARB_viewport_array');
+  GL_ARB_compute_variable_group_size := Int_CheckExtension(Buffer, 'GL_ARB_compute_variable_group_size');
 
   // GL 4.2
   GL_ARB_base_instance := Int_CheckExtension(Buffer, 'GL_ARB_base_instance');