Tizen 2.0 Release
[profile/ivi/osmesa.git] / src / mesa / drivers / dri / mach64 / mach64_vb.h
1 /* -*- mode: c; c-basic-offset: 3 -*- */
2 /*
3  * Copyright 2000 Gareth Hughes
4  * All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice (including the next
14  * paragraph) shall be included in all copies or substantial portions of the
15  * Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20  * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN 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
25 /*
26  * Authors:
27  *      Gareth Hughes <gareth@valinux.com>
28  *      Leif Delgass <ldelgass@retinalburn.net>
29  *      José Fonseca <j_r_fonseca@yahoo.co.uk>
30  */
31
32 #ifndef __MACH64_VB_H__
33 #define __MACH64_VB_H__
34
35 #include "main/mtypes.h"
36 #include "swrast/swrast.h"
37 #include "mach64_context.h"
38
39 /* premultiply texture coordinates by homogenous coordinate */
40 #define MACH64_PREMULT_TEXCOORDS
41
42 #define _MACH64_NEW_VERTEX_STATE (_DD_NEW_SEPARATE_SPECULAR |          \
43                                _DD_NEW_TRI_LIGHT_TWOSIDE |             \
44                                _DD_NEW_TRI_UNFILLED |                  \
45                                _NEW_TEXTURE |                          \
46                                _NEW_FOG)
47
48
49 extern void mach64CheckTexSizes( struct gl_context *ctx );
50 extern void mach64ChooseVertexState( struct gl_context *ctx );
51
52 extern void mach64BuildVertices( struct gl_context *ctx, GLuint start, GLuint count,
53                                    GLuint newinputs );
54
55 extern void mach64PrintSetupFlags(char *msg, GLuint flags );
56
57 extern void mach64InitVB( struct gl_context *ctx );
58 extern void mach64FreeVB( struct gl_context *ctx );
59
60 #if 0
61 extern void mach64_emit_contiguous_verts( struct gl_context *ctx,
62                                             GLuint start,
63                                             GLuint count );
64
65 extern void mach64_emit_indexed_verts( struct gl_context *ctx,
66                                          GLuint start,
67                                          GLuint count );
68 #endif
69
70 extern void mach64_translate_vertex( struct gl_context *ctx,
71                                        const mach64Vertex *src,
72                                        SWvertex *dst );
73
74 extern void mach64_print_vertex( struct gl_context *ctx, const mach64Vertex *v );
75
76
77 #endif /* __MACH64_VB_H__ */