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.4KB

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