Clone of mesa.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. #ifndef EGLAPI_INCLUDED
  2. #define EGLAPI_INCLUDED
  3. /**
  4. * A generic function ptr type
  5. */
  6. typedef void (*_EGLProc)();
  7. /**
  8. * Typedefs for all EGL API entrypoint functions.
  9. */
  10. /* driver funcs */
  11. typedef EGLBoolean (*Initialize_t)(_EGLDriver *, _EGLDisplay *dpy, EGLint *major, EGLint *minor);
  12. typedef EGLBoolean (*Terminate_t)(_EGLDriver *, _EGLDisplay *dpy);
  13. /* config funcs */
  14. typedef EGLBoolean (*GetConfigs_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
  15. typedef EGLBoolean (*ChooseConfig_t)(_EGLDriver *drv, _EGLDisplay *dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
  16. typedef EGLBoolean (*GetConfigAttrib_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, EGLint attribute, EGLint *value);
  17. /* context funcs */
  18. typedef _EGLContext *(*CreateContext_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, _EGLContext *share_list, const EGLint *attrib_list);
  19. typedef EGLBoolean (*DestroyContext_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx);
  20. typedef EGLBoolean (*MakeCurrent_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx);
  21. typedef EGLBoolean (*QueryContext_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLint attribute, EGLint *value);
  22. /* surface funcs */
  23. typedef _EGLSurface *(*CreateWindowSurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, NativeWindowType window, const EGLint *attrib_list);
  24. typedef _EGLSurface *(*CreatePixmapSurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, NativePixmapType pixmap, const EGLint *attrib_list);
  25. typedef _EGLSurface *(*CreatePbufferSurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, const EGLint *attrib_list);
  26. typedef EGLBoolean (*DestroySurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface);
  27. typedef EGLBoolean (*QuerySurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint attribute, EGLint *value);
  28. typedef EGLBoolean (*SurfaceAttrib_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint attribute, EGLint value);
  29. typedef EGLBoolean (*BindTexImage_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint buffer);
  30. typedef EGLBoolean (*ReleaseTexImage_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint buffer);
  31. typedef EGLBoolean (*SwapInterval_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint interval);
  32. typedef EGLBoolean (*SwapBuffers_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw);
  33. typedef EGLBoolean (*CopyBuffers_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, NativePixmapType target);
  34. /* misc funcs */
  35. typedef const char *(*QueryString_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLint name);
  36. typedef EGLBoolean (*WaitClient_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx);
  37. typedef EGLBoolean (*WaitNative_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine);
  38. typedef _EGLProc (*GetProcAddress_t)(_EGLDriver *drv, const char *procname);
  39. #ifdef EGL_MESA_screen_surface
  40. typedef EGLBoolean (*ChooseModeMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
  41. typedef EGLBoolean (*GetModesMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, EGLModeMESA *modes, EGLint mode_size, EGLint *num_mode);
  42. typedef EGLBoolean (*GetModeAttribMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLMode *mode, EGLint attribute, EGLint *value);
  43. typedef EGLBoolean (*CopyContextMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *source, _EGLContext *dest, EGLint mask);
  44. typedef EGLBoolean (*GetScreensMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
  45. typedef _EGLSurface *(*CreateScreenSurfaceMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, const EGLint *attrib_list);
  46. typedef EGLBoolean (*ShowScreenSurfaceMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, _EGLSurface *surface, _EGLMode *mode);
  47. typedef EGLBoolean (*ScreenPositionMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, EGLint x, EGLint y);
  48. typedef EGLBoolean (*QueryScreenMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, EGLint attribute, EGLint *value);
  49. typedef EGLBoolean (*QueryScreenSurfaceMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, _EGLSurface **surface);
  50. typedef EGLBoolean (*QueryScreenModeMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, _EGLMode **mode);
  51. typedef const char * (*QueryModeStringMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLMode *mode);
  52. #endif /* EGL_MESA_screen_surface */
  53. #ifdef EGL_VERSION_1_2
  54. typedef _EGLSurface *(*CreatePbufferFromClientBuffer_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum buftype, EGLClientBuffer buffer, _EGLConfig *config, const EGLint *attrib_list);
  55. #endif /* EGL_VERSION_1_2 */
  56. /**
  57. * The API dispatcher jumps through these functions
  58. */
  59. struct _egl_api
  60. {
  61. Initialize_t Initialize;
  62. Terminate_t Terminate;
  63. GetConfigs_t GetConfigs;
  64. ChooseConfig_t ChooseConfig;
  65. GetConfigAttrib_t GetConfigAttrib;
  66. CreateContext_t CreateContext;
  67. DestroyContext_t DestroyContext;
  68. MakeCurrent_t MakeCurrent;
  69. QueryContext_t QueryContext;
  70. CreateWindowSurface_t CreateWindowSurface;
  71. CreatePixmapSurface_t CreatePixmapSurface;
  72. CreatePbufferSurface_t CreatePbufferSurface;
  73. DestroySurface_t DestroySurface;
  74. QuerySurface_t QuerySurface;
  75. SurfaceAttrib_t SurfaceAttrib;
  76. BindTexImage_t BindTexImage;
  77. ReleaseTexImage_t ReleaseTexImage;
  78. SwapInterval_t SwapInterval;
  79. SwapBuffers_t SwapBuffers;
  80. CopyBuffers_t CopyBuffers;
  81. QueryString_t QueryString;
  82. WaitClient_t WaitClient;
  83. WaitNative_t WaitNative;
  84. GetProcAddress_t GetProcAddress;
  85. /* EGL_MESA_screen extension */
  86. ChooseModeMESA_t ChooseModeMESA;
  87. GetModesMESA_t GetModesMESA;
  88. GetModeAttribMESA_t GetModeAttribMESA;
  89. CopyContextMESA_t CopyContextMESA;
  90. GetScreensMESA_t GetScreensMESA;
  91. CreateScreenSurfaceMESA_t CreateScreenSurfaceMESA;
  92. ShowScreenSurfaceMESA_t ShowScreenSurfaceMESA;
  93. ScreenPositionMESA_t ScreenPositionMESA;
  94. QueryScreenMESA_t QueryScreenMESA;
  95. QueryScreenSurfaceMESA_t QueryScreenSurfaceMESA;
  96. QueryScreenModeMESA_t QueryScreenModeMESA;
  97. QueryModeStringMESA_t QueryModeStringMESA;
  98. #ifdef EGL_VERSION_1_2
  99. CreatePbufferFromClientBuffer_t CreatePbufferFromClientBuffer;
  100. #endif
  101. };
  102. #endif /* EGLAPI_INCLUDED */