2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
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:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
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.
27 * Vertex and fragment program support functions.
33 * \mainpage Mesa vertex and fragment program module
35 * This module or directory contains most of the code for vertex and
36 * fragment programs and shaders, including state management, parsers,
37 * and (some) software routines for executing programs
46 extern struct gl_program _mesa_DummyProgram
;
54 _mesa_init_program(GLcontext
*ctx
);
57 _mesa_free_program_data(GLcontext
*ctx
);
60 _mesa_update_default_objects_program(GLcontext
*ctx
);
63 _mesa_set_program_error(GLcontext
*ctx
, GLint pos
, const char *string
);
65 extern const GLubyte
*
66 _mesa_find_line_column(const GLubyte
*string
, const GLubyte
*pos
,
67 GLint
*line
, GLint
*col
);
70 extern struct gl_program
*
71 _mesa_init_vertex_program(GLcontext
*ctx
,
72 struct gl_vertex_program
*prog
,
73 GLenum target
, GLuint id
);
75 extern struct gl_program
*
76 _mesa_init_fragment_program(GLcontext
*ctx
,
77 struct gl_fragment_program
*prog
,
78 GLenum target
, GLuint id
);
80 extern struct gl_program
*
81 _mesa_new_program(GLcontext
*ctx
, GLenum target
, GLuint id
);
84 _mesa_delete_program(GLcontext
*ctx
, struct gl_program
*prog
);
86 extern struct gl_program
*
87 _mesa_lookup_program(GLcontext
*ctx
, GLuint id
);
90 extern struct gl_program
*
91 _mesa_clone_program(GLcontext
*ctx
, const struct gl_program
*prog
);
95 * API functions common to ARB/NV_vertex/fragment_program
98 extern void GLAPIENTRY
99 _mesa_BindProgram(GLenum target
, GLuint id
);
101 extern void GLAPIENTRY
102 _mesa_DeletePrograms(GLsizei n
, const GLuint
*ids
);
104 extern void GLAPIENTRY
105 _mesa_GenPrograms(GLsizei n
, GLuint
*ids
);
109 #endif /* PROGRAM_H */