28package com.jogamp.opengl.demos.util;
30import com.jogamp.graph.curve.Region;
31import com.jogamp.math.FloatUtil;
32import com.jogamp.opengl.GLCapabilities;
33import com.jogamp.opengl.GLProfile;
87 this.surface_width = width;
88 this.surface_height = height;
94 public void parse(
final String[] args) {
95 final int[] idx = { 0 };
96 for (idx[0] = 0; idx[0] < args.length; ++idx[0]) {
100 public boolean parse(
final String[] args,
final int[] idx) {
101 if( 0 > idx[0] || idx[0] >= args.length ) {
105 if (args[idx[0]].equals(
"-hhd")) {
108 }
else if (args[idx[0]].equals(
"-fhd")) {
111 }
else if (args[idx[0]].equals(
"-w")) {
114 }
else if (args[idx[0]].equals(
"-h")) {
117 }
else if(args[idx[0]].equals(
"-es2")) {
119 }
else if(args[idx[0]].equals(
"-es3")) {
121 }
else if(args[idx[0]].equals(
"-gl2")) {
123 }
else if(args[idx[0]].equals(
"-gl3bc")) {
125 }
else if(args[idx[0]].equals(
"-gl3")) {
127 }
else if(args[idx[0]].equals(
"-gl4")) {
129 }
else if(args[idx[0]].equals(
"-gl4bc")) {
131 }
else if(args[idx[0]].equals(
"-gldef")) {
133 }
else if(args[idx[0]].equals(
"-gnone")) {
138 }
else if(args[idx[0]].equals(
"-smsaa")) {
144 }
else if(args[idx[0]].equals(
"-gmsaa")) {
151 }
else if(args[idx[0]].equals(
"-gvbaa")) {
158 }
else if(args[idx[0]].equals(
"-color")) {
160 }
else if(args[idx[0]].equals(
"-no-color")) {
162 }
else if(args[idx[0]].equals(
"-gaaq")) {
165 }
else if(args[idx[0]].equals(
"-exclusiveContext")) {
167 }
else if(args[idx[0]].equals(
"-wait")) {
169 }
else if (args[idx[0]].equals(
"-keep")) {
172 }
else if (args[idx[0]].equals(
"-stay")) {
174 }
else if (args[idx[0]].equals(
"-swapInterval")) {
177 }
else if (args[idx[0]].equals(
"-duration")) {
Abstract Outline shape representation define the method an OutlineShape(s) is bound and rendered.
static final int MSAA_RENDERING_BIT
Rendering-Mode bit for Region.
static final int clipAAQuality(final int v)
Returns clipped AA quality value to [Region#MIN_AA_QUALITY..Region#MAX_AA_QUALITY].
static final int DEFAULT_AA_QUALITY
Default pass2 AA-quality rendering {@value} for Graph Region AA render-modes: VBAA_RENDERING_BIT.
static final int COLORCHANNEL_RENDERING_BIT
Rendering-Mode bit for Region to optionally enable a color-channel per vertex.
static final int clipAASampleCount(final int v)
Returns clipped AA sample-count to [Region#MIN_AA_SAMPLE_COUNT..Region#MAX_AA_SAMPLE_COUNT].
static String getRenderModeString(final int renderModes)
Returns a unique technical description string for renderModes as follows:
static final int AA_RENDERING_MASK
2-pass rendering bit-mask including MSAA_RENDERING_BIT and VBAA_RENDERING_BIT.
static boolean isGraphAA(final int renderModes)
Returns true if given renderModes has any of Region#AA_RENDERING_MASK set.
static final int NORM_RENDERING_BIT
Rendering-Mode bit for Region.
static final int VBAA_RENDERING_BIT
Rendering-Mode bit for Region.
Basic Float math utility functions.
static boolean isZero(final float a, final float epsilon)
Returns true if value is zero, i.e.
void setAlphaBits(final int alphaBits)
Sets the number of bits requested for the color buffer's alpha component.
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 final String GLES3
The embedded OpenGL profile ES 3.x, with x >= 0.
static final String GL2ES2
The intersection of the desktop GL3, GL2 and embedded ES2 profile.
static final String GL3
The desktop OpenGL core profile 3.x, with x >= 1.
static final String GLES2
The embedded OpenGL profile ES 2.x, with x >= 0.
static final String GL4bc
The desktop OpenGL compatibility profile 4.x, with x >= 0, ie GL2 plus GL4.
static GLProfile get(final AbstractGraphicsDevice device, String profile)
Returns a GLProfile object.
static final String GL3bc
The desktop OpenGL compatibility profile 3.x, with x >= 1, ie GL2 plus GL3.
static final String GL2
The desktop OpenGL profile 1.x up to 3.0.
static void initSingleton()
Static initialization of JOGL.
static final String GL4
The desktop OpenGL core profile 4.x, with x >= 0.
CommandlineOptions(final int width, final int height, final int renderModes, final int graphAAQuality, final int graphAASamples, final int sceneMSAASamples)
Commandline options defining default_setting and default_aa_setting.
GLCapabilities getGLCaps()
int fixDefaultAARenderModeWithDPIThreshold(final float dpiV)
Fix default AA rendering bit, forced if having default_aa_setting is true.
CommandlineOptions(final int width, final int height, final int renderModes)
Commandline options defining default_setting and default_aa_setting.
static final float DefaultNoAADPIThreshold
Default DPI threshold value to disable VBAA: {@value} dpi.
boolean default_setting
Is true if values haven't changed throug parse()
int graphAASamples
Sample count for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT...
boolean parse(final String[] args, final int[] idx)
int graphAAQuality
Pass2 AA-quality rendering for Graph Region AA render-modes: VBAA_RENDERING_BIT.
int fixAARenderModeWithDPIThreshold(final boolean force, final float dpiV)
Fix AA rendering bit.
boolean default_aa_setting
Is true if AA values haven't changed through parse()
void parse(final String[] args)
void setGLProfile(final String name)
static int atoi(final String str, final int def)
static float atof(final String str, final float def)