2 * Mesa 3-D graphics library
4 * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
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:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
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.
25 #ifndef TRANSFORM_FEEDBACK_H
26 #define TRANSFORM_FEEDBACK_H
30 #include "mfeatures.h"
33 struct dd_function_table
;
37 _mesa_init_transform_feedback(struct gl_context
*ctx
);
40 _mesa_free_transform_feedback(struct gl_context
*ctx
);
42 #if FEATURE_EXT_transform_feedback
45 _mesa_validate_primitive_mode(struct gl_context
*ctx
, GLenum mode
);
48 _mesa_validate_transform_feedback_buffers(struct gl_context
*ctx
);
52 _mesa_init_transform_feedback_functions(struct dd_function_table
*driver
);
55 _mesa_init_transform_feedback_dispatch(struct _glapi_table
*disp
);
58 /*** GL_EXT_transform_feedback ***/
60 extern void GLAPIENTRY
61 _mesa_BeginTransformFeedback(GLenum mode
);
63 extern void GLAPIENTRY
64 _mesa_EndTransformFeedback(void);
66 extern void GLAPIENTRY
67 _mesa_BindBufferRange(GLenum target
, GLuint index
,
68 GLuint buffer
, GLintptr offset
, GLsizeiptr size
);
70 extern void GLAPIENTRY
71 _mesa_BindBufferBase(GLenum target
, GLuint index
, GLuint buffer
);
73 extern void GLAPIENTRY
74 _mesa_BindBufferOffsetEXT(GLenum target
, GLuint index
, GLuint buffer
,
77 extern void GLAPIENTRY
78 _mesa_TransformFeedbackVaryings(GLuint program
, GLsizei count
,
79 const GLchar
**varyings
, GLenum bufferMode
);
81 extern void GLAPIENTRY
82 _mesa_GetTransformFeedbackVarying(GLuint program
, GLuint index
,
83 GLsizei bufSize
, GLsizei
*length
,
84 GLsizei
*size
, GLenum
*type
, GLchar
*name
);
88 /*** GL_ARB_transform_feedback2 ***/
90 extern void GLAPIENTRY
91 _mesa_GenTransformFeedbacks(GLsizei n
, GLuint
*names
);
93 extern GLboolean GLAPIENTRY
94 _mesa_IsTransformFeedback(GLuint name
);
96 extern void GLAPIENTRY
97 _mesa_BindTransformFeedback(GLenum target
, GLuint name
);
99 extern void GLAPIENTRY
100 _mesa_DeleteTransformFeedbacks(GLsizei n
, const GLuint
*names
);
102 extern void GLAPIENTRY
103 _mesa_PauseTransformFeedback(void);
105 extern void GLAPIENTRY
106 _mesa_ResumeTransformFeedback(void);
108 extern void GLAPIENTRY
109 _mesa_DrawTransformFeedback(GLenum mode
, GLuint name
);
111 #else /* FEATURE_EXT_transform_feedback */
113 static INLINE GLboolean
114 _mesa_validate_primitive_mode(struct gl_context
*ctx
, GLenum mode
)
119 static INLINE GLboolean
120 _mesa_validate_transform_feedback_buffers(struct gl_context
*ctx
)
126 _mesa_init_transform_feedback_functions(struct dd_function_table
*driver
)
131 _mesa_init_transform_feedback_dispatch(struct _glapi_table
*disp
)
135 #endif /* FEATURE_EXT_transform_feedback */
137 #endif /* TRANSFORM_FEEDBACK_H */