Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

uglmesa.h 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /* uglmesa.h - Public header UGL/Mesa */
  2. /* Copyright (C) 2001 by Wind River Systems, Inc */
  3. /*
  4. * Mesa 3-D graphics library
  5. * Version: 4.0
  6. *
  7. * The MIT License
  8. * Permission is hereby granted, free of charge, to any person obtaining a
  9. * copy of this software and associated documentation files (the "Software"),
  10. * to deal in the Software without restriction, including without limitation
  11. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  12. * and/or sell copies of the Software, and to permit persons to whom the
  13. * Software is furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included
  16. * in all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  19. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  21. * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  23. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  24. * DEALINGS IN THE SOFTWARE.
  25. */
  26. /*
  27. * Author:
  28. * Stephane Raimbault <stephane.raimbault@windriver.com>
  29. */
  30. #ifndef UGLMESA_H
  31. #define UGLMESA_H
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. #define UGL_MESA_MAJOR_VERSION 4
  36. #define UGL_MESA_MINOR_VERSION 0
  37. #include <GL/gl.h>
  38. #include <ugl/ugl.h>
  39. /*
  40. * Values for display mode of uglMesaCreateContext ()
  41. */
  42. /*
  43. * With these mask values, it's possible to test double buffer mode
  44. * with UGL_MESA_DOUBLE mask
  45. *
  46. * SINGLE 0000 0001
  47. * DOUBLE 0000 0110
  48. * - SOFT 0000 0010
  49. * - HARD 0000 0100
  50. * WINDML 0001 0000
  51. *
  52. *
  53. */
  54. #define UGL_MESA_SINGLE 0x01
  55. #define UGL_MESA_DOUBLE 0x06
  56. #define UGL_MESA_DOUBLE_SOFTWARE 0x02
  57. #define UGL_MESA_DOUBLE_HARDWARE 0x04
  58. #define UGL_MESA_WINDML_EXCLUSIVE 0x10
  59. #define UGL_MESA_FULLSCREEN_WIDTH 0x0
  60. #define UGL_MESA_FULLSCREEN_HEIGHT 0x0
  61. /*
  62. * uglMesaPixelStore() parameters:
  63. */
  64. #define UGL_MESA_ROW_LENGTH 0x20
  65. #define UGL_MESA_Y_UP 0x21
  66. /*
  67. * Accepted by uglMesaGetIntegerv:
  68. */
  69. #define UGL_MESA_LEFT_X 0x01
  70. #define UGL_MESA_TOP_Y 0x02
  71. #define UGL_MESA_WIDTH 0x03
  72. #define UGL_MESA_HEIGHT 0x04
  73. #define UGL_MESA_DISPLAY_WIDTH 0x05
  74. #define UGL_MESA_DISPLAY_HEIGHT 0x06
  75. #define UGL_MESA_COLOR_FORMAT 0x07
  76. #define UGL_MESA_COLOR_MODEL 0x08
  77. #define UGL_MESA_PIXEL_FORMAT 0x09
  78. #define UGL_MESA_TYPE 0x0A
  79. #define UGL_MESA_RGB 0x0B
  80. #define UGL_MESA_COLOR_INDEXED 0x0C
  81. #define UGL_MESA_SINGLE_BUFFER 0x0D
  82. #define UGL_MESA_DOUBLE_BUFFER 0x0E
  83. #define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
  84. #define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
  85. /*
  86. * typedefs
  87. */
  88. typedef struct uglMesaContext * UGL_MESA_CONTEXT;
  89. UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
  90. UGL_MESA_CONTEXT share_list);
  91. UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode,
  92. GLint depth_bits,
  93. GLint stencil_bits,
  94. GLint accum_red_bits,
  95. GLint accum_green_bits,
  96. GLint accum_blue_bits,
  97. GLint accum_alpha_bits,
  98. UGL_MESA_CONTEXT share_list);
  99. GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
  100. GLsizei left, GLsizei top,
  101. GLsizei width, GLsizei height);
  102. GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
  103. GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
  104. GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
  105. GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
  106. void uglMesaDestroyContext (void);
  107. UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
  108. void uglMesaSwapBuffers (void);
  109. void uglMesaPixelStore (GLint pname, GLint value);
  110. void uglMesaGetIntegerv (GLint pname, GLint *value);
  111. GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
  112. GLint *bytesPerValue, void **buffer);
  113. GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
  114. GLint *format, void **buffer);
  115. GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
  116. GLfloat green, GLfloat blue);
  117. #ifdef __cplusplus
  118. }
  119. #endif
  120. #endif