blob: 2a56c77cec02081edbf30dc8455844562c1acf73 [file] [log] [blame]
Brian Paul3a71d052000-09-05 20:17:37 +00001/* $Id: glapi.h,v 1.15 2000/09/05 20:17:37 brianp Exp $ */
Brian Paulfbd8f211999-11-11 01:22:25 +00002
3/*
4 * Mesa 3-D graphics library
Brian Paul3a71d052000-09-05 20:17:37 +00005 * Version: 3.5
Brian Paulfbd8f211999-11-11 01:22:25 +00006 *
Brian Paul328bb7f2000-01-17 19:28:43 +00007 * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
Brian Paulfbd8f211999-11-11 01:22:25 +00008 *
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
Brian Paulfbd8f211999-11-11 01:22:25 +000028#ifndef _GLAPI_H
29#define _GLAPI_H
30
31
32#include "GL/gl.h"
Brian Paul3aecc511999-12-16 12:38:54 +000033
34struct _glapi_table;
Brian Paulfbd8f211999-11-11 01:22:25 +000035
36
Brian Paulf9b97d92000-01-28 20:17:42 +000037extern void *_glapi_Context;
Brian Paul8f91fb61999-12-17 14:51:28 +000038
Brian Paul328bb7f2000-01-17 19:28:43 +000039extern struct _glapi_table *_glapi_Dispatch;
40
Brian Paul8f91fb61999-12-17 14:51:28 +000041
Brian Paulfbd8f211999-11-11 01:22:25 +000042extern void
Brian Paulbb72d321999-12-16 17:31:59 +000043_glapi_check_multithread(void);
44
45
46extern void
Brian Paulf9b97d92000-01-28 20:17:42 +000047_glapi_set_context(void *context);
Brian Paul8f91fb61999-12-17 14:51:28 +000048
49
50extern void *
Brian Paulf9b97d92000-01-28 20:17:42 +000051_glapi_get_context(void);
Brian Paul8f91fb61999-12-17 14:51:28 +000052
53
54extern void
Brian Paulfbd8f211999-11-11 01:22:25 +000055_glapi_set_dispatch(struct _glapi_table *dispatch);
56
57
58extern struct _glapi_table *
59_glapi_get_dispatch(void);
60
61
Brian Paul3a71d052000-09-05 20:17:37 +000062#if defined(TRACE)
63extern struct _glapi_table *
64_glapi_get_true_dispatch(void);
65#endif
66
67
Brian Paul91bcefa1999-11-27 21:30:40 +000068extern GLuint
69_glapi_get_dispatch_table_size(void);
70
71
Brian Paulfbd8f211999-11-11 01:22:25 +000072extern const char *
73_glapi_get_version(void);
74
75
Brian Paulfbd8f211999-11-11 01:22:25 +000076extern void
77_glapi_check_table(const struct _glapi_table *table);
78
79
Brian Paul91bcefa1999-11-27 21:30:40 +000080extern GLboolean
81_glapi_add_entrypoint(const char *funcName, GLuint offset);
Brian Paulfbd8f211999-11-11 01:22:25 +000082
83
84extern GLint
Brian Paul91bcefa1999-11-27 21:30:40 +000085_glapi_get_proc_offset(const char *funcName);
Brian Paulfbd8f211999-11-11 01:22:25 +000086
87
88extern const GLvoid *
89_glapi_get_proc_address(const char *funcName);
90
91
Brian Paulacd18101999-12-15 15:03:16 +000092extern const char *
93_glapi_get_proc_name(GLuint offset);
94
95
Brian Paulfbd8f211999-11-11 01:22:25 +000096#endif