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.

mesa_wgl.h 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /* $Id: mesa_wgl.h,v 1.6 2001/05/07 13:58:00 gareth Exp $ */
  2. /*
  3. * Mesa 3-D graphics library
  4. * Version: 3.1
  5. *
  6. * Copyright (C) 1999 Brian Paul All Rights Reserved.
  7. *
  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. * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  22. * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  23. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24. */
  25. /* prototypes for the Mesa WGL functions */
  26. /* relocated here so that I could make GLUT get them properly */
  27. #define _mesa_wgl_h_
  28. #ifndef _mesa_wgl_h_
  29. #define _mesa_wgl_h_
  30. #include <gl/gl.h>
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
  35. # if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
  36. # define GLAPI __declspec(dllexport)
  37. # define WGLAPI __declspec(dllexport)
  38. # elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
  39. # define GLAPI __declspec(dllimport)
  40. # define WGLAPI __declspec(dllimport)
  41. # else /* for use with static link lib build of Win32 edition only */
  42. # define GLAPI extern
  43. # define WGLAPI __declspec(dllimport)
  44. # endif /* _STATIC_MESA support */
  45. # define GLAPIENTRY __stdcall
  46. #else
  47. /* non-Windows compilation */
  48. # define GLAPI extern
  49. # define GLAPIENTRY
  50. #endif /* WIN32 / CYGWIN32 bracket */
  51. #if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
  52. #ifndef _GNU_H_WINDOWS32_FUNCTIONS
  53. # ifdef UNICODE
  54. # define wglUseFontBitmaps wglUseFontBitmapsW
  55. # define wglUseFontOutlines wglUseFontOutlinesW
  56. # else
  57. # define wglUseFontBitmaps wglUseFontBitmapsA
  58. # define wglUseFontOutlines wglUseFontOutlinesA
  59. # endif /* !UNICODE */
  60. #endif /* _GNU_H_WINDOWS32_FUNCTIONS */
  61. typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
  62. typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
  63. typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
  64. #endif
  65. #ifdef _MSC_VER
  66. # pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
  67. # pragma warning( push )
  68. # pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
  69. #endif
  70. WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
  71. WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
  72. WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
  73. WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
  74. WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
  75. WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
  76. WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
  77. WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
  78. WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
  79. WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
  80. WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
  81. WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
  82. WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
  83. WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
  84. WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
  85. WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
  86. WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
  87. WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
  88. WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
  89. WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
  90. WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
  91. WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
  92. WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
  93. WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
  94. WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
  95. WGLAPI int GLAPIENTRY SwapBuffers(HDC);
  96. WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
  97. WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
  98. WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
  99. WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
  100. #ifdef _MSC_VER
  101. # pragma warning( pop )
  102. #endif
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106. #endif /* _mesa_wgl_h_ */