99f75ee435744759913c28a905379f0f312e9b45
[mesa.git] / src / mesa / main / transformfeedback.h
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 2010 VMware, Inc. 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 shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24
25 #ifndef TRANSFORM_FEEDBACK_H
26 #define TRANSFORM_FEEDBACK_H
27
28 #include "glheader.h"
29
30
31 extern GLboolean
32 _mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode);
33
34 extern GLboolean
35 _mesa_validate_transform_feedback_buffers(GLcontext *ctx);
36
37 extern void
38 _mesa_init_transform_feedback(GLcontext *ctx);
39
40 extern void
41 _mesa_free_transform_feedback(GLcontext *ctx);
42
43
44 extern void
45 _mesa_init_transform_feedback_functions(struct dd_function_table *driver);
46
47
48 /*** GL_EXT_transform_feedback ***/
49
50 extern void GLAPIENTRY
51 _mesa_BeginTransformFeedback(GLenum mode);
52
53 extern void GLAPIENTRY
54 _mesa_EndTransformFeedback(void);
55
56 extern void GLAPIENTRY
57 _mesa_BindBufferRange(GLenum target, GLuint index,
58 GLuint buffer, GLintptr offset, GLsizeiptr size);
59
60 extern void GLAPIENTRY
61 _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer);
62
63 extern void GLAPIENTRY
64 _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer,
65 GLintptr offset);
66
67 extern void GLAPIENTRY
68 _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
69 const GLchar **varyings, GLenum bufferMode);
70
71 extern void GLAPIENTRY
72 _mesa_GetTransformFeedbackVarying(GLuint program, GLuint index,
73 GLsizei bufSize, GLsizei *length,
74 GLsizei *size, GLenum *type, GLchar *name);
75
76
77
78 /*** GL_ARB_transform_feedback2 ***/
79
80 extern void GLAPIENTRY
81 _mesa_GenTransformFeedbacks(GLsizei n, GLuint *names);
82
83 extern GLboolean GLAPIENTRY
84 _mesa_IsTransformFeedback(GLuint name);
85
86 extern void GLAPIENTRY
87 _mesa_BindTransformFeedback(GLenum target, GLuint name);
88
89 extern void GLAPIENTRY
90 _mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names);
91
92 extern void GLAPIENTRY
93 _mesa_PauseTransformFeedback(void);
94
95 extern void GLAPIENTRY
96 _mesa_ResumeTransformFeedback(void);
97
98 extern void GLAPIENTRY
99 _mesa_DrawTransformFeedback(GLenum mode, GLuint name);
100
101
102 #endif /* TRANSFORM_FEEDBACK_H */