gallium/draw: initial code to properly support llvm in the draw module
[mesa.git] / include / GL / wmesa.h
index dc1ec89d2b173041f4d7b43dba2937baa4f6154f..f5f4f273ba9483c42ec7942b414e8e095e619189 100644 (file)
@@ -50,17 +50,19 @@ extern "C" {
 #endif
 
 
-#include "gl\gl.h"
-
-#pragma warning (disable:4273)
-#pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
-#pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
-#pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
-#pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
-#pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-#pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
-#if (MESA_WARNQUIET>1)
-#      pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
+#include "GL/gl.h"
+
+#if defined(_MSV_VER) && !defined(__GNUC__)
+#  pragma warning (disable:4273)
+#  pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
+#  pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
+#  pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
+#  pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
+#  pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
+#  pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
+#  if (MESA_WARNQUIET>1)
+#    pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
+#  endif
 #endif
 
 /*
@@ -76,7 +78,7 @@ typedef struct wmesa_context *WMesaContext;
  * appropriate colormap.
  *
  * Input:
- *         hWnd - Window handle
+ *         hDC - Windows device or memory context
  *         Pal  - Palette to use
  *         rgb_flag - GL_TRUE = RGB mode,
  *                    GL_FALSE = color index mode
@@ -89,7 +91,7 @@ typedef struct wmesa_context *WMesaContext;
  *
  * Return:  a WMesa_context or NULL if error.
  */
-extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
+extern WMesaContext WMesaCreateContext(HDC hDC,HPALETTE* pPal,
                                        GLboolean rgb_flag,
                                        GLboolean db_flag,
                                        GLboolean alpha_flag);
@@ -98,15 +100,14 @@ extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
 /*
  * Destroy a rendering context as returned by WMesaCreateContext()
  */
-/*extern void WMesaDestroyContext( WMesaContext ctx );*/
-extern void WMesaDestroyContext( void );
+extern void WMesaDestroyContext( WMesaContext ctx );
 
 
 
 /*
  * Make the specified context the current one.
  */
-extern void WMesaMakeCurrent( WMesaContext ctx );
+extern void WMesaMakeCurrent( WMesaContext ctx, HDC hdc );
 
 
 /*
@@ -119,7 +120,7 @@ extern WMesaContext WMesaGetCurrentContext( void );
  * Swap the front and back buffers for the current context.  No action
  * taken if the context is not double buffered.
  */
-extern void WMesaSwapBuffers(void);
+extern void WMesaSwapBuffers(HDC hdc);
 
 
 /*
@@ -129,7 +130,7 @@ extern void WMesaPaletteChange(HPALETTE Pal);
 
 extern void WMesaMove(void);
 
-
+void WMesaShareLists(WMesaContext ctx_to_share, WMesaContext ctx);
 
 #ifdef __cplusplus
 }