28package com.jogamp.opengl.demos.graph.ui;
31import java.io.IOException;
33import com.jogamp.common.util.InterruptSource;
34import com.jogamp.graph.curve.Region;
35import com.jogamp.graph.curve.opengl.GLRegion;
36import com.jogamp.graph.curve.opengl.RegionRenderer;
37import com.jogamp.graph.curve.opengl.TextRegionUtil;
38import com.jogamp.graph.font.Font;
39import com.jogamp.graph.font.Font.Glyph;
40import com.jogamp.graph.font.FontFactory;
41import com.jogamp.graph.font.FontSet;
42import com.jogamp.graph.ui.GraphShape;
43import com.jogamp.graph.ui.Shape;
44import com.jogamp.graph.ui.shapes.CrossHair;
45import com.jogamp.graph.ui.shapes.Rectangle;
46import com.jogamp.math.FloatUtil;
47import com.jogamp.math.Recti;
48import com.jogamp.math.Vec3f;
49import com.jogamp.math.Vec4f;
50import com.jogamp.math.geom.AABBox;
51import com.jogamp.math.geom.plane.AffineTransform;
52import com.jogamp.math.util.PMVMatrix4f;
53import com.jogamp.newt.Window;
54import com.jogamp.newt.event.KeyAdapter;
55import com.jogamp.newt.event.KeyEvent;
56import com.jogamp.newt.event.KeyListener;
57import com.jogamp.newt.event.MouseEvent;
58import com.jogamp.newt.event.MouseListener;
59import com.jogamp.newt.event.WindowAdapter;
60import com.jogamp.newt.event.WindowEvent;
61import com.jogamp.newt.opengl.GLWindow;
62import com.jogamp.opengl.FPSCounter;
63import com.jogamp.opengl.GL;
64import com.jogamp.opengl.GL2ES2;
65import com.jogamp.opengl.GLAnimatorControl;
66import com.jogamp.opengl.GLAutoDrawable;
67import com.jogamp.opengl.GLCapabilities;
68import com.jogamp.opengl.GLEventListener;
69import com.jogamp.opengl.GLException;
70import com.jogamp.opengl.GLPipelineFactory;
71import com.jogamp.opengl.GLProfile;
72import com.jogamp.opengl.GLRunnable;
73import com.jogamp.opengl.demos.graph.MSAATool;
74import com.jogamp.opengl.demos.graph.ui.testshapes.Glyph03FreeMonoRegular_M;
75import com.jogamp.opengl.demos.util.CommandlineOptions;
76import com.jogamp.opengl.demos.util.MiscUtils;
77import com.jogamp.opengl.util.Animator;
78import com.jogamp.opengl.util.GLReadBufferUtil;
92 static final boolean DEBUG =
false;
93 static final boolean TRACE =
false;
97 public static void main(
final String[] args)
throws IOException {
98 String text =
"Hello Origin.";
101 final int[] idx = { 0 };
102 for (idx[0] = 0; idx[0] < args.length; ++idx[0]) {
103 if( options.
parse(args, idx) ) {
105 }
else if(args[idx[0]].equals(
"-font")) {
108 }
else if(args[idx[0]].equals(
"-text")) {
111 }
else if(args[idx[0]].equals(
"-glyph")) {
116 System.err.println(options);
121 System.err.println(
"Text: "+text);
126 System.out.println(
"Requested: " + caps);
139 animator.
add(window);
143 public void keyPressed(
final KeyEvent arg0) {
146 new InterruptSource.Thread( () -> { window.
destroy(); } ).start();
160 private final Vec4f fg_color =
new Vec4f( 0, 0, 0, 1 );
161 private final Font font;
162 private final String text;
163 private final int glyph_id;
165 private final int renderModes;
167 private final boolean debug;
168 private final boolean trace;
173 private KeyAction keyAction;
174 private MouseAction mouseAction;
178 private final float[] position =
new float[] {0,0,0};
180 private static final float xTran = 0f;
181 private static final float yTran = 0f;
182 private static final float zTran = -1/5f;
183 private static final float zNear = 0.1f;
184 private static final float zFar = 7000.0f;
186 boolean ignoreInput =
false;
191 @SuppressWarnings(
"unused")
192 public
UITypeDemo01(final
Font font, final
int glyph_id, final String text, final
int renderModes, final
boolean debug, final
boolean trace) {
195 this.glyph_id = glyph_id;
196 this.renderModes = renderModes;
204 crossHair =
new CrossHair(renderModes, 1/20f, 1/20f, 1/1000f);
213 final float scale = 0.15312886f;
214 final float size_xz = 0.541f;
216 o.
scale(scale, scale, 1f);
229 autoDrawable = drawable;
247 public void reshape(
final GLAutoDrawable drawable,
final int xstart,
final int ystart,
final int width,
final int height) {
256 if( drawable instanceof
Window ) {
257 ((
Window)drawable).setTitle(
UITypeDemo01.class.getSimpleName()+
": "+drawable.getSurfaceWidth()+
" x "+drawable.getSurfaceHeight());
260 float lastWidth = 0f, lastHeight = 0f;
265 shape.
draw(gl, renderer);
280 renderer.
enable(gl,
true);
284 drawShape(gl, pmv, renderer, testObj);
287 drawShape(gl, pmv, renderer, crossHair);
289 final float full_width_o;
290 final float full_height_o;
292 final float orthoDist = -zTran;
300 System.err.printf(
"winToObjCoord: win [%f, %f, %f] -> obj [%s]%n", glWinX, glWinY, winZ, objCoord0);
307 System.err.printf(
"winToObjCoord: win [%f, %f, %f] -> obj [%s]%n", glWinX, glWinY, winZ, objCoord1);
310 full_width_o = objCoord1.x() - objCoord0.x();
311 full_height_o = objCoord1.y() - objCoord0.y();
315 final Font.Glyph glyph;
319 System.err.println(
"glyph_id "+glyph_id+
": "+glyph);
325 final AABBox txt_box_em = glyph.getBounds();
326 final float full_width_s = full_width_o / txt_box_em.
getWidth();
327 final float full_height_s = full_height_o / txt_box_em.
getHeight();
328 final float txt_scale = full_width_s < full_height_s ? full_width_s/2f : full_height_s/2f;
329 pmv.
scaleMv(txt_scale, txt_scale, 1f);
331 if(
null != glyph.getShape() ) {
334 region.
draw(gl, renderer);
339 System.err.println(
"XXX: full_width: "+full_width_o+
" / "+txt_box_em.
getWidth()+
" -> "+full_width_s);
340 System.err.println(
"XXX: full_height: "+full_height_o+
" / "+txt_box_em.
getHeight()+
" -> "+full_height_s);
341 System.err.println(
"XXX: txt_scale: "+txt_scale);
342 System.err.println(
"XXX: txt_box_em "+txt_box_em);
343 System.err.println(
"XXX: txt_box_e2 "+txt_box_em2);
347 final float full_width_s = full_width_o / txt_box_em.
getWidth();
348 final float full_height_s = full_height_o / txt_box_em.
getHeight();
349 final float txt_scale = full_width_s < full_height_s ? full_width_s/2f : full_height_s/2f;
350 pmv.
scaleMv(txt_scale, txt_scale, 1f);
355 System.err.println(
"XXX: full_width: "+full_width_o+
" / "+txt_box_em.
getWidth()+
" -> "+full_width_s);
356 System.err.println(
"XXX: full_height: "+full_height_o+
" / "+txt_box_em.
getHeight()+
" -> "+full_height_s);
357 System.err.println(
"XXX: txt_scale: "+txt_scale);
358 System.err.println(
"XXX: txt_box_em "+txt_box_em);
359 System.err.println(
"XXX: txt_box_e2 "+txt_box_em2);
360 System.err.println(
"XXX: txt_box_rg "+txt_box_r);
373 renderer.
enable(gl,
false);
375 private boolean once =
true;
390 if (
null == keyAction ) {
394 if (
null == mouseAction ) {
401 if (
null == keyAction ) {
404 if (
null == mouseAction ) {
413 final String dir =
"./";
415 final String objName =
"snap"+screenshot_num;
417 final String sw = String.format(
"-%03dx%03d-Z%04d-T%04d-%s", drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), (
int)Math.abs(zTran), 0, objName);
419 final String filename = dir + tech + sw +
".png";
420 if(screenshot.
readPixels(drawable.getGL(),
false)) {
421 screenshot.
write(
new File(filename));
426 int screenshot_num = 0;
455 System.err.println(
"\n\nMouse: "+e);
464 final int glWinX = e.
getX();
465 final int glWinY = viewport.height() - e.
getY() - 1;
472 System.err.println(
"\n\nCrossHair: "+crossHair);
473 final int[] objWinPos = crossHair.
shapeToWinCoord(pmv, viewport, objPosC,
new int[2]);
474 System.err.println(
"CrossHair: Obj: Obj "+objPosC+
" -> Win "+objWinPos[0]+
"/"+objWinPos[1]);
477 System.err.println(
"CrossHair: Obj: Win "+objWinPos[0]+
"/"+objWinPos[1]+
" -> Obj "+objPos2);
480 if(
null != winObjPos ) {
486 System.err.println(
"CrossHair: Move.1: Win "+glWinX+
"/"+glWinY+
" -> Obj "+winObjPos+
" -> diff "+diff);
487 crossHair.
move(diff.x(), diff.y(), 0f);
489 System.err.println(
"CrossHair: Move.0: Win "+glWinX+
"/"+glWinY+
" -> Obj "+winObjPos+
" -> diff "+diff);
493 final int[] surfaceSize = crossHair.
getSurfaceSize(pmv, viewport,
new int[2]);
494 System.err.println(
"CrossHair: Size: Pixel "+surfaceSize[0]+
" x "+surfaceSize[1]);
535 crossHair.
move(0f, 0f, -zTran/10f);
538 crossHair.
move(0f, 0f, zTran/10f);
559 if(
null != autoDrawable) {
563 final GL gl = drawable.
getGL();
567 case 0: i = 1;
break;
568 case 1: i = -1;
break;
569 case -1: i = 0;
break;
570 default: i = 1;
break;
581 System.err.println(
"Swap Interval: "+_i+
" -> "+i+
" -> "+gl.
getSwapInterval());
588 if(
null != autoDrawable) {
596 }
catch (
final IOException e) {
Abstract Outline shape representation define the method an OutlineShape(s) is bound and rendered.
final void addOutlineShape(final OutlineShape shape, final AffineTransform t, final Vec4f rgbaColor)
Add the given OutlineShape to this region with the given optional AffineTransform.
static String getRenderModeString(final int renderModes)
Returns a unique technical description string for renderModes as follows:
static final int VBAA_RENDERING_BIT
Rendering-Mode bit for Region.
A GLRegion is the OGL binding of one or more OutlineShapes Defined by its vertices and generated tria...
final void destroy(final GL2ES2 gl)
Delete and clear the associated OGL objects.
final void draw(final GL2ES2 gl, final RegionRenderer renderer)
Renders the associated OGL objects specifying current width/hight of window for optional multi pass r...
static GLRegion create(final GLProfile glp, int renderModes, final TextureSequence colorTexSeq, final int pass2TexUnit, final int initialVerticesCount, final int initialIndicesCount)
Create a GLRegion using the passed render mode.
final void enable(final GL2ES2 gl, final boolean enable)
Enabling or disabling the RenderState's current shader program.
final PMVMatrix4f getMatrix()
Borrow the current PMVMatrix4f.
final int setSampleCount(final int v)
Sets pass2 AA sample count clipped to the range [Region#MIN_AA_SAMPLE_COUNT..Region#MAX_AA_SAMPLE_COU...
static final GLCallback defaultBlendDisable
Default GL#GL_BLEND disable GLCallback, simply turning-off the GL#GL_BLEND state and turning-on depth...
final int setAAQuality(final int v)
Sets pass2 AA-quality rendering value clipped to the range [Region#MIN_AA_QUALITY....
static final GLCallback defaultBlendEnable
Default GL#GL_BLEND enable GLCallback, turning-off depth writing via GL#glDepthMask(boolean) if Rende...
final void init(final GL2ES2 gl)
Initialize shader and bindings for GPU based rendering bound to the given GL object's GLContext if no...
static RegionRenderer create()
Create a hardware accelerated RegionRenderer including its RenderState composition.
final void reshapePerspective(final float angle_rad, final int width, final int height, final float near, final float far)
Perspective projection, method also calls reshapeNotify(int, int, int, int).
final Recti getViewport(final Recti target)
Copies the current Rect4i viewport in given target and returns it for chaining.
final void destroy(final GL2ES2 gl)
Deletes all ShaderPrograms and nullifies its references including RenderState#destroy(GL2ES2).
Text Type Rendering Utility Class adding the Font.Glyphs OutlineShape to a GLRegion.
AABBox drawString3D(final GL2ES2 gl, final RegionRenderer renderer, final Font font, final CharSequence str, final Vec4f rgbaColor)
Render the string in 3D space w.r.t.
The optional property jogamp.graph.font.ctor allows user to specify the FontConstructor implementatio...
static final FontSet get(final int font)
static final int UBUNTU
Ubuntu is the default font family, {@value}.
Graph based GLRegion Shape.
Generic Shape, potentially using a Graph via GraphShape or other means of representing content.
Shape setColor(final float r, final float g, final float b, final float a)
Set base color.
final Shape move(final float dtx, final float dty, final float dtz)
Move about scaled distance.
void draw(final GL2ES2 gl, final RegionRenderer renderer)
Renders the shape.
final Vec3f winToShapeCoord(final PMVMatrix4f pmv, final Recti viewport, final int glWinX, final int glWinY, final Vec3f objPos)
Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.
final AABBox getBounds()
Returns the unscaled bounding AABBox for this shape, borrowing internal instance.
final int[] getSurfaceSize(final PMVMatrix4f pmv, final Recti viewport, final int[] surfaceSize)
Retrieve surface (view) size in pixels of this shape.
final void destroy(final GL2ES2 gl, final RegionRenderer renderer)
Destroys all data.
final int[] shapeToWinCoord(final PMVMatrix4f pmv, final Recti viewport, final Vec3f objPos, final int[] glWinPos)
Map given object coordinate relative to this shape to window coordinates.
final void applyMatToMv(final PMVMatrix4f pmv)
Applies the internal Matrix4f to the given modelview matrix, i.e.
final Shape scale(final Vec3f s)
Multiply current scale factor by given scale.
final Shape setVisible(final boolean v)
Enable (default) or disable this shape's visibility.
A GraphUI Crosshair GraphShape.
A GraphUI rectangle GraphShape.
Basic Float math utility functions.
static float getOrthoWinZ(final float orthoZ, final float zNear, final float zFar)
Returns orthogonal distance (1f/zNear-1f/orthoZ) / (1f/zNear-1f/zFar);.
static final float QUARTER_PI
The value PI/4, i.e.
static boolean isZero(final float a, final float epsilon)
Returns true if value is zero, i.e.
Rectangle with x, y, width and height integer components.
3D Vector based upon three float components.
Vec3f minus(final Vec3f arg)
Returns this - arg; creates new vector.
4D Vector based upon four float components.
Axis Aligned Bounding Box.
final Vec3f getCenter()
Returns computed center of this AABBox of getLow() and getHigh().
PMVMatrix4f implements the basic computer graphics Matrix4f pack using projection (P),...
final PMVMatrix4f translateMv(final float x, final float y, final float z)
Translate the modelview matrix.
final PMVMatrix4f scaleMv(final float x, final float y, final float z)
Scale the modelview matrix.
final PMVMatrix4f loadMvIdentity()
Load the modelview matrix with the values of the given Matrix4f.
final PMVMatrix4f popMv()
Pop the modelview matrix from its stack.
final boolean mapWinToObj(final float winx, final float winy, final float winz, final Recti viewport, final Vec3f objPos)
Map window coordinates to object coordinates.
final PMVMatrix4f pushMv()
Push the modelview matrix to its stack, while preserving its values.
void setAlphaBits(final int alphaBits)
Sets the number of bits requested for the color buffer's alpha component.
static final short VK_RIGHT
Constant for the cursor- or numerical-pad right arrow key.
static final short VK_F4
Constant for the F4 function key.
static final short VK_2
See VK_0.
static final short VK_ESCAPE
Constant for the ESCAPE function key.
static final short VK_UP
Constant for the cursor- or numerical-pad up arrow key.
static final short VK_LEFT
Constant for the cursor- or numerical-pad left arrow key.
final short getKeySymbol()
Returns the virtual key symbol reflecting the current keyboard layout.
static final short VK_DOWN
Constant for the cursor- or numerical pad down arrow key.
static final short VK_9
See VK_0.
static final short VK_0
VK_0 thru VK_9 are the same as UTF16/ASCII '0' thru '9' [0x30 - 0x39].
static final short VK_S
See VK_A.
static final short VK_Q
See VK_A.
static final short VK_V
See VK_A.
static final short VK_1
See VK_0.
final short getKeyCode()
Returns the virtual key code using a fixed mapping to the US keyboard layout.
Pointer event of type PointerType.
final int getY()
See details for multiple-pointer events.
final int getX()
See details for multiple-pointer events.
NEWT Window events are provided for notification purposes ONLY.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
final int getSurfaceHeight()
Returns the height of this GLDrawable's surface client area in pixel units.
final void addMouseListener(final MouseListener l)
Appends the given MouseListener to the end of the list.
final void setTitle(final String title)
final void addKeyListener(final KeyListener l)
Appends the given com.jogamp.newt.event.KeyListener to the end of the list.
final int getSurfaceWidth()
Returns the width of this GLDrawable's surface client area in pixel units.
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
final void addWindowListener(final WindowListener l)
Appends the given com.jogamp.newt.event.WindowListener to the end of the list.
final void removeKeyListener(final KeyListener l)
final void removeMouseListener(final MouseListener l)
Removes the given MouseListener from the list.
final void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
static GLWindow create(final GLCapabilitiesImmutable caps)
Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display wi...
Specifies a set of OpenGL capabilities.
abstract GL setGL(GL gl)
Sets the GL pipeline object for this GLContext.
A generic exception for OpenGL errors used throughout the binding as a substitute for RuntimeExceptio...
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...
Specifies the the OpenGL profile.
static GLProfile getGL2ES2(final AbstractGraphicsDevice device)
Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.
void keyPressed(final KeyEvent arg0)
A key has been pressed, excluding auto-repeat modifier keys.
void keyReleased(final KeyEvent arg0)
A key has been released, excluding auto-repeat modifier keys.
void mouseClicked(final MouseEvent e)
void mouseReleased(final MouseEvent e)
void mouseDragged(final MouseEvent e)
void mouseExited(final MouseEvent e)
Only generated for PointerType#Mouse.
void mouseWheelMoved(final MouseEvent e)
Traditional event name originally produced by a mouse pointer type.
void mouseEntered(final MouseEvent e)
Only generated for PointerType#Mouse.
void mousePressed(final MouseEvent e)
void mouseMoved(final MouseEvent e)
Basic UIShape and Type Rendering demo.
final AffineTransform tempT1
void detachFrom(final GLWindow window)
static void main(final String[] args)
final RegionRenderer getRegionRenderer()
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 xstart, final int ystart, final int width, final int height)
Called by the drawable during the first repaint after the component has been resized.
void init(final GLAutoDrawable drawable)
Called by the drawable immediately after the OpenGL context is initialized.
final AffineTransform tempT2
final float[] getPosition()
UITypeDemo01(final Font font, final int glyph_id, final String text, final int renderModes, final boolean debug, final boolean trace)
void setIgnoreInput(final boolean v)
void attachInputListenerTo(final GLWindow window)
Attach the input listener to the window.
void display(final GLAutoDrawable drawable)
Called by the drawable to initiate OpenGL rendering by the client.
void printScreen(final GLAutoDrawable drawable)
GPU based resolution independent test object.
int graphAASamples
Sample count for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT...
int graphAAQuality
Pass2 AA-quality rendering for Graph Region AA render-modes: VBAA_RENDERING_BIT.
void parse(final String[] args)
static int atoi(final String str, final int def)
final synchronized void add(final GLAutoDrawable drawable)
Adds a drawable to this animator's list of rendering drawables.
final synchronized boolean start()
Starts this animator, if not running.
final synchronized boolean stop()
Stops this animator.
Utility to read out the current FB to TextureData, optionally writing the data back to a texture obje...
void write(final File dest)
Write the TextureData filled by readPixels(GLAutoDrawable, boolean) to file.
void dispose(final GL gl)
boolean readPixels(final GL gl, final boolean mustFlipVertically)
Read the drawable's pixels to TextureData and Texture, if requested at construction.
static final int FAMILY_LIGHT
Font family LIGHT, {@value}.
Font get(int family, int stylebits)
static final int STYLE_SERIF
SERIF style/family bit flag.
static final int ID_UNKNOWN
Interface wrapper for font implementation.
Glyph getGlyph(final String name)
Returns the Glyph mapped to given name.
AABBox getGlyphShapeBounds(final AffineTransform transform, final CharSequence string)
Returns accurate bounding box by taking each glyph's font em-sized OutlineShape into account.
String getFullFamilyName()
Shall return the family and subfamily name, separated a dash.
AABBox getGlyphBounds(final CharSequence string)
Try using getGlyphBounds(CharSequence, AffineTransform, AffineTransform) to reuse AffineTransform ins...
Specifying NEWT's Window functionality:
Listener for MouseEvents.
void resetFPSCounter()
Reset all performance counter (startTime, currentTime, frame number)
An animator control interface, which implementation may drive a com.jogamp.opengl....
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
boolean invoke(boolean wait, GLRunnable glRunnable)
Enqueues a one-shot GLRunnable, which will be executed within the next display() call after all regis...
GLAnimatorControl getAnimator()
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.
GLEventListener removeGLEventListener(GLEventListener listener)
Removes the given listener from this drawable queue.
GL2ES2 getGL2ES2()
Casts this object to the GL2ES2 interface.
GLProfile getGLProfile()
Returns the GLProfile associated with this GL object.
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.
int getSwapInterval()
Return the current swap interval.
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_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...
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_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...
void glClear(int mask)
Entry point to C language function: void {@native glClear}(GLbitfield mask) Part of GL_ES_VERSION_...
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_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...