blob: 2b545b48887c8d88f405378461d3c87605c77437 [file] [log] [blame]
Brian Paulf9b97d92000-01-28 20:17:42 +00001/* $Id: glapi.h,v 1.14 2000/01/28 20:17:42 brianp Exp $ */
Brian Paulfbd8f211999-11-11 01:22:25 +00002
3/*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
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 Paul91bcefa1999-11-27 21:30:40 +000062extern GLuint
63_glapi_get_dispatch_table_size(void);
64
65
Brian Paulfbd8f211999-11-11 01:22:25 +000066extern const char *
67_glapi_get_version(void);
68
69
Brian Paulfbd8f211999-11-11 01:22:25 +000070extern void
71_glapi_check_table(const struct _glapi_table *table);
72
73
Brian Paul91bcefa1999-11-27 21:30:40 +000074extern GLboolean
75_glapi_add_entrypoint(const char *funcName, GLuint offset);
Brian Paulfbd8f211999-11-11 01:22:25 +000076
77
78extern GLint
Brian Paul91bcefa1999-11-27 21:30:40 +000079_glapi_get_proc_offset(const char *funcName);
Brian Paulfbd8f211999-11-11 01:22:25 +000080
81
82extern const GLvoid *
83_glapi_get_proc_address(const char *funcName);
84
85
Brian Paulacd18101999-12-15 15:03:16 +000086extern const char *
87_glapi_get_proc_name(GLuint offset);
88
89
Brian Paulfbd8f211999-11-11 01:22:25 +000090#endif