glx.def 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # This is the definition file for all GLX stuff
  2. %COPY_INTERFACE
  3. // ===================================================================
  4. // GLX consts, types and functions
  5. // ===================================================================
  6. // Tokens for glXChooseVisual and glXGetConfig:
  7. const
  8. GLX_USE_GL = 1;
  9. GLX_BUFFER_SIZE = 2;
  10. GLX_LEVEL = 3;
  11. GLX_RGBA = 4;
  12. GLX_DOUBLEBUFFER = 5;
  13. GLX_STEREO = 6;
  14. GLX_AUX_BUFFERS = 7;
  15. GLX_RED_SIZE = 8;
  16. GLX_GREEN_SIZE = 9;
  17. GLX_BLUE_SIZE = 10;
  18. GLX_ALPHA_SIZE = 11;
  19. GLX_DEPTH_SIZE = 12;
  20. GLX_STENCIL_SIZE = 13;
  21. GLX_ACCUM_RED_SIZE = 14;
  22. GLX_ACCUM_GREEN_SIZE = 15;
  23. GLX_ACCUM_BLUE_SIZE = 16;
  24. GLX_ACCUM_ALPHA_SIZE = 17;
  25. // GLX_EXT_visual_info extension
  26. GLX_X_VISUAL_TYPE_EXT = $22;
  27. GLX_TRANSPARENT_TYPE_EXT = $23;
  28. GLX_TRANSPARENT_INDEX_VALUE_EXT = $24;
  29. GLX_TRANSPARENT_RED_VALUE_EXT = $25;
  30. GLX_TRANSPARENT_GREEN_VALUE_EXT = $26;
  31. GLX_TRANSPARENT_BLUE_VALUE_EXT = $27;
  32. GLX_TRANSPARENT_ALPHA_VALUE_EXT = $28;
  33. // Error codes returned by glXGetConfig:
  34. GLX_BAD_SCREEN = 1;
  35. GLX_BAD_ATTRIBUTE = 2;
  36. GLX_NO_EXTENSION = 3;
  37. GLX_BAD_VISUAL = 4;
  38. GLX_BAD_CONTEXT = 5;
  39. GLX_BAD_VALUE = 6;
  40. GLX_BAD_ENUM = 7;
  41. // GLX 1.1 and later:
  42. GLX_VENDOR = 1;
  43. GLX_VERSION = 2;
  44. GLX_EXTENSIONS = 3;
  45. // GLX_visual_info extension
  46. GLX_TRUE_COLOR_EXT = $8002;
  47. GLX_DIRECT_COLOR_EXT = $8003;
  48. GLX_PSEUDO_COLOR_EXT = $8004;
  49. GLX_STATIC_COLOR_EXT = $8005;
  50. GLX_GRAY_SCALE_EXT = $8006;
  51. GLX_STATIC_GRAY_EXT = $8007;
  52. GLX_NONE_EXT = $8000;
  53. GLX_TRANSPARENT_RGB_EXT = $8008;
  54. GLX_TRANSPARENT_INDEX_EXT = $8009;
  55. type
  56. // From XLib:
  57. XPixmap = XID;
  58. XFont = XID;
  59. XColormap = XID;
  60. GLXContext = Pointer;
  61. GLXPixmap = XID;
  62. GLXDrawable = XID;
  63. GLXContextID = XID;
  64. var
  65. %END
  66. #=====================================================================
  67. # Procedures and functions
  68. #=====================================================================
  69. %PROCS
  70. glXChooseVisual: function(dpy: PDisplay; screen: Integer; var attribList: Integer): PXVisualInfo; cdecl;
  71. glXCreateContext: function(dpy: PDisplay; vis: PXVisualInfo; shareList: GLXContext; direct: Boolean): GLXContext; cdecl;
  72. glXDestroyContext: procedure(dpy: PDisplay; ctx: GLXContext); cdecl;
  73. glXMakeCurrent: function(dpy: PDisplay; drawable: GLXDrawable; ctx: GLXContext): Boolean; cdecl;
  74. glXCopyContext: procedure(dpy: PDisplay; src, dst: GLXContext; mask: LongWord); cdecl;
  75. glXSwapBuffers: procedure(dpy: PDisplay; drawable: GLXDrawable); cdecl;
  76. glXCreateGLXPixmap: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap): GLXPixmap; cdecl;
  77. glXDestroyGLXPixmap: procedure(dpy: PDisplay; pixmap: GLXPixmap); cdecl;
  78. glXQueryExtension: function(dpy: PDisplay; var errorb, event: Integer): Boolean; cdecl;
  79. glXQueryVersion: function(dpy: PDisplay; var maj, min: Integer): Boolean; cdecl;
  80. glXIsDirect: function(dpy: PDisplay; ctx: GLXContext): Boolean; cdecl;
  81. glXGetConfig: function(dpy: PDisplay; visual: PXVisualInfo; attrib: Integer; var value: Integer): Integer; cdecl;
  82. glXGetCurrentContext: function: GLXContext; cdecl;
  83. glXGetCurrentDrawable: function: GLXDrawable; cdecl;
  84. glXWaitGL: procedure; cdecl;
  85. glXWaitX: procedure; cdecl;
  86. glXUseXFont: procedure(font: XFont; first, count, list: Integer); cdecl;
  87. // GLX 1.1 and later
  88. glXQueryExtensionsString: function(dpy: PDisplay; screen: Integer): PChar; cdecl;
  89. glXQueryServerString: function(dpy: PDisplay; screen, name: Integer): PChar; cdecl;
  90. glXGetClientString: function(dpy: PDisplay; name: Integer): PChar; cdecl;
  91. // Mesa GLX Extensions
  92. glXCreateGLXPixmapMESA: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap; cmap: XColormap): GLXPixmap; cdecl;
  93. glXReleaseBufferMESA: function(dpy: PDisplay; d: GLXDrawable): Boolean; cdecl;
  94. glXCopySubBufferMESA: procedure(dpy: PDisplay; drawbale: GLXDrawable; x, y, width, height: Integer); cdecl;
  95. glXGetVideoSyncSGI: function(var counter: LongWord): Integer; cdecl;
  96. glXWaitVideoSyncSGI: function(divisor, remainder: Integer; var count: LongWord): Integer; cdecl;
  97. %END