blob: 7916292883a615840a7ec74eeaf0bf2db7333e88 [file] [log] [blame]
Brian Paulab0c8862001-01-23 23:35:47 +00001/* $Id: glapi.h,v 1.18 2001/01/23 23:35:47 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 Paulab0c8862001-01-23 23:35:47 +00007 * Copyright (C) 1999-2001 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 Paulab0c8862001-01-23 23:35:47 +000062extern int
63_glapi_begin_dispatch_override(struct _glapi_table *override);
64
65
66extern void
67_glapi_end_dispatch_override(int layer);
68
69
70struct _glapi_table *
71_glapi_get_override_dispatch(int layer);
Brian Paul3a71d052000-09-05 20:17:37 +000072
73
Brian Paul91bcefa1999-11-27 21:30:40 +000074extern GLuint
75_glapi_get_dispatch_table_size(void);
76
77
Brian Paulfbd8f211999-11-11 01:22:25 +000078extern const char *
79_glapi_get_version(void);
80
81
Brian Paulfbd8f211999-11-11 01:22:25 +000082extern void
83_glapi_check_table(const struct _glapi_table *table);
84
85
Brian Paul91bcefa1999-11-27 21:30:40 +000086extern GLboolean
87_glapi_add_entrypoint(const char *funcName, GLuint offset);
Brian Paulfbd8f211999-11-11 01:22:25 +000088
89
90extern GLint
Brian Paul91bcefa1999-11-27 21:30:40 +000091_glapi_get_proc_offset(const char *funcName);
Brian Paulfbd8f211999-11-11 01:22:25 +000092
93
94extern const GLvoid *
95_glapi_get_proc_address(const char *funcName);
96
97
Brian Paulacd18101999-12-15 15:03:16 +000098extern const char *
99_glapi_get_proc_name(GLuint offset);
100
101
Brian Paulfbd8f211999-11-11 01:22:25 +0000102#endif