glx.def 4.6 KB

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