28package com.jogamp.opengl.test.junit.jogl.acore;
30import java.io.IOException;
31import java.lang.reflect.InvocationTargetException;
33import com.jogamp.opengl.GL2ES2;
34import com.jogamp.opengl.GLAutoDrawable;
35import com.jogamp.opengl.GLCapabilities;
36import com.jogamp.opengl.GLCapabilitiesImmutable;
37import com.jogamp.opengl.GLProfile;
39import org.junit.BeforeClass;
40import org.junit.FixMethodOrder;
42import org.junit.runners.MethodSorters;
44import com.jogamp.graph.curve.Region;
45import com.jogamp.graph.curve.opengl.GLRegion;
46import com.jogamp.graph.curve.opengl.RegionRenderer;
47import com.jogamp.graph.font.Font;
48import com.jogamp.graph.font.FontScale;
49import com.jogamp.opengl.test.junit.graph.TextRendererGLELBase;
50import com.jogamp.opengl.test.junit.util.UITestCase;
66@FixMethodOrder(MethodSorters.NAME_ASCENDING)
70 final Font font = getFont(0, 0, 0);
71 public int frameNo = 0;
72 public int userCounter = 0;
81 staticRGBAColor[0] = 0.9f;
82 staticRGBAColor[1] = 0.9f;
83 staticRGBAColor[2] = 0.9f;
84 staticRGBAColor[3] = 0.99f;
90 super.dispose(drawable);
96 System.err.println(
"TextRendererGLEL.display: "+text);
97 if(
null != renderer ) {
101 renderString(drawable, font, pixelSize, text, 0 , 0 , 0, 0, -1, regionFPS.
clear(gl));
103 System.err.println(text);
114 protected abstract void test(
final GLCapabilitiesImmutable caps,
final boolean useSwingDoubleBuffer,
final boolean skipGLOrientationVerticalFlip);
131 test(caps,
false ,
false );
139 test(caps,
false ,
true );
142 static long duration = 500;
Abstract Outline shape representation define the method an OutlineShape(s) is bound and rendered.
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 GLRegion clear(final GL2ES2 gl)
Clears all buffers, i.e.
final void destroy(final GL2ES2 gl)
Delete and clear the associated OGL objects.
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.
static final GLCallback defaultBlendDisable
Default GL#GL_BLEND disable GLCallback, simply turning-off the GL#GL_BLEND state and turning-on depth...
static final GLCallback defaultBlendEnable
Default GL#GL_BLEND enable GLCallback, turning-off depth writing via GL#glDepthMask(boolean) if Rende...
Simple static font scale methods for unit conversions.
static float toPixels(final float points, final float res_dpi)
Converts typical font size in points and screen resolution in dpi (pixels-per-inch) to font size in p...
Specifies a set of OpenGL capabilities.
void setNumSamples(final int numSamples)
If sample buffers are enabled, indicates the number of buffers to be allocated.
void setSampleBuffers(final boolean enable)
Defaults to false.
Specifies the the OpenGL profile.
static void initSingleton()
Static initialization of JOGL.
void dispose(final GLAutoDrawable drawable)
Notifies the listener to perform the release of all OpenGL resources per GLContext,...
TextRendererGLEL(final GLProfile glp)
void display(final GLAutoDrawable drawable)
Called by the drawable to initiate OpenGL rendering by the client.
Test synchronous GLAutoDrawable display, swap-buffer and read-pixels including non-MSAA and MSAA fram...
void test11_MSAA8_UsrFlip()
void test10_MSAA8_DefFlip()
void test00_MSAA0_DefFlip()
abstract void test(final GLCapabilitiesImmutable caps, final boolean useSwingDoubleBuffer, final boolean skipGLOrientationVerticalFlip)
void test01_MSAA0_UsrFlip()
Interface wrapper for font implementation.
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
GL getGL()
Returns the GL pipeline object this GLAutoDrawable uses.
GL2ES2 getGL2ES2()
Casts this object to the GL2ES2 interface.
Specifies an immutable set of OpenGL capabilities.
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.
void glClearColor(float red, float green, float blue, float alpha)
Entry point to C language function: void {@native glClearColor}(GLfloat red, GLfloat green,...