28package com.jogamp.opengl.test.junit.jogl.util;
30import com.jogamp.opengl.GL;
31import com.jogamp.opengl.GL2ES1;
32import com.jogamp.opengl.GL2ES2;
33import com.jogamp.opengl.GLAutoDrawable;
34import com.jogamp.opengl.GLEventListener;
35import com.jogamp.opengl.GLPipelineFactory;
36import com.jogamp.opengl.fixedfunc.GLMatrixFunc;
37import com.jogamp.opengl.glu.GLU;
38import com.jogamp.opengl.glu.gl2es1.GLUgl2es1;
40import com.jogamp.opengl.util.ImmModeSink;
41import com.jogamp.opengl.util.glsl.fixedfunc.FixedFuncUtil;
42import com.jogamp.opengl.util.glsl.fixedfunc.ShaderSelectionMode;
45 private boolean debugFFPEmu =
false;
46 private boolean verboseFFPEmu =
false;
47 private boolean traceFFPEmu =
false;
48 private boolean forceFFPEmu =
false;
52 DemoGL2ES1ImmModeSink(
final boolean useVBO) {
62 public void setForceFFPEmu(
final boolean forceFFPEmu,
final boolean verboseFFPEmu,
final boolean debugFFPEmu,
final boolean traceFFPEmu) {
63 this.forceFFPEmu = forceFFPEmu;
64 this.verboseFFPEmu = verboseFFPEmu;
65 this.debugFFPEmu = debugFFPEmu;
66 this.traceFFPEmu = traceFFPEmu;
88 public void reshape(
final GLAutoDrawable drawable,
final int x,
final int y,
final int width,
final int height) {
abstract GL setGL(GL gl)
Sets the GL pipeline object for this GLContext.
Factory for pipelining GL instances.
static final GL create(final String pipelineClazzBaseName, final Class<?> reqInterface, final GL downstream, final Object[] additionalArgs)
Creates a pipelined GL instance using the given downstream downstream and optional arguments addition...
Provides access to the OpenGL Utility Library (GLU).
void gluOrtho2D(float left, float right, float bottom, float top)
final void glVertex2f(final float x, final float y)
static ImmModeSink createFixed(final int initialElementCount, final int vComps, final int vDataType, final int cComps, final int cDataType, final int nComps, final int nDataType, final int tComps, final int tDataType, final int glBufferUsage)
Uses a GL2ES1, or ES2 fixed function emulation immediate mode sink.
final void glColor3f(final float x, final float y, final float z)
final void glEnd(final GL gl)
Tool to pipeline GL2ES2 into a fixed function emulation implementing GL2ES1.
static final GL2ES1 wrapFixedFuncEmul(final GL gl, final ShaderSelectionMode mode, final PMVMatrix pmvMatrix, final boolean force, final boolean verbose)
AUTO
Auto shader selection, based upon FFP states.
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
GL getGL()
Returns the GL pipeline object this GLAutoDrawable uses.
GL2ES1 getGL2ES1()
Casts this object to the GL2ES1 interface.
GLContext getContext()
Returns the GLContext associated which this GL object.
int getSurfaceWidth()
Returns the width of this GLDrawable's surface client area in pixel units.
int getSurfaceHeight()
Returns the height of this GLDrawable's surface client area in pixel units.
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.
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...
static final int GL_TRIANGLES
GL_ES_VERSION_2_0, GL_VERSION_1_1, GL_VERSION_1_0, GL_VERSION_ES_1_0 Define "GL_TRIANGLES" with expre...
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...
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...
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...
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...
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...
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.
void glLoadIdentity()
Load the current matrix with the identity matrix.
void glMatrixMode(int mode)
Sets the current matrix mode.