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.

wmesa.h 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. * Mesa 3-D graphics library
  3. * Version: 3.0
  4. * Copyright (C) 1995-1998 Brian Paul
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the Free
  18. * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. *
  20. */
  21. /*
  22. * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
  23. * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
  24. *
  25. *
  26. ***************************************************************
  27. * WMesa *
  28. * version 2.3 *
  29. * *
  30. * By *
  31. * Li Wei *
  32. * Institute of Artificial Intelligence & Robotics *
  33. * Xi'an Jiaotong University *
  34. * Email: liwei@aiar.xjtu.edu.cn *
  35. * Web page: http://sun.aiar.xjtu.edu.cn *
  36. * *
  37. * July 7th, 1997 *
  38. ***************************************************************
  39. */
  40. #ifndef WMESA_H
  41. #define WMESA_H
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45. #include "gl\gl.h"
  46. #pragma warning (disable:4273)
  47. #pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
  48. #pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
  49. #pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
  50. #pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
  51. #pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
  52. #pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
  53. #if (MESA_WARNQUIET>1)
  54. # pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
  55. #endif
  56. /*
  57. * This is the WMesa context 'handle':
  58. */
  59. typedef struct wmesa_context *WMesaContext;
  60. /*
  61. * Create a new WMesaContext for rendering into a window. You must
  62. * have already created the window of correct visual type and with an
  63. * appropriate colormap.
  64. *
  65. * Input:
  66. * hWnd - Window handle
  67. * Pal - Palette to use
  68. * rgb_flag - GL_TRUE = RGB mode,
  69. * GL_FALSE = color index mode
  70. * db_flag - GL_TRUE = double-buffered,
  71. * GL_FALSE = single buffered
  72. * alpha_flag - GL_TRUE = create software alpha buffer,
  73. * GL_FALSE = no software alpha buffer
  74. *
  75. * Note: Indexed mode requires double buffering under Windows.
  76. *
  77. * Return: a WMesa_context or NULL if error.
  78. */
  79. extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
  80. GLboolean rgb_flag,
  81. GLboolean db_flag,
  82. GLboolean alpha_flag);
  83. /*
  84. * Destroy a rendering context as returned by WMesaCreateContext()
  85. */
  86. /*extern void WMesaDestroyContext( WMesaContext ctx );*/
  87. extern void WMesaDestroyContext( void );
  88. /*
  89. * Make the specified context the current one.
  90. */
  91. extern void WMesaMakeCurrent( WMesaContext ctx );
  92. /*
  93. * Return a handle to the current context.
  94. */
  95. extern WMesaContext WMesaGetCurrentContext( void );
  96. /*
  97. * Swap the front and back buffers for the current context. No action
  98. * taken if the context is not double buffered.
  99. */
  100. extern void WMesaSwapBuffers(void);
  101. /*
  102. * In indexed color mode we need to know when the palette changes.
  103. */
  104. extern void WMesaPaletteChange(HPALETTE Pal);
  105. extern void WMesaMove(void);
  106. #ifdef __cplusplus
  107. }
  108. #endif
  109. #endif