blob: be62118b57fa63f03da38b0dc49ec5fdcf62c7f6 [file] [log] [blame]
Brian Paul4e9676f2002-06-29 19:48:15 +00001/* $Id: glapi.h,v 1.20 2002/06/29 19:48:16 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
Brian Paul4e9676f2002-06-29 19:48:15 +000036typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
37
Brian Paulfbd8f211999-11-11 01:22:25 +000038
Brian Paulf9b97d92000-01-28 20:17:42 +000039extern void *_glapi_Context;
Brian Paul8f91fb61999-12-17 14:51:28 +000040
Brian Paul328bb7f2000-01-17 19:28:43 +000041extern struct _glapi_table *_glapi_Dispatch;
42
Brian Paul8f91fb61999-12-17 14:51:28 +000043
Brian Paulfbd8f211999-11-11 01:22:25 +000044extern void
Brian Paul3c257e12001-03-28 17:19:58 +000045_glapi_noop_enable_warnings(GLboolean enable);
46
Brian Paul4e9676f2002-06-29 19:48:15 +000047extern void
48_glapi_set_warning_func(_glapi_warning_func func);
Brian Paul3c257e12001-03-28 17:19:58 +000049
50extern void
Brian Paulbb72d321999-12-16 17:31:59 +000051_glapi_check_multithread(void);
52
53
54extern void
Brian Paulf9b97d92000-01-28 20:17:42 +000055_glapi_set_context(void *context);
Brian Paul8f91fb61999-12-17 14:51:28 +000056
57
58extern void *
Brian Paulf9b97d92000-01-28 20:17:42 +000059_glapi_get_context(void);
Brian Paul8f91fb61999-12-17 14:51:28 +000060
61
62extern void
Brian Paulfbd8f211999-11-11 01:22:25 +000063_glapi_set_dispatch(struct _glapi_table *dispatch);
64
65
66extern struct _glapi_table *
67_glapi_get_dispatch(void);
68
69
Brian Paulab0c8862001-01-23 23:35:47 +000070extern int
71_glapi_begin_dispatch_override(struct _glapi_table *override);
72
73
74extern void
75_glapi_end_dispatch_override(int layer);
76
77
78struct _glapi_table *
79_glapi_get_override_dispatch(int layer);
Brian Paul3a71d052000-09-05 20:17:37 +000080
81
Brian Paul91bcefa1999-11-27 21:30:40 +000082extern GLuint
83_glapi_get_dispatch_table_size(void);
84
85
Brian Paulfbd8f211999-11-11 01:22:25 +000086extern const char *
87_glapi_get_version(void);
88
89
Brian Paulfbd8f211999-11-11 01:22:25 +000090extern void
91_glapi_check_table(const struct _glapi_table *table);
92
93
Brian Paul91bcefa1999-11-27 21:30:40 +000094extern GLboolean
95_glapi_add_entrypoint(const char *funcName, GLuint offset);
Brian Paulfbd8f211999-11-11 01:22:25 +000096
97
98extern GLint
Brian Paul91bcefa1999-11-27 21:30:40 +000099_glapi_get_proc_offset(const char *funcName);
Brian Paulfbd8f211999-11-11 01:22:25 +0000100
101
102extern const GLvoid *
103_glapi_get_proc_address(const char *funcName);
104
105
Brian Paulacd18101999-12-15 15:03:16 +0000106extern const char *
107_glapi_get_proc_name(GLuint offset);
108
109
Brian Paulfbd8f211999-11-11 01:22:25 +0000110#endif