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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. #if defined(_MSV_VER) && !defined(__GNUC__)
  47. # pragma warning (disable:4273)
  48. # pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
  49. # pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
  50. # pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
  51. # pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
  52. # pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
  53. # pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
  54. # if (MESA_WARNQUIET>1)
  55. # pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
  56. # endif
  57. #endif
  58. /*
  59. * This is the WMesa context 'handle':
  60. */
  61. typedef struct wmesa_context *WMesaContext;
  62. /*
  63. * Create a new WMesaContext for rendering into a window. You must
  64. * have already created the window of correct visual type and with an
  65. * appropriate colormap.
  66. *
  67. * Input:
  68. * hDC - Windows device or memory context
  69. * Pal - Palette to use
  70. * rgb_flag - GL_TRUE = RGB mode,
  71. * GL_FALSE = color index mode
  72. * db_flag - GL_TRUE = double-buffered,
  73. * GL_FALSE = single buffered
  74. * alpha_flag - GL_TRUE = create software alpha buffer,
  75. * GL_FALSE = no software alpha buffer
  76. *
  77. * Note: Indexed mode requires double buffering under Windows.
  78. *
  79. * Return: a WMesa_context or NULL if error.
  80. */
  81. extern WMesaContext WMesaCreateContext(HDC hDC,HPALETTE* pPal,
  82. GLboolean rgb_flag,
  83. GLboolean db_flag,
  84. GLboolean alpha_flag);
  85. /*
  86. * Destroy a rendering context as returned by WMesaCreateContext()
  87. */
  88. extern void WMesaDestroyContext( WMesaContext ctx );
  89. /*
  90. * Make the specified context the current one.
  91. */
  92. extern void WMesaMakeCurrent( WMesaContext ctx, HDC hdc );
  93. /*
  94. * Return a handle to the current context.
  95. */
  96. extern WMesaContext WMesaGetCurrentContext( void );
  97. /*
  98. * Swap the front and back buffers for the current context. No action
  99. * taken if the context is not double buffered.
  100. */
  101. extern void WMesaSwapBuffers(HDC hdc);
  102. /*
  103. * In indexed color mode we need to know when the palette changes.
  104. */
  105. extern void WMesaPaletteChange(HPALETTE Pal);
  106. extern void WMesaMove(void);
  107. void WMesaShareLists(WMesaContext ctx_to_share, WMesaContext ctx);
  108. #ifdef __cplusplus
  109. }
  110. #endif
  111. #endif