blob: 41d7aaf0287e4f30c9bee3073c23cfd7f04f631d [file] [log] [blame]
Brian Paulfbd8f211999-11-11 01:22:25 +00001
2/*
3 * Mesa 3-D graphics library
Brian Paul3a71d052000-09-05 20:17:37 +00004 * Version: 3.5
Brian Paulfbd8f211999-11-11 01:22:25 +00005 *
Brian Paulab0c8862001-01-23 23:35:47 +00006 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
Brian Paulfbd8f211999-11-11 01:22:25 +00007 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26
Brian Paulfbd8f211999-11-11 01:22:25 +000027#ifndef _GLAPI_H
28#define _GLAPI_H
29
30
31#include "GL/gl.h"
Brian Paul3aecc511999-12-16 12:38:54 +000032
33struct _glapi_table;
Brian Paulfbd8f211999-11-11 01:22:25 +000034
Brian Paul4e9676f2002-06-29 19:48:15 +000035typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
36
Brian Paulfbd8f211999-11-11 01:22:25 +000037
Brian Paulf9b97d92000-01-28 20:17:42 +000038extern void *_glapi_Context;
Brian Paul8f91fb61999-12-17 14:51:28 +000039
Brian Paul328bb7f2000-01-17 19:28:43 +000040extern struct _glapi_table *_glapi_Dispatch;
41
Brian Paul8f91fb61999-12-17 14:51:28 +000042
Brian Paulfbd8f211999-11-11 01:22:25 +000043extern void
Brian Paul3c257e12001-03-28 17:19:58 +000044_glapi_noop_enable_warnings(GLboolean enable);
45
Brian Paul4e9676f2002-06-29 19:48:15 +000046extern void
47_glapi_set_warning_func(_glapi_warning_func func);
Brian Paul3c257e12001-03-28 17:19:58 +000048
49extern void
Brian Paulbb72d321999-12-16 17:31:59 +000050_glapi_check_multithread(void);
51
52
53extern void
Brian Paulf9b97d92000-01-28 20:17:42 +000054_glapi_set_context(void *context);
Brian Paul8f91fb61999-12-17 14:51:28 +000055
56
57extern void *
Brian Paulf9b97d92000-01-28 20:17:42 +000058_glapi_get_context(void);
Brian Paul8f91fb61999-12-17 14:51:28 +000059
60
61extern void
Brian Paulfbd8f211999-11-11 01:22:25 +000062_glapi_set_dispatch(struct _glapi_table *dispatch);
63
64
65extern struct _glapi_table *
66_glapi_get_dispatch(void);
67
68
Brian Paulab0c8862001-01-23 23:35:47 +000069extern int
70_glapi_begin_dispatch_override(struct _glapi_table *override);
71
72
73extern void
74_glapi_end_dispatch_override(int layer);
75
76
77struct _glapi_table *
78_glapi_get_override_dispatch(int layer);
Brian Paul3a71d052000-09-05 20:17:37 +000079
80
Brian Paul91bcefa1999-11-27 21:30:40 +000081extern GLuint
82_glapi_get_dispatch_table_size(void);
83
84
Brian Paulfbd8f211999-11-11 01:22:25 +000085extern const char *
86_glapi_get_version(void);
87
88
Brian Paulfbd8f211999-11-11 01:22:25 +000089extern void
90_glapi_check_table(const struct _glapi_table *table);
91
92
Brian Paul91bcefa1999-11-27 21:30:40 +000093extern GLboolean
94_glapi_add_entrypoint(const char *funcName, GLuint offset);
Brian Paulfbd8f211999-11-11 01:22:25 +000095
96
97extern GLint
Brian Paul91bcefa1999-11-27 21:30:40 +000098_glapi_get_proc_offset(const char *funcName);
Brian Paulfbd8f211999-11-11 01:22:25 +000099
100
101extern const GLvoid *
102_glapi_get_proc_address(const char *funcName);
103
104
Brian Paulacd18101999-12-15 15:03:16 +0000105extern const char *
106_glapi_get_proc_name(GLuint offset);
107
108
Brian Paulfbd8f211999-11-11 01:22:25 +0000109#endif