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 "compiler.h" 29#include "glheader.h" 30#include "mfeatures.h" 31 32struct _glapi_table; 33struct dd_function_table; 34struct gl_context; 35 36extern void 37_mesa_init_transform_feedback(struct gl_context *ctx); 38 39extern void 40_mesa_free_transform_feedback(struct gl_context *ctx); 41 42#if FEATURE_EXT_transform_feedback 43 44extern GLboolean 45_mesa_validate_transform_feedback_buffers(struct gl_context *ctx); 46 47 48extern void 49_mesa_init_transform_feedback_functions(struct dd_function_table *driver); 50 51extern void 52_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp); 53 54 55/*** GL_EXT_transform_feedback ***/ 56 57extern void GLAPIENTRY 58_mesa_BeginTransformFeedback(GLenum mode); 59 60extern void GLAPIENTRY 61_mesa_EndTransformFeedback(void); 62 63extern void 64_mesa_bind_buffer_range_transform_feedback(struct gl_context *ctx, 65 GLuint index, 66 struct gl_buffer_object *bufObj, 67 GLintptr offset, 68 GLsizeiptr size); 69 70extern void 71_mesa_bind_buffer_base_transform_feedback(struct gl_context *ctx, 72 GLuint index, 73 struct gl_buffer_object *bufObj); 74 75extern void GLAPIENTRY 76_mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, 77 GLintptr offset); 78 79extern void GLAPIENTRY 80_mesa_TransformFeedbackVaryings(GLuint program, GLsizei count, 81 const GLchar **varyings, GLenum bufferMode); 82 83extern void GLAPIENTRY 84_mesa_GetTransformFeedbackVarying(GLuint program, GLuint index, 85 GLsizei bufSize, GLsizei *length, 86 GLsizei *size, GLenum *type, GLchar *name); 87 88 89 90/*** GL_ARB_transform_feedback2 ***/ 91 92struct gl_transform_feedback_object * 93_mesa_lookup_transform_feedback_object(struct gl_context *ctx, GLuint name); 94 95extern void GLAPIENTRY 96_mesa_GenTransformFeedbacks(GLsizei n, GLuint *names); 97 98extern GLboolean GLAPIENTRY 99_mesa_IsTransformFeedback(GLuint name); 100 101extern void GLAPIENTRY 102_mesa_BindTransformFeedback(GLenum target, GLuint name); 103 104extern void GLAPIENTRY 105_mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names); 106 107extern void GLAPIENTRY 108_mesa_PauseTransformFeedback(void); 109 110extern void GLAPIENTRY 111_mesa_ResumeTransformFeedback(void); 112 113#else /* FEATURE_EXT_transform_feedback */ 114 115static inline GLboolean 116_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode) 117{ 118 return GL_TRUE; 119} 120 121static inline GLboolean 122_mesa_validate_transform_feedback_buffers(struct gl_context *ctx) 123{ 124 return GL_TRUE; 125} 126 127static inline void 128_mesa_init_transform_feedback_functions(struct dd_function_table *driver) 129{ 130} 131 132static inline void 133_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp) 134{ 135} 136 137#endif /* FEATURE_EXT_transform_feedback */ 138 139#endif /* TRANSFORM_FEEDBACK_H */ 140