Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Mesa 3-D graphics library |
Brian Paul | 3a71d05 | 2000-09-05 20:17:37 +0000 | [diff] [blame] | 4 | * Version: 3.5 |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 5 | * |
Brian Paul | ab0c886 | 2001-01-23 23:35:47 +0000 | [diff] [blame] | 6 | * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 9 | * copy of this software and associated documentation files (the "Software"), |
| 10 | * to deal in the Software without restriction, including without limitation |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the |
| 13 | * Software is furnished to do so, subject to the following conditions: |
| 14 | * |
| 15 | * The above copyright notice and this permission notice shall be included |
| 16 | * in all copies or substantial portions of the Software. |
| 17 | * |
| 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 19 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 21 | * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
| 22 | * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 23 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 24 | */ |
| 25 | |
| 26 | |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 27 | #ifndef _GLAPI_H |
| 28 | #define _GLAPI_H |
| 29 | |
| 30 | |
| 31 | #include "GL/gl.h" |
Brian Paul | 3aecc51 | 1999-12-16 12:38:54 +0000 | [diff] [blame] | 32 | |
| 33 | struct _glapi_table; |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 34 | |
Brian Paul | 4e9676f | 2002-06-29 19:48:15 +0000 | [diff] [blame] | 35 | typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); |
| 36 | |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 37 | |
Brian Paul | f9b97d9 | 2000-01-28 20:17:42 +0000 | [diff] [blame] | 38 | extern void *_glapi_Context; |
Brian Paul | 8f91fb6 | 1999-12-17 14:51:28 +0000 | [diff] [blame] | 39 | |
Brian Paul | 328bb7f | 2000-01-17 19:28:43 +0000 | [diff] [blame] | 40 | extern struct _glapi_table *_glapi_Dispatch; |
| 41 | |
Brian Paul | 8f91fb6 | 1999-12-17 14:51:28 +0000 | [diff] [blame] | 42 | |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 43 | extern void |
Brian Paul | 3c257e1 | 2001-03-28 17:19:58 +0000 | [diff] [blame] | 44 | _glapi_noop_enable_warnings(GLboolean enable); |
| 45 | |
Brian Paul | 4e9676f | 2002-06-29 19:48:15 +0000 | [diff] [blame] | 46 | extern void |
| 47 | _glapi_set_warning_func(_glapi_warning_func func); |
Brian Paul | 3c257e1 | 2001-03-28 17:19:58 +0000 | [diff] [blame] | 48 | |
| 49 | extern void |
Brian Paul | bb72d32 | 1999-12-16 17:31:59 +0000 | [diff] [blame] | 50 | _glapi_check_multithread(void); |
| 51 | |
| 52 | |
| 53 | extern void |
Brian Paul | f9b97d9 | 2000-01-28 20:17:42 +0000 | [diff] [blame] | 54 | _glapi_set_context(void *context); |
Brian Paul | 8f91fb6 | 1999-12-17 14:51:28 +0000 | [diff] [blame] | 55 | |
| 56 | |
| 57 | extern void * |
Brian Paul | f9b97d9 | 2000-01-28 20:17:42 +0000 | [diff] [blame] | 58 | _glapi_get_context(void); |
Brian Paul | 8f91fb6 | 1999-12-17 14:51:28 +0000 | [diff] [blame] | 59 | |
| 60 | |
| 61 | extern void |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 62 | _glapi_set_dispatch(struct _glapi_table *dispatch); |
| 63 | |
| 64 | |
| 65 | extern struct _glapi_table * |
| 66 | _glapi_get_dispatch(void); |
| 67 | |
| 68 | |
Brian Paul | ab0c886 | 2001-01-23 23:35:47 +0000 | [diff] [blame] | 69 | extern int |
| 70 | _glapi_begin_dispatch_override(struct _glapi_table *override); |
| 71 | |
| 72 | |
| 73 | extern void |
| 74 | _glapi_end_dispatch_override(int layer); |
| 75 | |
| 76 | |
| 77 | struct _glapi_table * |
| 78 | _glapi_get_override_dispatch(int layer); |
Brian Paul | 3a71d05 | 2000-09-05 20:17:37 +0000 | [diff] [blame] | 79 | |
| 80 | |
Brian Paul | 91bcefa | 1999-11-27 21:30:40 +0000 | [diff] [blame] | 81 | extern GLuint |
| 82 | _glapi_get_dispatch_table_size(void); |
| 83 | |
| 84 | |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 85 | extern const char * |
| 86 | _glapi_get_version(void); |
| 87 | |
| 88 | |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 89 | extern void |
| 90 | _glapi_check_table(const struct _glapi_table *table); |
| 91 | |
| 92 | |
Brian Paul | 91bcefa | 1999-11-27 21:30:40 +0000 | [diff] [blame] | 93 | extern GLboolean |
| 94 | _glapi_add_entrypoint(const char *funcName, GLuint offset); |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 95 | |
| 96 | |
| 97 | extern GLint |
Brian Paul | 91bcefa | 1999-11-27 21:30:40 +0000 | [diff] [blame] | 98 | _glapi_get_proc_offset(const char *funcName); |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 99 | |
| 100 | |
| 101 | extern const GLvoid * |
| 102 | _glapi_get_proc_address(const char *funcName); |
| 103 | |
| 104 | |
Brian Paul | acd1810 | 1999-12-15 15:03:16 +0000 | [diff] [blame] | 105 | extern const char * |
| 106 | _glapi_get_proc_name(GLuint offset); |
| 107 | |
| 108 | |
Brian Paul | fbd8f21 | 1999-11-11 01:22:25 +0000 | [diff] [blame] | 109 | #endif |