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 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * Mesa 3-D graphics library
  3. * Version: 3.1
  4. *
  5. * Copyright (C) 1999 Brian Paul All Rights Reserved.
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a
  8. * copy of this software and associated documentation files (the "Software"),
  9. * to deal in the Software without restriction, including without limitation
  10. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  11. * and/or sell copies of the Software, and to permit persons to whom the
  12. * Software is furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included
  15. * in all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  20. * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23. */
  24. /* prototypes for the Mesa WGL functions */
  25. /* relocated here so that I could make GLUT get them properly */
  26. #ifndef _mesa_wgl_h_
  27. #define _mesa_wgl_h_
  28. #if defined(__MINGW32__)
  29. # define __W32API_USE_DLLIMPORT__
  30. #endif
  31. #include <GL/gl.h>
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. #ifndef WGLAPI
  36. #define WGLAPI GLAPI
  37. #endif
  38. #if defined(__MINGW32__)
  39. # ifndef WIN32_LEAN_AND_MEAN
  40. # define WIN32_LEAN_AND_MEAN 1
  41. # endif
  42. # include <windows.h>
  43. #endif
  44. #if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
  45. #ifndef _GNU_H_WINDOWS32_FUNCTIONS
  46. # ifdef UNICODE
  47. # define wglUseFontBitmaps wglUseFontBitmapsW
  48. # define wglUseFontOutlines wglUseFontOutlinesW
  49. # else
  50. # define wglUseFontBitmaps wglUseFontBitmapsA
  51. # define wglUseFontOutlines wglUseFontOutlinesA
  52. # endif /* !UNICODE */
  53. #endif /* _GNU_H_WINDOWS32_FUNCTIONS */
  54. typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
  55. typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
  56. typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
  57. #endif
  58. #ifdef _MSC_VER
  59. # pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
  60. # pragma warning( push )
  61. # pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
  62. #endif
  63. WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
  64. WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
  65. WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
  66. WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
  67. WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
  68. WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
  69. WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
  70. WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
  71. WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
  72. WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
  73. WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
  74. WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
  75. WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
  76. WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
  77. WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
  78. WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
  79. WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
  80. WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
  81. WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
  82. WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
  83. WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
  84. WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
  85. WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
  86. #ifndef __MINGW32__
  87. WGLAPI int GLAPIENTRY SwapBuffers(HDC);
  88. WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
  89. WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
  90. WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
  91. WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
  92. #endif
  93. #ifdef _MSC_VER
  94. # pragma warning( pop )
  95. #endif
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif /* _mesa_wgl_h_ */