Clone of mesa.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. /*
  2. * (c) Copyright 1993, Silicon Graphics, Inc.
  3. * ALL RIGHTS RESERVED
  4. * Permission to use, copy, modify, and distribute this software for
  5. * any purpose and without fee is hereby granted, provided that the above
  6. * copyright notice appear in all copies and that both the copyright notice
  7. * and this permission notice appear in supporting documentation, and that
  8. * the name of Silicon Graphics, Inc. not be used in advertising
  9. * or publicity pertaining to distribution of the software without specific,
  10. * written prior permission.
  11. *
  12. * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
  13. * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
  14. * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
  15. * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
  16. * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
  17. * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
  18. * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
  19. * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
  20. * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
  21. * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
  22. * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
  23. * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
  24. *
  25. *
  26. * US Government Users Restricted Rights
  27. * Use, duplication, or disclosure by the Government is subject to
  28. * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
  29. * (c)(1)(ii) of the Rights in Technical Data and Computer Software
  30. * clause at DFARS 252.227-7013 and/or in similar or successor
  31. * clauses in the FAR or the DOD or NASA FAR Supplement.
  32. * Unpublished-- rights reserved under the copyright laws of the
  33. * United States. Contractor/manufacturer is Silicon Graphics,
  34. * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
  35. *
  36. * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  37. */
  38. #ifndef _GLwDrawA_h
  39. #define _GLwDrawA_h
  40. #include <GL/glx.h>
  41. #include <GL/gl.h>
  42. /****************************************************************
  43. *
  44. * GLwDrawingArea widgets
  45. *
  46. ****************************************************************/
  47. /* Resources:
  48. Name Class RepType Default Value
  49. ---- ----- ------- -------------
  50. attribList AttribList int * NULL
  51. visualInfo VisualInfo VisualInfo NULL
  52. installColormap InstallColormap Boolean TRUE
  53. allocateBackground AllocateColors Boolean FALSE
  54. allocateOtherColors AllocateColors Boolean FALSE
  55. installBackground InstallBackground Boolean TRUE
  56. exposeCallback Callback Pointer NULL
  57. ginitCallback Callback Pointer NULL
  58. inputCallback Callback Pointer NULL
  59. resizeCallback Callback Pointer NULL
  60. *** The following resources all correspond to the GLX configuration
  61. *** attributes and are used to create the attribList if it is NULL
  62. bufferSize BufferSize int 0
  63. level Level int 0
  64. rgba Rgba Boolean FALSE
  65. doublebuffer Doublebuffer Boolean FALSE
  66. stereo Stereo Boolean FALSE
  67. auxBuffers AuxBuffers int 0
  68. redSize ColorSize int 1
  69. greenSize ColorSize int 1
  70. blueSize ColorSize int 1
  71. alphaSize AlphaSize int 0
  72. depthSize DepthSize int 0
  73. stencilSize StencilSize int 0
  74. accumRedSize AccumColorSize int 0
  75. accumGreenSize AccumColorSize int 0
  76. accumBlueSize AccumColorSize int 0
  77. accumAlphaSize AccumAlphaSize int 0
  78. */
  79. #define GLwNattribList "attribList"
  80. #define GLwCAttribList "AttribList"
  81. #define GLwNvisualInfo "visualInfo"
  82. #define GLwCVisualInfo "VisualInfo"
  83. #define GLwRVisualInfo "VisualInfo"
  84. #define GLwNinstallColormap "installColormap"
  85. #define GLwCInstallColormap "InstallColormap"
  86. #define GLwNallocateBackground "allocateBackground"
  87. #define GLwNallocateOtherColors "allocateOtherColors"
  88. #define GLwCAllocateColors "AllocateColors"
  89. #define GLwNinstallBackground "installBackground"
  90. #define GLwCInstallBackground "InstallBackground"
  91. #define GLwCCallback "Callback"
  92. #define GLwNexposeCallback "exposeCallback"
  93. #define GLwNginitCallback "ginitCallback"
  94. #define GLwNresizeCallback "resizeCallback"
  95. #define GLwNinputCallback "inputCallback"
  96. #define GLwNbufferSize "bufferSize"
  97. #define GLwCBufferSize "BufferSize"
  98. #define GLwNlevel "level"
  99. #define GLwCLevel "Level"
  100. #define GLwNrgba "rgba"
  101. #define GLwCRgba "Rgba"
  102. #define GLwNdoublebuffer "doublebuffer"
  103. #define GLwCDoublebuffer "Doublebuffer"
  104. #define GLwNstereo "stereo"
  105. #define GLwCStereo "Stereo"
  106. #define GLwNauxBuffers "auxBuffers"
  107. #define GLwCAuxBuffers "AuxBuffers"
  108. #define GLwNredSize "redSize"
  109. #define GLwNgreenSize "greenSize"
  110. #define GLwNblueSize "blueSize"
  111. #define GLwCColorSize "ColorSize"
  112. #define GLwNalphaSize "alphaSize"
  113. #define GLwCAlphaSize "AlphaSize"
  114. #define GLwNdepthSize "depthSize"
  115. #define GLwCDepthSize "DepthSize"
  116. #define GLwNstencilSize "stencilSize"
  117. #define GLwCStencilSize "StencilSize"
  118. #define GLwNaccumRedSize "accumRedSize"
  119. #define GLwNaccumGreenSize "accumGreenSize"
  120. #define GLwNaccumBlueSize "accumBlueSize"
  121. #define GLwCAccumColorSize "AccumColorSize"
  122. #define GLwNaccumAlphaSize "accumAlphaSize"
  123. #define GLwCAccumAlphaSize "AccumAlphaSize"
  124. #ifdef __GLX_MOTIF
  125. typedef struct _GLwMDrawingAreaClassRec *GLwMDrawingAreaWidgetClass;
  126. typedef struct _GLwMDrawingAreaRec *GLwMDrawingAreaWidget;
  127. extern WidgetClass glwMDrawingAreaWidgetClass;
  128. #else
  129. typedef struct _GLwDrawingAreaClassRec *GLwDrawingAreaWidgetClass;
  130. typedef struct _GLwDrawingAreaRec *GLwDrawingAreaWidget;
  131. extern WidgetClass glwDrawingAreaWidgetClass;
  132. #endif
  133. /* Callback reasons */
  134. #ifdef __GLX_MOTIF
  135. #define GLwCR_EXPOSE XmCR_EXPOSE
  136. #define GLwCR_RESIZE XmCR_RESIZE
  137. #define GLwCR_INPUT XmCR_INPUT
  138. #else
  139. /* The same values as Motif, but don't use Motif constants */
  140. #define GLwCR_EXPOSE 38
  141. #define GLwCR_RESIZE 39
  142. #define GLwCR_INPUT 40
  143. #endif
  144. #define GLwCR_GINIT 32135 /* Arbitrary number that should neverr clash */
  145. typedef struct
  146. {
  147. int reason;
  148. XEvent *event;
  149. Dimension width,height;
  150. }
  151. GLwDrawingAreaCallbackStruct;
  152. #if defined(__cplusplus) || defined(c_plusplus)
  153. extern "C" {
  154. #endif
  155. /* front ends to glXMakeCurrent and glXSwapBuffers */
  156. extern void GLwDrawingAreaMakeCurrent(Widget w,GLXContext ctx);
  157. extern void GLwDrawingAreaSwapBuffers(Widget w);
  158. #ifdef __GLX_MOTIF
  159. #ifdef _NO_PROTO
  160. extern Widget GLwCreateMDrawingArea();
  161. #else
  162. extern Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount);
  163. #endif
  164. #endif
  165. #if defined(__cplusplus) || defined(c_plusplus)
  166. }
  167. #endif
  168. #endif