more work on DEFINE/DECLARATION statements, symbol tables
[mesa.git] / src / mesa / main / nvprogram.h
1 /* $Id: nvprogram.h,v 1.2 2003/02/16 23:07:36 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 5.1
6 *
7 * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 * Authors:
27 * Brian Paul
28 */
29
30
31 #ifndef NVPROGRAM_H
32 #define NVPROGRAM_H
33
34
35 enum symbol_type
36 {
37 Definition,
38 Declaration
39 };
40
41
42 extern void
43 _mesa_add_symbol(struct symbol_table *symbolTable,
44 const char *name, enum symbol_type type,
45 const GLfloat *value);
46
47 extern GLboolean
48 _mesa_lookup_symbol(const struct symbol_table *symbolTable,
49 const char *name, GLfloat *value);
50
51 extern void
52 _mesa_assign_program_registers(struct symbol_table *symbolTable);
53
54
55 extern void
56 _mesa_set_program_error(GLcontext *ctx, GLint pos, const char *string);
57
58 extern void
59 _mesa_delete_program(GLcontext *ctx, GLuint id);
60
61
62 extern void
63 _mesa_BindProgramNV(GLenum target, GLuint id);
64
65 extern void
66 _mesa_DeleteProgramsNV(GLsizei n, const GLuint *ids);
67
68 extern void
69 _mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params);
70
71 extern void
72 _mesa_GenProgramsNV(GLsizei n, GLuint *ids);
73
74 extern GLboolean
75 _mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences);
76
77 extern void
78 _mesa_RequestResidentProgramsNV(GLsizei n, const GLuint *ids);
79
80
81 extern void
82 _mesa_GetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat *params);
83
84 extern void
85 _mesa_GetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble *params);
86
87 extern void
88 _mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params);
89
90 extern void
91 _mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program);
92
93 extern void
94 _mesa_GetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint *params);
95
96 extern void
97 _mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params);
98
99 extern void
100 _mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params);
101
102 extern void
103 _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params);
104
105 extern void
106 _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer);
107
108 extern GLboolean
109 _mesa_IsProgramNV(GLuint id);
110
111 extern void
112 _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte *program);
113
114 extern void
115 _mesa_ProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
116
117 extern void
118 _mesa_ProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble *params);
119
120 extern void
121 _mesa_ProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
122
123 extern void
124 _mesa_ProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat *params);
125
126 extern void
127 _mesa_ProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble *params);
128
129 extern void
130 _mesa_ProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat *params);
131
132 extern void
133 _mesa_TrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform);
134
135
136 extern void
137 _mesa_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v);
138
139 extern void
140 _mesa_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v);
141
142 extern void
143 _mesa_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v);
144
145 extern void
146 _mesa_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v);
147
148 extern void
149 _mesa_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v);
150
151 extern void
152 _mesa_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v);
153
154 extern void
155 _mesa_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v);
156
157 extern void
158 _mesa_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v);
159
160 extern void
161 _mesa_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v);
162
163 extern void
164 _mesa_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v);
165
166 extern void
167 _mesa_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v);
168
169 extern void
170 _mesa_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v);
171
172 extern void
173 _mesa_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v);
174
175
176 #endif