JOGL v2.6.0-rc-20250722
JOGL, High-Performance Graphics Binding for Java™ (public API).
ComputeShader01GL4ES31.java
Go to the documentation of this file.
1/**
2 * Copyright 2025 JogAmp Community. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without modification, are
5 * permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice, this list of
8 * conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11 * of conditions and the following disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * The views and conclusions contained in the software and documentation are those of the
25 * authors and should not be interpreted as representing official policies, either expressed
26 * or implied, of JogAmp Community.
27 */
28package com.jogamp.opengl.demos.gl4es31;
29
30import com.jogamp.common.util.VersionUtil;
31import com.jogamp.newt.event.WindowAdapter;
32import com.jogamp.newt.event.WindowEvent;
33import com.jogamp.newt.opengl.GLWindow;
34import com.jogamp.opengl.GL;
35import com.jogamp.opengl.GL2ES2;
36import com.jogamp.opengl.GL2ES3;
37import com.jogamp.opengl.GL3;
38import com.jogamp.opengl.GL3ES3;
39import com.jogamp.opengl.GLAutoDrawable;
40import com.jogamp.opengl.GLCapabilities;
41import com.jogamp.opengl.GLEventListener;
42import com.jogamp.opengl.GLException;
43import com.jogamp.opengl.GLUniformData;
44import com.jogamp.opengl.demos.util.CommandlineOptions;
45import com.jogamp.opengl.fixedfunc.GLMatrixFunc;
46import com.jogamp.opengl.util.Animator;
47import com.jogamp.opengl.util.GLBuffers;
48import com.jogamp.opengl.util.PMVMatrix;
49import com.jogamp.opengl.util.caps.NonFSAAGLCapsChooser;
50import com.jogamp.opengl.util.glsl.ShaderCode;
51import com.jogamp.opengl.util.glsl.ShaderProgram;
52import com.jogamp.opengl.util.glsl.ShaderState;
53import com.jogamp.opengl.util.glsl.ShaderUtil;
54
55/**
56 * JOGL Compute ShaderCode demo using OpenGL 4.3 or ES 3.1 core profile features.
57 *
58 * The compute shader fills tuples of vertices + color attributes in a VBO buffer,
59 * passed directly to the vertex-shader w/o leaving the GPU.
60 */
61public class ComputeShader01GL4ES31 implements GLEventListener {
62 private ShaderState stComp, stGfx;
63 private PMVMatrix pmvMatrix;
64 private GLUniformData pmvMatrixUniform, uRadius;
65 private boolean usesPMVMatrix;
66 private int iVBO;
67 private int iLocVertex = -1, iLocColor = -1;
68
69 private static final int FloatByteSize = GLBuffers.sizeOfGLType(GL.GL_FLOAT);
70 private static final int CompPerElem = 3;
71 private static final int BytesPerElem = CompPerElem * FloatByteSize;
72 private static final int ByteStride = 2 * CompPerElem * FloatByteSize;
73 private static final String shaderBasename = "compute01_xxx";
74
76 }
77
78 private static final int GROUP_SIZE_HEIGHT = 8, GROUP_SIZE_WIDTH = 8;
79 private static final int NUM_VERTS_H = 16, NUM_VERTS_V = 16;
80 // private static final int LOCAL_SIZE_X = 8, LOCAL_SIZE_y = 8; // in compute shader
81
82 @Override
83 public void init(final GLAutoDrawable drawable) {
84 {
85 final GL gl = drawable.getGL();
86 System.err.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
87 System.err.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
88 System.err.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
89 System.err.println("GL GLSL: "+gl.hasGLSL()+", has-compiler-func: "+gl.isFunctionAvailable("glCompileShader")+", version "+(gl.hasGLSL() ? gl.glGetString(GL2ES2.GL_SHADING_LANGUAGE_VERSION) : "none"));
90 System.err.println("GL Profile: "+gl.getGLProfile());
91 System.err.println("GL Renderer Quirks:" + gl.getContext().getRendererQuirks().toString());
92 System.err.println("GL:" + gl + ", " + gl.getContext().getGLVersion());
94 throw new RuntimeException("GL object not >= 4.3 or ES >= 3.1, i.e. no compute shader support.: "+gl);
95 }
96 }
97 final GL3 gl = drawable.getGL().getGL3();
98
99 {
100 final int[] tmp = new int[1];
101 gl.glGenBuffers(1, tmp, 0);
102 iVBO = tmp[0];
103 if(0 == iVBO) {
104 throw new GLException("Couldn't create VBO");
105 }
107 gl.glBufferData(GL.GL_ARRAY_BUFFER, NUM_VERTS_H * NUM_VERTS_V * ByteStride, null, GL.GL_STATIC_DRAW);
109 System.err.println("iVBO: "+iVBO+": "+NUM_VERTS_H+"x"+NUM_VERTS_V);
110 }
111 {
112 final ShaderCode cs = ShaderCode.create(gl, GL3ES3.GL_COMPUTE_SHADER, this.getClass(),
113 "shader", "shader/bin", shaderBasename, true);
114 cs.defaultShaderCustomization(gl, true, true);
115
116 final ShaderProgram sp = new ShaderProgram();
117 sp.add(gl, cs, System.err);
118 if(!sp.link(gl, System.err)) {
119 throw new GLException("Couldn't link program: "+sp);
120 }
121 stComp=new ShaderState();
122 stComp.attachShaderProgram(gl, sp, true);
123 uRadius = new GLUniformData("radius", 1.0f);
124 stComp.ownUniform(uRadius);
125 if(!stComp.uniform(gl, uRadius)) {
126 throw new GLException("Error setting radius in shader: "+uRadius);
127 }
128 System.err.println("uRadius: "+uRadius);
129 stComp.useProgram(gl, false);
130 }
131 {
132 usesPMVMatrix = true;
133 final ShaderCode vs, fs;
134 vs = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(),
135 "shader", "shader/bin", shaderBasename, true);
136 fs = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(),
137 "shader", "shader/bin", shaderBasename, true);
138 vs.defaultShaderCustomization(gl, true, true);
139 fs.defaultShaderCustomization(gl, true, true);
140
141 final ShaderProgram sp = new ShaderProgram();
142 sp.add(gl, vs, System.err);
143 sp.add(gl, fs, System.err);
144 if(!sp.link(gl, System.err)) {
145 throw new GLException("Couldn't link program: "+sp);
146 }
147 stGfx=new ShaderState();
148 stGfx.attachShaderProgram(gl, sp, true);
149
150 // setup mgl_PMVMatrix
151 pmvMatrix = new PMVMatrix();
153 pmvMatrix.glLoadIdentity();
155 pmvMatrix.glLoadIdentity();
156 if( usesPMVMatrix ) {
157 pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); // P, Mv
158 stGfx.ownUniform(pmvMatrixUniform);
159 if(!stGfx.uniform(gl, pmvMatrixUniform)) {
160 throw new GLException("Error setting PMVMatrix in shader: "+stGfx);
161 }
162 }
163 iLocVertex = gl.glGetAttribLocation(sp.program(), "gca_Vertex");
164 if( iLocVertex < 0 ) {
165 throw new GLException("Couldn't find gca_Vertex: "+sp);
166 }
167 iLocColor = gl.glGetAttribLocation(sp.program(), "gca_Color");
168 if( iLocColor < 0 ) {
169 throw new GLException("Couldn't find gca_Color: "+sp);
170 }
171 System.err.println("iLocVertex: "+iLocVertex);
172 System.err.println("iLocColor: "+iLocColor);
173
175 gl.glEnableVertexAttribArray(iLocVertex);
176 gl.glEnableVertexAttribArray(iLocColor);
177 gl.glVertexAttribPointer(iLocVertex, CompPerElem, GL.GL_FLOAT, false, ByteStride, 0);
178 gl.glVertexAttribPointer(iLocColor, CompPerElem, GL.GL_FLOAT, false, ByteStride, BytesPerElem);
180
181 stGfx.useProgram(gl, false);
182 }
183 }
184
185 @Override
186 public void dispose(final GLAutoDrawable drawable) {
187 final GL3 gl = drawable.getGL().getGL3();
188 if(null != stComp) {
189 stComp.destroy(gl);
190 stComp=null;
191 }
192 if(null != stGfx) {
193 pmvMatrixUniform = null;
194 pmvMatrix=null;
195 stGfx.destroy(gl);
196 stGfx=null;
197 }
198 if(iVBO !=0 ) {
199 final int[] tmp = new int[] { iVBO } ;
200 gl.glDeleteBuffers(1, tmp, 0);
201 iVBO = 0;
202 }
203 }
204
205 @Override
206 public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {
207 final GL3 gl = drawable.getGL().getGL3();
208
209 gl.setSwapInterval(1);
210
211 if(null != stGfx) {
213 pmvMatrix.glLoadIdentity();
214 pmvMatrix.glOrthof(-1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 10.0f);
215
217 pmvMatrix.glLoadIdentity();
218
219 stGfx.useProgram(gl, true);
220 if( usesPMVMatrix ) {
221 stGfx.uniform(gl, pmvMatrixUniform);
222 }
223 stGfx.useProgram(gl, false);
224 }
225 }
226
227 float radius_dir = -1.0f;
228
229 @Override
230 public void display(final GLAutoDrawable drawable) {
231 final GL3 gl = drawable.getGL().getGL3();
232
233 gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
235
236 if(null != stComp) {
237 stComp.useProgram(gl, true);
238
239 // Update the radius uniform
240 float r = uRadius.floatValue();
241 if( r > 1.0f) {
242 radius_dir = -1.0f;
243 } else if( r < 0.01f ){
244 radius_dir = 1.0f;
245 }
246 r += radius_dir * 0.004f;
247 uRadius.setData(r);
248 stComp.uniform(gl, uRadius);
249
250 // Bind the VBO onto SSBO, which is going to filled in witin the compute shader.
251 // gIndexBufferBinding is equal to 0 (same as the compute shader binding)
252 final int gIndexBufferBinding = 0;
253 gl.glBindBufferBase(GL3ES3.GL_SHADER_STORAGE_BUFFER, gIndexBufferBinding, iVBO);
254
255 // Submit job for the compute shader execution.
256 // As the result the function is called with the following parameters:
257 // glDispatchCompute(2, 2, 1)
258 // 4 x [8 x 8] which results with the number of 256 threads.
259 // 8 x 8 is hardcoded in the compute shader
260 gl.glDispatchCompute((NUM_VERTS_H % GROUP_SIZE_WIDTH + NUM_VERTS_H) / GROUP_SIZE_WIDTH,
261 (NUM_VERTS_V % GROUP_SIZE_HEIGHT + NUM_VERTS_V) / GROUP_SIZE_HEIGHT,
262 1);
263
264 // Unbind the SSBO buffer.
265 // gIndexBufferBinding is equal to 0 (same as the compute shader binding)
266 gl.glBindBufferBase(GL3ES3.GL_SHADER_STORAGE_BUFFER, gIndexBufferBinding, 0);
267 stComp.useProgram(gl, false);
268 }
269 if(null != stGfx) {
270 stGfx.useProgram(gl, true);
271
272 // Call this function before we submit a draw call, which uses dependency
273 // buffer, to the GPU
275
276 // Bind VBO
278
279 gl.glEnableVertexAttribArray(iLocVertex);
280 gl.glEnableVertexAttribArray(iLocColor);
281
282 // Draw points from VBO
283 gl.glDrawArrays(GL.GL_LINE_STRIP, 0, NUM_VERTS_H*NUM_VERTS_V);
285
286 stGfx.useProgram(gl, false);
287 }
288 }//end display()
289
290 public static void main(final String[] args) {
291 final CommandlineOptions options = new CommandlineOptions(1280, 720, 0);
292
293 System.err.println(options);
294 System.err.println(VersionUtil.getPlatformInfo());
295
296 final GLCapabilities reqCaps = options.getGLCaps();
297 System.out.println("Requested: " + reqCaps);
298
299 final GLWindow window = GLWindow.create(reqCaps);
300 if( 0 == options.sceneMSAASamples ) {
302 }
303 window.setSize(options.surface_width, options.surface_height);
304 window.setTitle(ComputeShader01GL4ES31.class.getSimpleName());
305
307
308 final Animator animator = new Animator(0 /* w/o AWT */);
309 animator.setUpdateFPSFrames(5*60, System.err);
310 animator.add(window);
311
312 window.addWindowListener(new WindowAdapter() {
313 @Override
314 public void windowDestroyed(final WindowEvent e) {
315 animator.stop();
316 }
317 });
318
319 window.setVisible(true);
320 animator.start();
321 }
322}
final SyncMatrices4f getSyncPMv()
Returns SyncMatrices4f of 2 matrices within one FloatBuffer: P and Mv.
NEWT Window events are provided for notification purposes ONLY.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
Definition: GLWindow.java:121
final void setTitle(final String title)
Definition: GLWindow.java:297
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
Definition: GLWindow.java:625
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
Definition: GLWindow.java:615
final void addWindowListener(final WindowListener l)
Appends the given com.jogamp.newt.event.WindowListener to the end of the list.
Definition: GLWindow.java:882
CapabilitiesChooser setCapabilitiesChooser(final CapabilitiesChooser chooser)
Set the CapabilitiesChooser to help determine the native visual type.
Definition: GLWindow.java:261
static GLWindow create(final GLCapabilitiesImmutable caps)
Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display wi...
Definition: GLWindow.java:169
Specifies a set of OpenGL capabilities.
final GLRendererQuirks getRendererQuirks()
Returns the instance of GLRendererQuirks, allowing one to determine workarounds.
Definition: GLContext.java:294
final String getGLVersion()
Returns a valid OpenGL version string, ie
Definition: GLContext.java:773
A generic exception for OpenGL errors used throughout the binding as a substitute for RuntimeExceptio...
final StringBuilder toString(StringBuilder sb)
GLSL uniform data wrapper encapsulating data to be uploaded to the GPU as a uniform.
GLUniformData setData(final int data)
JOGL Compute ShaderCode demo using OpenGL 4.3 or ES 3.1 core profile features.
void display(final GLAutoDrawable drawable)
Called by the drawable to initiate OpenGL rendering by the client.
void init(final GLAutoDrawable drawable)
Called by the drawable immediately after the OpenGL context is initialized.
void dispose(final GLAutoDrawable drawable)
Notifies the listener to perform the release of all OpenGL resources per GLContext,...
void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height)
Called by the drawable during the first repaint after the component has been resized.
final synchronized void add(final GLAutoDrawable drawable)
Adds a drawable to this animator's list of rendering drawables.
final void setUpdateFPSFrames(final int frames, final PrintStream out)
final synchronized boolean start()
Starts this animator, if not running.
Definition: Animator.java:344
final synchronized boolean stop()
Stops this animator.
Definition: Animator.java:368
Utility routines for dealing with direct buffers.
Definition: GLBuffers.java:60
static final int sizeOfGLType(final int glType)
Definition: GLBuffers.java:128
PMVMatrix implements a subset of the fixed function pipeline GLMatrixFunc using PMVMatrix4f.
Definition: PMVMatrix.java:62
final void glMatrixMode(final int matrixName)
Sets the current matrix mode.
Definition: PMVMatrix.java:218
final void glOrthof(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar)
Multiply the current matrix with the orthogonal matrix.
Definition: PMVMatrix.java:469
final void glLoadIdentity()
Load the current matrix with the identity matrix.
Definition: PMVMatrix.java:325
Custom GLCapabilitiesChooser, filtering out all full screen anti-aliasing (FSAA, multisample) capabil...
Convenient shader code class to use and instantiate vertex or fragment programs.
Definition: ShaderCode.java:75
final int defaultShaderCustomization(final GL2ES2 gl, final boolean preludeVersion, final boolean addDefaultPrecision)
Default customization of this shader source code.
static ShaderCode create(final GL2ES2 gl, final int type, final int count, final Class<?> context, final String[] sourceFiles, final boolean mutableStringBuilder)
Creates a complete ShaderCode object while reading all shader source of sourceFiles,...
int program()
Returns the shader program name, which is non zero if valid.
synchronized boolean link(final GL2ES2 gl, final PrintStream verboseOut)
Links the shader code to the program.
synchronized void add(final ShaderCode shaderCode)
Adds a new shader to this program.
ShaderState allows to sharing data between shader programs, while updating the attribute and uniform ...
synchronized void useProgram(final GL2ES2 gl, final boolean on)
Turns the shader program on or off.
synchronized boolean attachShaderProgram(final GL2ES2 gl, final ShaderProgram prog, final boolean enable)
Attach or switch a shader program.
synchronized void destroy(final GL2ES2 gl)
Calls release(gl, true, true, true).
boolean uniform(final GL2ES2 gl, final GLUniformData data)
Set the uniform data, if it's location is valid, i.e.
void ownUniform(final GLUniformData uniform)
Bind the GLUniform lifecycle to this ShaderState.
static boolean isComputeShaderSupported(final GL _gl)
Returns true if ComputeShader is supported, i.e.
void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer_buffer_offset)
Entry point to C language function: void {@native glVertexAttribPointer}(GLuint index,...
static final int GL_VERTEX_SHADER
GL_ES_VERSION_2_0, GL_VERSION_2_0, GL_EXT_vertex_shader, GL_ARB_vertex_shader Alias for: GL_VERTEX_SH...
Definition: GL2ES2.java:39
void glEnableVertexAttribArray(int index)
Entry point to C language function: void {@native glEnableVertexAttribArray}(GLuint index) Part of...
int glGetAttribLocation(int program, String name)
Entry point to C language function: GLint {@native glGetAttribLocation}(GLuint program,...
static final int GL_SHADING_LANGUAGE_VERSION
GL_ES_VERSION_2_0, GL_VERSION_2_0, GL_ARB_shading_language_100 Alias for: GL_SHADING_LANGUAGE_VERSION...
Definition: GL2ES2.java:234
static final int GL_FRAGMENT_SHADER
GL_ES_VERSION_2_0, GL_VERSION_2_0, GL_ATI_fragment_shader, GL_ARB_fragment_shader Alias for: GL_FRAGM...
Definition: GL2ES2.java:541
void glMemoryBarrier(int barriers)
Entry point to C language function: void {@native glMemoryBarrier}(GLbitfield barriers) Part of GL...
static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT
GL_ARB_shader_image_load_store, GL_VERSION_4_2, GL_ES_VERSION_3_1, GL_EXT_shader_image_load_store Ali...
Definition: GL2ES3.java:627
void glBindBufferBase(int target, int index, int buffer)
Entry point to C language function: void {@native glBindBufferBase}(GLenum target,...
static final int GL_COMPUTE_SHADER
GL_ARB_compute_shader, GL_ES_VERSION_3_1, GL_VERSION_4_3 Define "GL_COMPUTE_SHADER" with expression '...
Definition: GL3ES3.java:327
static final int GL_SHADER_STORAGE_BUFFER
GL_ES_VERSION_3_1, GL_VERSION_4_3, GL_ARB_shader_storage_buffer_object Define "GL_SHADER_STORAGE_BUFF...
Definition: GL3ES3.java:187
void glDispatchCompute(int num_groups_x, int num_groups_y, int num_groups_z)
Entry point to C language function: void {@native glDispatchCompute}(GLuint num_groups_x,...
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
GL getGL()
Returns the GL pipeline object this GLAutoDrawable uses.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
boolean hasGLSL()
Indicates whether this GL object supports GLSL.
GLProfile getGLProfile()
Returns the GLProfile associated with this GL object.
GL3 getGL3()
Casts this object to the GL3 interface.
void setSwapInterval(int interval)
Set the swap interval of the current context and attached onscreen GLDrawable.
GLContext getContext()
Returns the GLContext associated which this GL object.
boolean isFunctionAvailable(String glFunctionName)
Returns true if the specified OpenGL core- or extension-function can be used successfully through thi...
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.
void glGenBuffers(int n, IntBuffer buffers)
Entry point to C language function: void {@native glGenBuffers}(GLsizei n, GLuint * buffers) Part ...
void glDrawArrays(int mode, int first, int count)
Entry point to C language function: void {@native glDrawArrays}(GLenum mode, GLint first,...
static final int GL_STATIC_DRAW
GL_VERSION_1_5, GL_ES_VERSION_2_0, GL_VERSION_ES_1_0, GL_ARB_vertex_buffer_object Alias for: GL_STATI...
Definition: GL.java:673
static final int GL_VERSION
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_VERSION" with express...
Definition: GL.java:190
static final int GL_FLOAT
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_FLOAT" with expressio...
Definition: GL.java:786
static final int GL_COLOR_BUFFER_BIT
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_COLOR_BUFFER_BIT" wit...
Definition: GL.java:390
void glClearColor(float red, float green, float blue, float alpha)
Entry point to C language function: void {@native glClearColor}(GLfloat red, GLfloat green,...
static final int GL_LINE_STRIP
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_LINE_STRIP" with expr...
Definition: GL.java:310
String glGetString(int name)
Entry point to C language function: const GLubyte * {@native glGetString}(GLenum name) Part of GL_...
static final int GL_RENDERER
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_RENDERER" with expres...
Definition: GL.java:662
void glClear(int mask)
Entry point to C language function: void {@native glClear}(GLbitfield mask) Part of GL_ES_VERSION_...
static final int GL_VENDOR
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_VENDOR" with expressi...
Definition: GL.java:607
static final int GL_DEPTH_BUFFER_BIT
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_DEPTH_BUFFER_BIT" wit...
Definition: GL.java:738
void glDeleteBuffers(int n, IntBuffer buffers)
Entry point to C language function: void {@native glDeleteBuffers}(GLsizei n, const GLuint * buffers...
void glBindBuffer(int target, int buffer)
Entry point to C language function: void {@native glBindBuffer}(GLenum target, GLuint buffer) Part...
void glBufferData(int target, long size, Buffer data, int usage)
Entry point to C language function: void {@native glBufferData}(GLenum target, GLsizeiptr size,...
static final int GL_ARRAY_BUFFER
GL_VERSION_1_5, GL_ES_VERSION_2_0, GL_VERSION_ES_1_0, GL_ARB_vertex_buffer_object Alias for: GL_ARRAY...
Definition: GL.java:633
Subset of OpenGL fixed function pipeline's matrix operations.
static final int GL_PROJECTION
Matrix mode projection.
static final int GL_MODELVIEW
Matrix mode modelview.