Before calling _mesa_create_context(), initialize a dd_function_table struct
[mesa.git] / src / mesa / drivers / dri / r200 / r200_state.h
1 /* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_state.h,v 1.2 2002/11/05 17:46:08 tsi Exp $ */
2 /*
3 Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
4
5 The Weather Channel (TM) funded Tungsten Graphics to develop the
6 initial release of the Radeon 8500 driver under the XFree86 license.
7 This notice must be preserved.
8
9 Permission is hereby granted, free of charge, to any person obtaining
10 a copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sublicense, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
16
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial
19 portions of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
25 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
29 **************************************************************************/
30
31 /*
32 * Authors:
33 * Keith Whitwell <keith@tungstengraphics.com>
34 */
35
36 #ifndef __R200_STATE_H__
37 #define __R200_STATE_H__
38
39 #ifdef GLX_DIRECT_RENDERING
40
41 #include "r200_context.h"
42
43 extern void r200InitState( r200ContextPtr rmesa );
44 extern void r200InitStateFuncs( struct dd_function_table *functions );
45 extern void r200InitTnlFuncs( GLcontext *ctx );
46
47 extern void r200UpdateMaterial( GLcontext *ctx );
48
49 extern void r200SetCliprects( r200ContextPtr rmesa, GLenum mode );
50 extern void r200RecalcScissorRects( r200ContextPtr rmesa );
51 extern void r200UpdateViewportOffset( GLcontext *ctx );
52 extern void r200UpdateWindow( GLcontext *ctx );
53
54 extern void r200ValidateState( GLcontext *ctx );
55
56 extern void r200PrintDirty( r200ContextPtr rmesa,
57 const char *msg );
58
59
60 extern void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode );
61 #define FALLBACK( rmesa, bit, mode ) do { \
62 if ( 0 ) fprintf( stderr, "FALLBACK in %s: #%d=%d\n", \
63 __FUNCTION__, bit, mode ); \
64 r200Fallback( rmesa->glCtx, bit, mode ); \
65 } while (0)
66
67 extern void r200LightingSpaceChange( GLcontext *ctx );
68
69 #endif
70 #endif