1 /*
2  * Copyright (c) 2002-2008 LWJGL Project
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  *   notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  *   notice, this list of conditions and the following disclaimer in the
14  *   documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of 'LWJGL' nor the names of
17  *   its contributors may be used to endorse or promote products derived
18  *   from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 package org.lwjgl.opengl;
33 
34 import org.lwjgl.util.generator.*;
35 import org.lwjgl.util.generator.Alternate;
36 import org.lwjgl.util.generator.opengl.*;
37 
38 import java.nio.ByteBuffer;
39 import java.nio.IntBuffer;
40 
41 public interface EXT_transform_feedback {
42 
43 	/**
44 	 * Accepted by the <target> parameters of BindBuffer, BufferData,
45 	 * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData,
46 	 * GetBufferPointerv, BindBufferRangeEXT, BindBufferOffsetEXT and
47 	 * BindBufferBaseEXT:
48 	 */
49 	int GL_TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E;
50 
51 	/**
52 	 * Accepted by the <param> parameter of GetIntegerIndexedvEXT and
53 	 * GetBooleanIndexedvEXT:
54 	 */
55 	int GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84;
56 	int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85;
57 
58 	/**
59 	 * Accepted by the <param> parameter of GetIntegerIndexedvEXT and
60 	 * GetBooleanIndexedvEXT, and by the <pname> parameter of GetBooleanv,
61 	 * GetDoublev, GetIntegerv, and GetFloatv:
62 	 */
63 	int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F;
64 
65 	/** Accepted by the <bufferMode> parameter of TransformFeedbackVaryingsEXT: */
66 	int GL_INTERLEAVED_ATTRIBS_EXT = 0x8C8C;
67 	int GL_SEPARATE_ATTRIBS_EXT = 0x8C8D;
68 
69 	/**
70 	 * Accepted by the <target> parameter of BeginQuery, EndQuery, and
71 	 * GetQueryiv:
72 	 */
73 	int GL_PRIMITIVES_GENERATED_EXT = 0x8C87;
74 	int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88;
75 
76 	/**
77 	 * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by
78 	 * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
79 	 * GetDoublev:
80 	 */
81 	int GL_RASTERIZER_DISCARD_EXT = 0x8C89;
82 
83 	/**
84 	 * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv,
85 	 * and GetFloatv:
86 	 */
87 	int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A;
88 	int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B;
89 	int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80;
90 
91 	/** Accepted by the <pname> parameter of GetProgramiv: */
92 	int GL_TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83;
93 	int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F;
94 	int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76;
95 
glBindBufferRangeEXT(@Lenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size)96 	void glBindBufferRangeEXT(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size);
97 
glBindBufferOffsetEXT(@Lenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset)98 	void glBindBufferOffsetEXT(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset);
99 
glBindBufferBaseEXT(@Lenum int target, @GLuint int index, @GLuint int buffer)100 	void glBindBufferBaseEXT(@GLenum int target, @GLuint int index, @GLuint int buffer);
101 
glBeginTransformFeedbackEXT(@Lenum int primitiveMode)102 	void glBeginTransformFeedbackEXT(@GLenum int primitiveMode);
103 
glEndTransformFeedbackEXT()104 	void glEndTransformFeedbackEXT();
105 
glTransformFeedbackVaryingsEXT(@Luint int program, @GLsizei int count, @Const @NullTerminated(R) @GLchar @PointerArray(R) ByteBuffer varyings, @GLenum int bufferMode)106 	void glTransformFeedbackVaryingsEXT(@GLuint int program, @GLsizei int count,
107 	                                    @Const @NullTerminated("count") @GLchar @PointerArray("count") ByteBuffer varyings,
108 	                                    @GLenum int bufferMode);
109 
110 	@Alternate("glTransformFeedbackVaryingsEXT")
glTransformFeedbackVaryingsEXT(@Luint int program, @Constant(R) @GLsizei int count, @Const @NullTerminated @PointerArray(R) CharSequence[] varyings, @GLenum int bufferMode)111 	void glTransformFeedbackVaryingsEXT(@GLuint int program, @Constant("varyings.length") @GLsizei int count,
112 	                                    @Const @NullTerminated @PointerArray("count") CharSequence[] varyings,
113 	                                    @GLenum int bufferMode);
114 
glGetTransformFeedbackVaryingEXT(@Luint int program, @GLuint int index, @AutoSize(R) @GLsizei int bufSize, @OutParameter @GLsizei @Check(value = R, canBeNull = true) IntBuffer length, @OutParameter @GLsizei @Check(R) IntBuffer size, @OutParameter @GLenum @Check(R) IntBuffer type, @OutParameter @GLchar ByteBuffer name)115 	void glGetTransformFeedbackVaryingEXT(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufSize,
116 	                                      @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
117 	                                      @OutParameter @GLsizei @Check("1") IntBuffer size,
118 	                                      @OutParameter @GLenum @Check("1") IntBuffer type,
119 	                                      @OutParameter @GLchar ByteBuffer name);
120 
121 	@Alternate("glGetTransformFeedbackVaryingEXT")
122 	@GLreturn(value = "name", maxLength = "bufSize")
glGetTransformFeedbackVaryingEXT2(@Luint int program, @GLuint int index, @GLsizei int bufSize, @OutParameter @GLsizei @Constant(R) IntBuffer length, @OutParameter @GLsizei @Check(R) IntBuffer size, @OutParameter @GLenum @Check(R) IntBuffer type, @OutParameter @GLchar ByteBuffer name)123 	void glGetTransformFeedbackVaryingEXT2(@GLuint int program, @GLuint int index, @GLsizei int bufSize,
124 	                                       @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length,
125 	                                       @OutParameter @GLsizei @Check("1") IntBuffer size,
126 	                                       @OutParameter @GLenum @Check("1") IntBuffer type,
127 	                                       @OutParameter @GLchar ByteBuffer name);
128 
129 }