Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
[mesa.git] / src / mesa / tnl / tnl.h
1 /*
2 * Mesa 3-D graphics library
3 * Version: 7.1
4 *
5 * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors:
25 * Keith Whitwell <keith@tungstengraphics.com>
26 */
27
28 #ifndef _TNL_H
29 #define _TNL_H
30
31 #include "main/mtypes.h"
32
33
34
35 /* These are the public-access functions exported from tnl. (A few
36 * more are currently hooked into dispatch directly by the module
37 * itself.)
38 */
39 extern GLboolean
40 _tnl_CreateContext( GLcontext *ctx );
41
42 extern void
43 _tnl_DestroyContext( GLcontext *ctx );
44
45 extern void
46 _tnl_InvalidateState( GLcontext *ctx, GLuint new_state );
47
48 /* Functions to revive the tnl module after being unhooked from
49 * dispatch and/or driver callbacks.
50 */
51
52 extern void
53 _tnl_wakeup( GLcontext *ctx );
54
55 /* Driver configuration options:
56 */
57 extern void
58 _tnl_need_projected_coords( GLcontext *ctx, GLboolean flag );
59
60
61 /* Control whether T&L does per-vertex fog
62 */
63 extern void
64 _tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value );
65
66 extern void
67 _tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value );
68
69 extern void
70 _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program);
71
72 struct _mesa_prim;
73 struct _mesa_index_buffer;
74
75 void
76 _tnl_draw_prims( GLcontext *ctx,
77 const struct gl_client_array *arrays[],
78 const struct _mesa_prim *prim,
79 GLuint nr_prims,
80 const struct _mesa_index_buffer *ib,
81 GLuint min_index,
82 GLuint max_index);
83
84 void
85 _tnl_vbo_draw_prims( GLcontext *ctx,
86 const struct gl_client_array *arrays[],
87 const struct _mesa_prim *prim,
88 GLuint nr_prims,
89 const struct _mesa_index_buffer *ib,
90 GLboolean index_bounds_valid,
91 GLuint min_index,
92 GLuint max_index);
93
94 extern void
95 _mesa_load_tracked_matrices(GLcontext *ctx);
96
97 extern void
98 _tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]);
99
100 #endif