Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4358 | Serge | 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 OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
22 | * OTHER DEALINGS IN THE SOFTWARE. |
||
23 | */ |
||
24 | |||
25 | |||
26 | #ifndef TRANSFORM_FEEDBACK_H |
||
27 | #define TRANSFORM_FEEDBACK_H |
||
28 | |||
29 | #include |
||
30 | #include "compiler.h" |
||
31 | #include "glheader.h" |
||
32 | #include "mtypes.h" |
||
33 | |||
34 | struct _glapi_table; |
||
35 | struct dd_function_table; |
||
36 | struct gl_context; |
||
37 | |||
38 | extern void |
||
39 | _mesa_init_transform_feedback(struct gl_context *ctx); |
||
40 | |||
41 | extern void |
||
42 | _mesa_free_transform_feedback(struct gl_context *ctx); |
||
43 | |||
44 | extern GLboolean |
||
45 | _mesa_validate_transform_feedback_buffers(struct gl_context *ctx); |
||
46 | |||
47 | |||
48 | extern void |
||
49 | _mesa_init_transform_feedback_functions(struct dd_function_table *driver); |
||
50 | |||
51 | extern unsigned |
||
52 | _mesa_compute_max_transform_feedback_vertices( |
||
53 | const struct gl_transform_feedback_object *obj, |
||
54 | const struct gl_transform_feedback_info *info); |
||
55 | |||
56 | |||
57 | /*** GL_EXT_transform_feedback ***/ |
||
58 | |||
59 | extern void GLAPIENTRY |
||
60 | _mesa_BeginTransformFeedback(GLenum mode); |
||
61 | |||
62 | extern void GLAPIENTRY |
||
63 | _mesa_EndTransformFeedback(void); |
||
64 | |||
65 | extern void |
||
66 | _mesa_bind_buffer_range_transform_feedback(struct gl_context *ctx, |
||
67 | GLuint index, |
||
68 | struct gl_buffer_object *bufObj, |
||
69 | GLintptr offset, |
||
70 | GLsizeiptr size); |
||
71 | |||
72 | extern void |
||
73 | _mesa_bind_buffer_base_transform_feedback(struct gl_context *ctx, |
||
74 | GLuint index, |
||
75 | struct gl_buffer_object *bufObj); |
||
76 | |||
77 | extern void GLAPIENTRY |
||
78 | _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, |
||
79 | GLintptr offset); |
||
80 | |||
81 | extern void GLAPIENTRY |
||
82 | _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count, |
||
83 | const GLchar * const *varyings, |
||
84 | GLenum bufferMode); |
||
85 | |||
86 | extern void GLAPIENTRY |
||
87 | _mesa_GetTransformFeedbackVarying(GLuint program, GLuint index, |
||
88 | GLsizei bufSize, GLsizei *length, |
||
89 | GLsizei *size, GLenum *type, GLchar *name); |
||
90 | |||
91 | |||
92 | |||
93 | /*** GL_ARB_transform_feedback2 ***/ |
||
94 | |||
95 | struct gl_transform_feedback_object * |
||
96 | _mesa_lookup_transform_feedback_object(struct gl_context *ctx, GLuint name); |
||
97 | |||
98 | extern void GLAPIENTRY |
||
99 | _mesa_GenTransformFeedbacks(GLsizei n, GLuint *names); |
||
100 | |||
101 | extern GLboolean GLAPIENTRY |
||
102 | _mesa_IsTransformFeedback(GLuint name); |
||
103 | |||
104 | extern void GLAPIENTRY |
||
105 | _mesa_BindTransformFeedback(GLenum target, GLuint name); |
||
106 | |||
107 | extern void GLAPIENTRY |
||
108 | _mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names); |
||
109 | |||
110 | extern void GLAPIENTRY |
||
111 | _mesa_PauseTransformFeedback(void); |
||
112 | |||
113 | extern void GLAPIENTRY |
||
114 | _mesa_ResumeTransformFeedback(void); |
||
115 | |||
116 | static inline bool |
||
117 | _mesa_is_xfb_active_and_unpaused(const struct gl_context *ctx) |
||
118 | { |
||
119 | return ctx->TransformFeedback.CurrentObject->Active && |
||
120 | !ctx->TransformFeedback.CurrentObject->Paused; |
||
121 | } |
||
122 | |||
123 | #endif /* TRANSFORM_FEEDBACK_H */ |