123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell/*
223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Mesa 3-D graphics library
3a7e1b4456a08d84c976bd260d018ca88f35867e4Brian * Version:  7.1
45e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen *
5a7e1b4456a08d84c976bd260d018ca88f35867e4Brian * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
65e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen *
723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a
823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * copy of this software and associated documentation files (the "Software"),
923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * to deal in the Software without restriction, including without limitation
1023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * and/or sell copies of the Software, and to permit persons to whom the
1223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Software is furnished to do so, subject to the following conditions:
135e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen *
1423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * The above copyright notice and this permission notice shall be included
1523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * in all copies or substantial portions of the Software.
165e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen *
1723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
2023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
2123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell *
2423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Authors:
2505a4b37707d2c598ea68c05d07a3d65bcbf5a076Brian Paul *    Keith Whitwell <keith@tungstengraphics.com>
2623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell */
2723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
2823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#ifndef _TNL_H
2923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define _TNL_H
3023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
319db97618744a585a808bd9d51943cd6532b4da4eVinson Lee#include "main/glheader.h"
3223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
339db97618744a585a808bd9d51943cd6532b4da4eVinson Leestruct gl_client_array;
349db97618744a585a808bd9d51943cd6532b4da4eVinson Leestruct gl_context;
359db97618744a585a808bd9d51943cd6532b4da4eVinson Leestruct gl_program;
3623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
3723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
38cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell/* These are the public-access functions exported from tnl.  (A few
39cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * more are currently hooked into dispatch directly by the module
40cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * itself.)
4123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell */
4223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern GLboolean
43f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_CreateContext( struct gl_context *ctx );
4423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
4523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void
46f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_DestroyContext( struct gl_context *ctx );
4723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
4823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void
49f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_InvalidateState( struct gl_context *ctx, GLuint new_state );
5023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell
51ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell/* Functions to revive the tnl module after being unhooked from
52ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell * dispatch and/or driver callbacks.
53ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell */
54ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell
55ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwellextern void
56f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_wakeup( struct gl_context *ctx );
57ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell
5847a28c0b4d4ca27592e3cbb8e4b17d1cd8f7997dKeith Whitwell/* Driver configuration options:
5947a28c0b4d4ca27592e3cbb8e4b17d1cd8f7997dKeith Whitwell */
60cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwellextern void
61f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag );
62cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell
63790734045b69c47b1525fbf9106a7ca5a8eb7416Keith Whitwell
6409da0b8e6621a831e3eeb9381430f2bed18a22adBrian Paul/* Control whether T&L does per-vertex fog
6509da0b8e6621a831e3eeb9381430f2bed18a22adBrian Paul */
6609da0b8e6621a831e3eeb9381430f2bed18a22adBrian Paulextern void
67f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_allow_vertex_fog( struct gl_context *ctx, GLboolean value );
6809da0b8e6621a831e3eeb9381430f2bed18a22adBrian Paul
698d407300c2b94f32c955b6dd75c2e18d6d58caa5Brian Paulextern void
70f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_allow_pixel_fog( struct gl_context *ctx, GLboolean value );
718d407300c2b94f32c955b6dd75c2e18d6d58caa5Brian Paul
724ac9c80e5beea26e13ccf12ce6bd9ee051c229f5Brian Paulextern GLboolean
73f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_program_string(struct gl_context *ctx, GLenum target, struct gl_program *program);
7409da0b8e6621a831e3eeb9381430f2bed18a22adBrian Paul
75b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwellstruct _mesa_prim;
76b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwellstruct _mesa_index_buffer;
77b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell
78b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwellvoid
79f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_draw_prims( struct gl_context *ctx,
80b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell		 const struct gl_client_array *arrays[],
81b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell		 const struct _mesa_prim *prim,
82b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell		 GLuint nr_prims,
83b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell		 const struct _mesa_index_buffer *ib,
84b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell		 GLuint min_index,
85b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell		 GLuint max_index);
86b1f176039ae3690b38e3ccacb079b3d7c3e50402Keith Whitwell
872708ddfb06a36d8568e2aa130bf1f7d551fcd309Eric Anholtvoid
88f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_vbo_draw_prims( struct gl_context *ctx,
892708ddfb06a36d8568e2aa130bf1f7d551fcd309Eric Anholt		     const struct _mesa_prim *prim,
902708ddfb06a36d8568e2aa130bf1f7d551fcd309Eric Anholt		     GLuint nr_prims,
912708ddfb06a36d8568e2aa130bf1f7d551fcd309Eric Anholt		     const struct _mesa_index_buffer *ib,
922708ddfb06a36d8568e2aa130bf1f7d551fcd309Eric Anholt		     GLboolean index_bounds_valid,
932708ddfb06a36d8568e2aa130bf1f7d551fcd309Eric Anholt		     GLuint min_index,
9414bb957b996dcc5392b8fa589bd3ffa5c55cb6b4Marek Olšák		     GLuint max_index,
9514bb957b996dcc5392b8fa589bd3ffa5c55cb6b4Marek Olšák		     struct gl_transform_feedback_object *tfb_vertcount );
962708ddfb06a36d8568e2aa130bf1f7d551fcd309Eric Anholt
9736a0ee199ddc5f29273f9761eeed8e18ad5c874fBrianextern void
98f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_load_tracked_matrices(struct gl_context *ctx);
9936a0ee199ddc5f29273f9761eeed8e18ad5c874fBrian
1004c01d498fac14bba751dd87bff235efb5409dca9Brianextern void
101f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]);
1024c01d498fac14bba751dd87bff235efb5409dca9Brian
103ba1d921bdf7a15fcc4a4e3162ea6fe9810f233d6Mathias Fröhlichextern void
104ba1d921bdf7a15fcc4a4e3162ea6fe9810f233d6Mathias Fröhlich_tnl_validate_shine_tables( struct gl_context *ctx );
105ba1d921bdf7a15fcc4a4e3162ea6fe9810f233d6Mathias Fröhlich
10623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#endif
107