1 /* $Id$ */ 2 3 /* 4 * Mesa 3-D graphics library 5 * Version: 3.4.2 6 * 7 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 8 * 9 * Permission is hereby granted, free of charge, to any person obtaining a 10 * copy of this software and associated documentation files (the "Software"), 11 * to deal in the Software without restriction, including without limitation 12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 * and/or sell copies of the Software, and to permit persons to whom the 14 * Software is furnished to do so, subject to the following conditions: 15 * 16 * The above copyright notice and this permission notice shall be included 17 * in all copies or substantial portions of the Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 */ 26 27 28 /* Allegro driver by Bernhard Tschirren (bernie-t@geocities.com) 29 * Updated to Mesa 3.4.2 by Bertrand Coconnier (bcoconni@club-internet.fr) 30 */ 31 32 33 #ifndef AMESA_H 34 #define AMESA_H 35 36 #include <allegro.h> 37 38 /* Names collision : We don't need them to build AMesa so let's undefine... */ 39 #undef ASSERT /* Used by Mesa */ 40 #undef INLINE /* Also used by Mesa */ 41 42 #include <GL/gl.h> 43 44 45 #ifdef __cplusplus 46 extern "C" { 47 #endif 48 49 50 #define AMESA_MAJOR_VERSION 3 51 #define AMESA_MINOR_VERSION 3 52 53 #define AMESA_FRONT 0x1 54 #define AMESA_BACK 0x2 55 #define AMESA_ACTIVE 0x3 56 57 58 typedef struct amesa_visual* AMesaVisual; 59 typedef struct amesa_buffer* AMesaBuffer; 60 typedef struct amesa_context* AMesaContext; 61 62 63 AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth, 64 GLint rgba, GLint depthSize, 65 GLint stencilSize, 66 GLint accumSizeRed, 67 GLint accumSizeGreen, 68 GLint accumSizeBlue, 69 GLint accumSizeAlpha); 70 71 void AMesaDestroyVisual(AMesaVisual visual); 72 73 AMesaBuffer AMesaCreateBuffer(AMesaVisual visual, BITMAP* bmp); 74 75 void AMesaDestroyBuffer(AMesaBuffer buffer); 76 77 78 AMesaContext AMesaCreateContext(AMesaVisual visual, 79 AMesaContext sharelist); 80 81 void AMesaDestroyContext(AMesaContext context); 82 83 GLboolean AMesaMakeCurrent(AMesaContext context, 84 AMesaBuffer buffer); 85 86 void AMesaSwapBuffers(AMesaBuffer buffer); 87 88 AMesaContext AMesaGetCurrentContext(void); 89 90 BITMAP* AMesaGetColorBuffer(AMesaBuffer buffer, GLenum mode); 91 92 void* AMesaGetProcAddress(AL_CONST char *name); 93 94 #ifdef __cplusplus 95 } 96 #endif 97 98 99 #endif /* AMESA_H */ 100