JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
TestFBOMRTNEWT01.java
Go to the documentation of this file.
1/**
2 * Copyright 2010 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.test.junit.jogl.acore;
29
30import com.jogamp.opengl.FBObject;
31import com.jogamp.opengl.FBObject.TextureAttachment;
32import com.jogamp.opengl.util.GLArrayDataServer;
33import com.jogamp.opengl.util.GLReadBufferUtil;
34import com.jogamp.opengl.util.PMVMatrix;
35import com.jogamp.opengl.util.glsl.ShaderCode;
36import com.jogamp.opengl.util.glsl.ShaderProgram;
37import com.jogamp.opengl.util.glsl.ShaderState;
38import com.jogamp.opengl.util.texture.TextureIO;
39import com.jogamp.opengl.FBObject.Attachment.Type;
40import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
41import com.jogamp.opengl.test.junit.util.MiscUtils;
42import com.jogamp.opengl.test.junit.util.NEWTGLContext;
43import com.jogamp.opengl.test.junit.util.UITestCase;
44
45import java.io.IOException;
46
47import com.jogamp.common.os.Platform;
48import com.jogamp.junit.util.JunitTracer;
49import com.jogamp.nativewindow.NativeSurface;
50import com.jogamp.opengl.GL;
51import com.jogamp.opengl.GL2ES2;
52import com.jogamp.opengl.GL2GL3;
53import com.jogamp.opengl.GLCapabilities;
54import com.jogamp.opengl.GLDrawable;
55import com.jogamp.opengl.GLProfile;
56import com.jogamp.opengl.GLUniformData;
57import com.jogamp.opengl.fixedfunc.GLMatrixFunc;
58
59import org.junit.Assert;
60import org.junit.BeforeClass;
61import org.junit.Test;
62import org.junit.FixMethodOrder;
63import org.junit.runners.MethodSorters;
64
65@FixMethodOrder(MethodSorters.NAME_ASCENDING)
66public class TestFBOMRTNEWT01 extends UITestCase {
67 static long durationPerTest = 10*40*2; // ms
68
69 @Test
70 public void test01() throws InterruptedException {
71 final int step = 4;
72 final int width = 800;
73 final int height = 600;
74 // preset ..
76 System.err.println("Test requires GL2/GL3 profile.");
77 return;
78 }
79 final NEWTGLContext.WindowContext winctx = NEWTGLContext.createWindow(
80 new GLCapabilities(GLProfile.getGL2GL3()), width/step, height/step, true);
81 final GLDrawable drawable = winctx.context.getGLDrawable();
82 final GL2GL3 gl = winctx.context.getGL().getGL2GL3();
83 // gl = gl.getContext().setGL( GLPipelineFactory.create("com.jogamp.opengl.Debug", null, gl, null) ).getGL2GL3();
84 System.err.println(winctx.context);
85
86 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
87 // test code ..
88 final ShaderState st = new ShaderState();
89 // st.setVerbose(true);
90
91 final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
92 "shader/bin", "fbo-mrt-1", true);
93 final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
94 "shader/bin", "fbo-mrt-1", true);
95 vp0.defaultShaderCustomization(gl, true, true);
96 fp0.defaultShaderCustomization(gl, true, true);
97 final ShaderProgram sp0 = new ShaderProgram();
98 sp0.add(gl, vp0, System.err);
99 sp0.add(gl, fp0, System.err);
100 Assert.assertTrue(0 != sp0.program());
101 Assert.assertTrue(!sp0.inUse());
102 Assert.assertTrue(!sp0.linked());
103 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
104 st.attachShaderProgram(gl, sp0, false);
105
106 final ShaderCode vp1 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
107 "shader/bin", "fbo-mrt-2", true);
108 final ShaderCode fp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
109 "shader/bin", "fbo-mrt-2", true);
110 vp1.defaultShaderCustomization(gl, true, true);
111 fp1.defaultShaderCustomization(gl, true, true);
112 final ShaderProgram sp1 = new ShaderProgram();
113 sp1.add(gl, vp1, System.err);
114 sp1.add(gl, fp1, System.err);
115 Assert.assertTrue(0 != sp1.program());
116 Assert.assertTrue(!sp1.inUse());
117 Assert.assertTrue(!sp1.linked());
118 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
119 st.attachShaderProgram(gl, sp1, true);
120
121 final PMVMatrix pmvMatrix = new PMVMatrix();
122 final GLUniformData pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv());
123 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
124 st.ownUniform(pmvMatrixUniform);
125 st.uniform(gl, pmvMatrixUniform);
126 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
127
128 final GLArrayDataServer vertices0 = GLArrayDataServer.createGLSL("gca_Vertices", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
129 // st.bindAttribLocation(gl, 0, vertices0);
130 vertices0.putf(0); vertices0.putf(1); vertices0.putf(0);
131 vertices0.putf(1); vertices0.putf(1); vertices0.putf(0);
132 vertices0.putf(0); vertices0.putf(0); vertices0.putf(0);
133 vertices0.putf(1); vertices0.putf(0); vertices0.putf(0);
134 vertices0.seal(gl, true);
135 st.ownAttribute(vertices0, true);
136 vertices0.enableBuffer(gl, false);
137 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
138
139 final GLArrayDataServer colors0 = GLArrayDataServer.createGLSL("gca_Colors", 4, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
140 // st.bindAttribLocation(gl, 1, colors0);
141 colors0.putf(1); colors0.putf(0); colors0.putf(1); colors0.putf(1);
142 colors0.putf(0); colors0.putf(0); colors0.putf(1); colors0.putf(1);
143 colors0.putf(0); colors0.putf(0); colors0.putf(0); colors0.putf(1);
144 colors0.putf(0); colors0.putf(1); colors0.putf(1); colors0.putf(1);
145 colors0.seal(gl, true);
146 st.ownAttribute(colors0, true);
147 colors0.enableBuffer(gl, false);
148 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
149
150 final GLUniformData texUnit0 = new GLUniformData("gcs_TexUnit0", 0);
151 st.ownUniform(texUnit0);
152 st.uniform(gl, texUnit0);
153 final GLUniformData texUnit1 = new GLUniformData("gcs_TexUnit1", 1);
154 st.ownUniform(texUnit1);
155 st.uniform(gl, texUnit1);
156
157 final GLArrayDataServer texCoords0 = GLArrayDataServer.createGLSL("gca_TexCoords", 2, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
158 // st.bindAttribLocation(gl, 2, texCoords0);
159 texCoords0.putf(0f); texCoords0.putf(1f);
160 texCoords0.putf(1f); texCoords0.putf(1f);
161 texCoords0.putf(0f); texCoords0.putf(0f);
162 texCoords0.putf(1f); texCoords0.putf(0f);
163 texCoords0.seal(gl, true);
164 st.ownAttribute(texCoords0, true);
165 texCoords0.enableBuffer(gl, false);
166 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
167
168 final int texA0Point = 0; // attachment point for texA0
169 final int texA1Point = 1; // attachment point for texA1
170
171 // FBO w/ 2 texture2D color buffers
172 final FBObject fbo_mrt = new FBObject();
173 fbo_mrt.init(gl, drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), 0);
174 final TextureAttachment texA0 = fbo_mrt.attachTexture2D(gl, texA0Point, true, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
175 final TextureAttachment texA1;
176 if(fbo_mrt.getMaxColorAttachments() > 1) {
177 texA1 = fbo_mrt.attachTexture2D(gl, texA1Point, true, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
178 } else {
179 texA1 = null;
180 System.err.println("FBO supports only one attachment, no MRT available!");
181 }
183 Assert.assertTrue( fbo_mrt.isStatusValid() ) ;
184 fbo_mrt.unbind(gl);
185
186 // misc GL setup
187 gl.glClearColor(1, 1, 1, 1);
189 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
190
191 // reshape
193 pmvMatrix.glLoadIdentity();
194 pmvMatrix.glOrthof(0f, 1f, 0f, 1f, -10f, 10f);
196 pmvMatrix.glLoadIdentity();
197 st.uniform(gl, pmvMatrixUniform);
198 Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
199
200 final int[] two_buffers = new int[] { GL.GL_COLOR_ATTACHMENT0+texA0Point, GL.GL_COLOR_ATTACHMENT0+texA1Point };
201 final int[] bck_buffers = new int[] { GL2GL3.GL_BACK_LEFT };
202
203 final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
204 int step_i = 0;
205 final int[] last_snap_size = new int[] { 0, 0 };
206
207 for(int i=0; i<durationPerTest; i+=50) {
208 // pass 1 - MRT: Red -> buffer0, Green -> buffer1
209 st.attachShaderProgram(gl, sp0, true);
210 vertices0.enableBuffer(gl, true);
211 colors0.enableBuffer(gl, true);
212
213 fbo_mrt.bind(gl);
214 gl.glDrawBuffers(2, two_buffers, 0);
215 gl.glViewport(0, 0, fbo_mrt.getWidth(), fbo_mrt.getHeight());
216
219 fbo_mrt.unbind(gl);
220 vertices0.enableBuffer(gl, false);
221 colors0.enableBuffer(gl, false);
222
223 // pass 2 - mix buffer0, buffer1 and blue
224 // rg = buffer0.rg + buffer1.rg, b = Blue - length(rg);
225 st.attachShaderProgram(gl, sp1, true);
226 vertices0.enableBuffer(gl, true);
227 colors0.enableBuffer(gl, true);
228 texCoords0.enableBuffer(gl, true);
229 gl.glDrawBuffers(1, bck_buffers, 0);
230
231 gl.glViewport(0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight());
232
233 gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit0.intValue());
234 fbo_mrt.use(gl, texA0);
235 if(null != texA1) {
236 gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit1.intValue());
237 fbo_mrt.use(gl, texA1);
238 }
241 fbo_mrt.unuse(gl);
242 vertices0.enableBuffer(gl, false);
243 colors0.enableBuffer(gl, false);
244 texCoords0.enableBuffer(gl, false);
245
246 {
248 if(last_snap_size[0] != ns.getSurfaceWidth() && last_snap_size[1] != ns.getSurfaceHeight()) {
249 gl.glFinish(); // sync .. no swap buffers yet!
250 snapshot(step_i, null, gl, screenshot, TextureIO.PNG, null); // overwrite ok
251 last_snap_size[0] = ns.getSurfaceWidth();
252 last_snap_size[1] = ns.getSurfaceHeight();
253 }
254 }
255
256 drawable.swapBuffers();
257 Thread.sleep(50);
258 final int j = (int) ( i / (durationPerTest/step) ) + 1;
259 if(j>step_i) {
260 final int w = width/step * j;
261 final int h = height/step * j;
262 System.err.println("resize: "+step_i+" -> "+j+" - "+w+"x"+h);
263 fbo_mrt.reset(gl, w, h, 0);
264 winctx.window.setSize(w, h);
265 step_i = j;
266 }
267 }
268
270 }
271
272 @BeforeClass
273 public static void beforeClass() throws Exception {
274 if( !manual_test ) {
275 if( Platform.OSType.MACOS == Platform.getOSType() ) {
276 JunitTracer.setTestSupported(false);
277 }
278 }
279 }
280 static boolean manual_test = false;
281
282 public static void main(final String args[]) throws IOException {
283 manual_test = true;
284 System.err.println("main - start");
285 for(int i=0; i<args.length; i++) {
286 if(args[i].equals("-time")) {
287 durationPerTest = MiscUtils.atoi(args[++i], (int)durationPerTest);
288 }
289 }
290 final String tstname = TestFBOMRTNEWT01.class.getName();
291 org.junit.runner.JUnitCore.main(tstname);
292 System.err.println("main - end");
293 }
294}
295
final SyncMatrices4f getSyncPMv()
Returns SyncMatrices4f of 2 matrices within one FloatBuffer: P and Mv.
Core utility class simplifying usage of framebuffer objects (FBO) with all GLProfiles.
Definition: FBObject.java:53
final void attachRenderbuffer(final GL gl, final Attachment.Type atype, final int reqBits)
Attaches one depth, stencil or packed-depth-stencil buffer to this FBO's instance,...
Definition: FBObject.java:1691
final void bind(final GL gl)
Bind this FBO, i.e.
Definition: FBObject.java:2540
final TextureAttachment attachTexture2D(final GL gl, final int attachmentPoint, final boolean alpha)
Attaches a Colorbuffer, i.e.
Definition: FBObject.java:1387
final int getWidth()
Returns the width.
Definition: FBObject.java:2753
final boolean isStatusValid()
The status may even be valid if incomplete during transition of attachments.
Definition: FBObject.java:1313
final int getMaxColorAttachments()
Returns the maximum number of colorbuffer attachments.
Definition: FBObject.java:2739
final int getHeight()
Returns the height.
Definition: FBObject.java:2755
final void unuse(final GL gl)
Unbind texture, ie bind 'non' texture 0.
Definition: FBObject.java:2684
final void use(final GL gl, final TextureAttachment ta)
Synchronize the sampling sink and bind the given TextureAttachment, if not null.
Definition: FBObject.java:2672
final void unbind(final GL gl)
Unbind this FBO, i.e.
Definition: FBObject.java:2563
final boolean reset(final GL gl, int newWidth, int newHeight, int newSamples)
Resets this FBO's instance.
Definition: FBObject.java:1140
static final int CHOSEN_BITS
Request current context drawable's chosen depth- or stencil-bits; value {@value}.
Definition: FBObject.java:1658
void init(final GL gl, final int newWidth, final int newHeight, final int newSamples)
Initializes this FBO's instance.
Definition: FBObject.java:1008
Specifies a set of OpenGL capabilities.
abstract GLDrawable getGLReadDrawable()
Returns the read-Drawable this context uses for read framebuffer operations.
Specifies the the OpenGL profile.
Definition: GLProfile.java:77
static boolean isAvailable(final AbstractGraphicsDevice device, final String profile)
Returns the availability of a profile on a device.
Definition: GLProfile.java:305
static GLProfile getGL2GL3(final AbstractGraphicsDevice device)
Returns the GL2GL3 profile implementation, hence compatible w/ GL2GL3.
Definition: GLProfile.java:973
static final String GL2GL3
The intersection of the desktop GL3 and GL2 profile.
Definition: GLProfile.java:597
GLSL uniform data wrapper encapsulating data to be uploaded to the GPU as a uniform.
static int atoi(final String str, final int def)
Definition: MiscUtils.java:57
static WindowContext createWindow(final GLCapabilities caps, final int width, final int height, final boolean debugGL)
static void destroyWindow(final WindowContext winctx)
void seal(final GL gl, final boolean seal)
Convenience method calling seal(boolean) and enableBuffer(GL, boolean).
void enableBuffer(final GL gl, final boolean enable)
Enables the buffer if enable is true, and transfers the data if required.
static GLArrayDataServer createGLSL(final String name, final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount, final int vboUsage)
Create a VBO, using a custom GLSL array attribute name and starting with a new created Buffer object ...
Utility to read out the current FB to TextureData, optionally writing the data back to a texture obje...
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
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 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 ...
void ownAttribute(final GLArrayData attribute, final boolean own)
Binds or unbinds the GLArrayData lifecycle to this ShaderState.
synchronized boolean attachShaderProgram(final GL2ES2 gl, final ShaderProgram prog, final boolean enable)
Attach or switch a shader program.
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 final String PNG
Constant which can be used as a file suffix to indicate a PNG file, value {@value}.
Definition: TextureIO.java:171
Provides low-level information required for hardware-accelerated rendering using a surface in a platf...
int getSurfaceWidth()
Returns the width of the client area excluding insets (window decorations) in pixel units.
int getSurfaceHeight()
Returns the height of the client area excluding insets (window decorations) in pixel units.
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 glDrawBuffers(int n, IntBuffer bufs)
Entry point to C language function: void {@native glDrawBuffers}(GLsizei n, const GLenum * bufs) P...
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
GL getGL()
Casts this object to the GL interface.
GLContext getContext()
Returns the GLContext associated which this GL object.
GL2GL3 getGL2GL3()
Casts this object to the GL2GL3 interface.
An abstraction for an OpenGL rendering target.
Definition: GLDrawable.java:51
int getSurfaceWidth()
Returns the width of this GLDrawable's surface client area in pixel units.
NativeSurface getNativeSurface()
Returns the associated NativeSurface of this NativeSurfaceHolder.
int getSurfaceHeight()
Returns the height of this GLDrawable's surface client area in pixel units.
void swapBuffers()
Swaps the front and back buffers of this drawable.
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_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_NO_ERROR
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_NO_ERROR" with expres...
Definition: GL.java:481
int glGetError()
Entry point to C language function: GLenum {@native glGetError}() Part of GL_ES_VERSION_2_0,...
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,...
void glEnable(int cap)
Entry point to C language function: void {@native glEnable}(GLenum cap) Part of GL_ES_VERSION_2_0,...
static final int GL_COLOR_ATTACHMENT0
GL_ES_VERSION_2_0, GL_ARB_framebuffer_object, GL_VERSION_3_0, GL_NV_draw_buffers, GL_OES_framebuffer_...
Definition: GL.java:349
static final int GL_DEPTH_TEST
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_DEPTH_TEST" with expr...
Definition: GL.java:43
void glActiveTexture(int texture)
Entry point to C language function: void {@native glActiveTexture}(GLenum texture) Part of GL_ES_V...
void glClear(int mask)
Entry point to C language function: void {@native glClear}(GLbitfield mask) Part of GL_ES_VERSION_...
static final int GL_TRIANGLE_STRIP
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_TRIANGLE_STRIP" with ...
Definition: GL.java:760
static final int GL_NEAREST
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_NEAREST" with express...
Definition: GL.java:715
void glFinish()
Entry point to C language function: void {@native glFinish}() Part of GL_ES_VERSION_2_0,...
void glViewport(int x, int y, int width, int height)
Entry point to C language function: void {@native glViewport}(GLint x, GLint y, GLsizei width,...
static final int GL_TEXTURE0
GL_ES_VERSION_2_0, GL_VERSION_1_3, GL_VERSION_ES_1_0, GL_ARB_multitexture Alias for: GL_TEXTURE0_ARB ...
Definition: GL.java:71
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
static final int GL_CLAMP_TO_EDGE
GL_ES_VERSION_2_0, GL_VERSION_1_2, GL_VERSION_ES_1_0, GL_SGIS_texture_edge_clamp Alias for: GL_CLAMP_...
Definition: GL.java:775
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.