blob: 3b022e436e1820457f88b08d52383740a935e486 [file] [log] [blame]
Brian Paul3c257e12001-03-28 17:19:58 +00001/* $Id: glapi.h,v 1.19 2001/03/28 17:20:20 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 Paul3c257e12001-03-28 17:19:58 +000043_glapi_noop_enable_warnings(GLboolean enable);
44
45
46extern void
Brian Paulbb72d321999-12-16 17:31:59 +000047_glapi_check_multithread(void);
48
49
50extern void
Brian Paulf9b97d92000-01-28 20:17:42 +000051_glapi_set_context(void *context);
Brian Paul8f91fb61999-12-17 14:51:28 +000052
53
54extern void *
Brian Paulf9b97d92000-01-28 20:17:42 +000055_glapi_get_context(void);
Brian Paul8f91fb61999-12-17 14:51:28 +000056
57
58extern void
Brian Paulfbd8f211999-11-11 01:22:25 +000059_glapi_set_dispatch(struct _glapi_table *dispatch);
60
61
62extern struct _glapi_table *
63_glapi_get_dispatch(void);
64
65
Brian Paulab0c8862001-01-23 23:35:47 +000066extern int
67_glapi_begin_dispatch_override(struct _glapi_table *override);
68
69
70extern void
71_glapi_end_dispatch_override(int layer);
72
73
74struct _glapi_table *
75_glapi_get_override_dispatch(int layer);
Brian Paul3a71d052000-09-05 20:17:37 +000076
77
Brian Paul91bcefa1999-11-27 21:30:40 +000078extern GLuint
79_glapi_get_dispatch_table_size(void);
80
81
Brian Paulfbd8f211999-11-11 01:22:25 +000082extern const char *
83_glapi_get_version(void);
84
85
Brian Paulfbd8f211999-11-11 01:22:25 +000086extern void
87_glapi_check_table(const struct _glapi_table *table);
88
89
Brian Paul91bcefa1999-11-27 21:30:40 +000090extern GLboolean
91_glapi_add_entrypoint(const char *funcName, GLuint offset);
Brian Paulfbd8f211999-11-11 01:22:25 +000092
93
94extern GLint
Brian Paul91bcefa1999-11-27 21:30:40 +000095_glapi_get_proc_offset(const char *funcName);
Brian Paulfbd8f211999-11-11 01:22:25 +000096
97
98extern const GLvoid *
99_glapi_get_proc_address(const char *funcName);
100
101
Brian Paulacd18101999-12-15 15:03:16 +0000102extern const char *
103_glapi_get_proc_name(GLuint offset);
104
105
Brian Paulfbd8f211999-11-11 01:22:25 +0000106#endif