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