JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
UILayoutBoxGridOffset01.java
Go to the documentation of this file.
1/**
2 * Copyright 2010-2023 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.demos.graph.ui;
29
30import java.io.IOException;
31
32import com.jogamp.graph.curve.Region;
33import com.jogamp.graph.font.Font;
34import com.jogamp.graph.font.FontFactory;
35import com.jogamp.graph.font.FontSet;
36import com.jogamp.graph.ui.Group;
37import com.jogamp.graph.ui.Scene;
38import com.jogamp.graph.ui.Shape;
39import com.jogamp.graph.ui.layout.Alignment;
40import com.jogamp.graph.ui.layout.BoxLayout;
41import com.jogamp.graph.ui.layout.GridLayout;
42import com.jogamp.graph.ui.shapes.Label;
43import com.jogamp.graph.ui.shapes.Rectangle;
44import com.jogamp.math.FloatUtil;
45import com.jogamp.math.Vec3f;
46import com.jogamp.math.Vec4f;
47import com.jogamp.math.geom.AABBox;
48import com.jogamp.math.geom.plane.AffineTransform;
49import com.jogamp.newt.event.WindowAdapter;
50import com.jogamp.newt.event.WindowEvent;
51import com.jogamp.newt.opengl.GLWindow;
52import com.jogamp.opengl.GL;
53import com.jogamp.opengl.GLCapabilities;
54import com.jogamp.opengl.GLProfile;
55import com.jogamp.opengl.demos.graph.ui.util.Tooltips;
56import com.jogamp.opengl.demos.util.CommandlineOptions;
57import com.jogamp.opengl.util.Animator;
58
59import jogamp.graph.ui.TreeTool;
60
61/**
62 * Res independent {@link Shape}s with offset (not starting at origin)
63 * in a {@link Group} using {@link BoxLayout} and {@link GridLayout}, contained within a Scene attached to GLWindow.
64 * <p>
65 * Pass '-keep' to main-function to keep running after animation,
66 * then user can test Shape drag-move and drag-resize w/ 1-pointer.
67 * </p>
68 */
70 static CommandlineOptions options = new CommandlineOptions(1920, 1080, Region.VBAA_RENDERING_BIT);
71
72 static boolean reLayout = true;
73 static final int reLayoutSleep = 500;
74
75 private static final Vec4f groupBorderColor = new Vec4f(0, 0, 1f, 0.6f);
76 private static final float borderThickness = 0.01f;
77
78 public static void main(final String[] args) throws IOException {
79 if( 0 != args.length ) {
80 final int[] idx = { 0 };
81 for (idx[0] = 0; idx[0] < args.length; ++idx[0]) {
82 if( options.parse(args, idx) ) {
83 continue;
84 } else if (args[idx[0]].equals("-no_relayout")) {
85 reLayout = false;
86 }
87 }
88 }
89 System.err.println(options);
90
91 final GLCapabilities reqCaps = options.getGLCaps();
92 System.out.println("Requested: " + reqCaps);
93
94 final Animator animator = new Animator(0 /* w/o AWT */);
95
96 final GLWindow window = GLWindow.create(reqCaps);
97 window.setSize(options.surface_width, options.surface_height);
98 window.setTitle(UILayoutBoxGridOffset01.class.getSimpleName()+": "+window.getSurfaceWidth()+" x "+window.getSurfaceHeight());
99 window.addWindowListener(new WindowAdapter() {
100 @Override
101 public void windowResized(final WindowEvent e) {
102 window.setTitle(UILayoutBoxGridOffset01.class.getSimpleName()+": "+window.getSurfaceWidth()+" x "+window.getSurfaceHeight());
103 }
104 @Override
105 public void windowDestroyNotify(final WindowEvent e) {
106 animator.stop();
107 }
108 });
109
110
111 final int zBits = 16;
112 final Scene scene = new Scene(options.graphAASamples);
114 System.err.println("Z16-Precision: default "+Scene.DEFAULT_Z16_EPSILON);
115 System.err.println("Z16-Precision: zDist -1f, zNear 0.1f "+FloatUtil.getZBufferEpsilon(zBits, -1f, 0.1f));
116 System.err.println("Z16-Precision: current "+scene.getZEpsilon(zBits));
117 scene.setClearParams(new float[] { 1f, 1f, 1f, 1f}, GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
118 scene.setPMvCullingEnabled(true);
119 scene.attachInputListenerTo(window);
120 window.addGLEventListener(scene);
121 window.setVisible(true);
122 scene.waitUntilDisplayed();
123
124 animator.setUpdateFPSFrames(1*60, null); // System.err);
125 animator.add(window);
126 animator.start();
127
128 //
129 // Resolution independent, no screen size
130 //
132 System.err.println("Font: "+font.getFullFamilyName());
133
134 final AABBox sceneBox = scene.getBounds();
135 final float zEps = scene.getZEpsilon(zBits); // Z Epsilon, i.e. minimum recognized delta (resolution)
136 System.err.println("SceneBox "+sceneBox+", zEps "+zEps);
137
138 final float cellGapX = sceneBox.getWidth() / 6f;
139 final float cellGapY = sceneBox.getHeight() * 0.40f;
140 // final float sxy = 1/10f * sceneBox.getWidth();
141 final float sxy = 1/12f * sceneBox.getWidth();
142 // final float sxy = 1/4f * sceneBox.getHeight();
143 final Vec3f nextPos = new Vec3f();
144
145 {
146 final float minX = 0.00f, minY = 0.00f, width = 0.5f, height = 0.5f, lineWidth = 0.05f;
147 if( true ) {
148 final Group g = setupGroup(new Group(new BoxLayout(1f, 1f, Alignment.None)),
149 reqCaps.getGLProfile(), scene, zEps,
150 sxy, nextPos, cellGapX,
151 font, 11,
152 (final Group gp) -> {
153 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
154 }, minX, minY );
155 nextPos.setX( nextPos.x() + cellGapX );
156 }
157 }
158 {
159 final float minX = 0.125f, minY = 0.125f, width = 0.5f, height = 0.5f, lineWidth = 0.05f;
160 if( true ) {
161 final Group g = setupGroup(new Group(new BoxLayout(1f, 1f, Alignment.None)),
162 reqCaps.getGLProfile(), scene, zEps,
163 sxy, nextPos, cellGapX,
164 font, 12,
165 (final Group gp) -> {
166 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
167 }, minX, minY );
168 nextPos.setX( nextPos.x() + cellGapX );
169 }
170 if( true ) {
171 final Group g = setupGroup(new Group(new BoxLayout(1f, 1f, Alignment.Fill)),
172 reqCaps.getGLProfile(), scene, zEps,
173 sxy, nextPos, cellGapX,
174 font, 13,
175 (final Group gp) -> {
176 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
177 }, minX, minY );
178 nextPos.setX( nextPos.x() + cellGapX );
179 }
180 if( true ) {
181 final Group g = setupGroup(new Group(new BoxLayout(1f, 1f, Alignment.Center)),
182 reqCaps.getGLProfile(), scene, zEps,
183 sxy, nextPos, cellGapX,
184 font, 14,
185 (final Group gp) -> {
186 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
187 }, minX, minY );
188 nextPos.setX( nextPos.x() + cellGapX );
189 }
190 if( true ) {
191 final Group g = setupGroup(new Group(new BoxLayout(1f, 1f, Alignment.FillCenter)),
192 reqCaps.getGLProfile(), scene, zEps,
193 sxy, nextPos, cellGapX,
194 font, 15,
195 (final Group gp) -> {
196 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
197 }, minX, minY );
198 nextPos.setX( nextPos.x() + cellGapX );
199 }
200 }
201
202
203 //
204 //
205 // next line
206 nextPos.set(0, nextPos.y() + cellGapY / 2f, 0 );
207
208 {
209 final float minX = 0.000f, minY = 0.000f, width = 0.5f, height = 0.5f, lineWidth = 0.05f;
210 if( true ) {
211 final Group g = setupGroup(new Group(new GridLayout(2, 1f, 1f, Alignment.None)),
212 reqCaps.getGLProfile(), scene, zEps,
213 sxy, nextPos, cellGapX,
214 font, 21,
215 (final Group gp) -> {
216 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
217 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
218 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
219 }, minX, minY );
220 nextPos.setX( nextPos.x() + cellGapX );
221 }
222 }
223 {
224 final float minX = 0.125f, minY = 0.125f, width = 0.5f, height = 0.5f, lineWidth = 0.05f;
225 if( true ) {
226 final Group g = setupGroup(new Group(new GridLayout(2, 1f, 1f, Alignment.None)),
227 reqCaps.getGLProfile(), scene, zEps,
228 sxy, nextPos, cellGapX,
229 font, 22,
230 (final Group gp) -> {
231 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
232 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
233 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
234 }, minX, minY );
235 nextPos.setX( nextPos.x() + cellGapX );
236 }
237 if( true ) {
238 final Group g = setupGroup(new Group(new GridLayout(2, 1f, 1f, Alignment.Fill)),
239 reqCaps.getGLProfile(), scene, zEps,
240 sxy, nextPos, cellGapX,
241 font, 23,
242 (final Group gp) -> {
243 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
244 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
245 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
246 }, minX, minY );
247 nextPos.setX( nextPos.x() + cellGapX );
248 }
249 if( true ) {
250 final Group g = setupGroup(new Group(new GridLayout(2, 1f, 1f, Alignment.Center)),
251 reqCaps.getGLProfile(), scene, zEps,
252 sxy, nextPos, cellGapX,
253 font, 24,
254 (final Group gp) -> {
255 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
256 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
257 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
258 }, minX, minY );
259 nextPos.setX( nextPos.x() + cellGapX );
260 }
261 if( true ) {
262 final Group g = setupGroup(new Group(new GridLayout(2, 1f, 1f, Alignment.FillCenter)),
263 reqCaps.getGLProfile(), scene, zEps,
264 sxy, nextPos, cellGapX,
265 font, 25,
266 (final Group gp) -> {
267 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
268 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
269 gp.addShape( new Rectangle(options.renderModes, minX, minY, width, height, lineWidth, 0).setDragAndResizable(false) );
270 }, minX, minY );
271 nextPos.setX( nextPos.x() + cellGapX );
272 }
273 }
274
275 // next line
276 nextPos.set(0, nextPos.y() + cellGapY, 0 );
277
278 // ...
279
280 {
281 final AABBox sceneDim = scene.getBounds();
282 final String text = " Press group description to magnify! ";
283 final AABBox textDim = font.getGlyphBounds(text, new AffineTransform(), new AffineTransform());
284 final float l_sxy = 1/4f * sceneDim.getWidth() / textDim.getWidth();
285
286 final Shape label = new Label(options.renderModes, font, text).setColor(0, 0, 0, 1).setInteractive(false)
287 .scale(l_sxy, l_sxy, 1).moveTo(sceneDim.getLow())
288 .move(sceneDim.getWidth() - textDim.getWidth()*l_sxy, sceneDim.getHeight() - textDim.getHeight()*l_sxy, 0);
289 scene.addShape(label);
290 }
291
292 try { Thread.sleep(1000); } catch (final InterruptedException e1) { }
293 scene.screenshot(true, scene.nextScreenshotFile(null, UILayoutBoxGridOffset01.class.getSimpleName(), options.renderModes, reqCaps, null));
294 if( !options.stayOpen ) {
295 window.destroy();
296 }
297 }
298
299 static interface GroupMod {
300 void mod(Group group);
301 }
302 static Group setupGroup(final Group g, final GLProfile reqGLP, final Scene scene, final float zEps,
303 final float sxy, final Vec3f nextPos, final float cellGap,
304 final Font font, final int id,
305 final GroupMod modImpl, final float offX, final float offY) {
306 final String suffix = String.format("%2d", id);
307 g.setID(id);
308 final AABBox sceneBox = scene.getBounds();
309 modImpl.mod(g);
310 g.setBorder(borderThickness).setBorderColor(groupBorderColor);
311 g.scale(sxy, sxy, 1);
312 g.setInteractive(true);
313 g.validate(reqGLP);
314 g.moveTo(sceneBox.getLow()).move(nextPos);
315 System.err.println("Group-"+suffix+" "+g);
316 System.err.println("Group-"+suffix+" Layout "+g.getLayout());
317 TreeTool.forAll(g, (shape) -> { System.err.println("Shape... "+shape); return false; });
318 scene.addShape(g);
319 {
320 final float X_width = font.getGlyph( ' ' ).getAdvanceWidth();
321 /**
322 * ID 23: G 23, size[total 2.1 x 1.7, cell 1.0 x 0.5]
323 * Padding[t 0.05, r 0.05, b 0.05, l 0.05]
324 * Gap[r 0.1, c 0.1], Align [CenterHoriz, CenterVert, Fill]
325 */
326 final String fixed_text = "Gap[r 0.1, c 0.1], Align [CenterHoriz, CenterVert, Fi";
327 final float l_sxy = g.getScaledWidth() / font.getGlyphBounds(fixed_text, new AffineTransform(), new AffineTransform()).getWidth();
328
329 final String text;
330 final Group.Layout l = g.getLayout();
331 if( l instanceof GridLayout ) {
332 final GridLayout gl = (GridLayout)l;
333 text = String.format("Grid %2d, off %.3f/%.3f, size[total %.1f x %.1f, cell %.1f x %.1f]%n%s%n%s, Align %s",
334 id, offX, offY, g.getBounds().getWidth(), g.getBounds().getHeight(), gl.getCellSize().x(), gl.getCellSize().y(),
335 ( null == gl.getPadding() || gl.getPadding().zeroSize() ) ? "Padding none" : gl.getPadding().toString(),
336 gl.getGap().zeroSumSize() ? "Gap none" : gl.getGap().toString(),
337 gl.getAlignment() );
338 } else if( l instanceof BoxLayout ){
339 final BoxLayout bl = (BoxLayout)l;
340 text = String.format("Box %2d, off %.3f/%.3f, size[total %.1f x %.1f, cell %.1f x %.1f]%n%s%n%s, Align %s",
341 id, offX, offY, g.getBounds().getWidth(), g.getBounds().getHeight(), bl.getCellSize().x(), bl.getCellSize().y(),
342 ( null == bl.getPadding() || bl.getPadding().zeroSize() ) ? "Padding none" : bl.getPadding().toString(),
343 bl.getMargin().zeroSize() ? "Margin none" : bl.getMargin().toString(),
344 bl.getAlignment() );
345 } else {
346 text = String.format("Layout %2d, off %.3f/%.3f, size[total %.1f x %.1f", id, offX, offY, g.getBounds().getWidth(), g.getBounds().getHeight());
347 }
348 final Shape label = new Label(options.renderModes, font, text).setColor(0, 0, 0, 1).validate(reqGLP);
349 label.scale(l_sxy, l_sxy, 1).moveTo(sceneBox.getLow()).move(nextPos).move(l_sxy*X_width, g.getScaledHeight(), 0)
350 .addMouseListener(new Tooltips.ZoomLabelOnClickListener(scene, options.renderModes, 1/6f)).setDragAndResizable(false);
351 scene.addShape(label);
352 }
353 if( reLayout ) {
354 try { Thread.sleep(reLayoutSleep); } catch (final InterruptedException e1) { }
355 g.markShapeDirty();
356 g.validate(reqGLP);
357 System.err.println("Group-"+suffix+".2 "+g);
358 System.err.println("Group-"+suffix+" Layout.2 "+g.getLayout());
359 TreeTool.forAll(g, (shape) -> { System.err.println("Shape... "+shape); return false; });
360 }
361 return g;
362 }
363
364}
Abstract Outline shape representation define the method an OutlineShape(s) is bound and rendered.
Definition: Region.java:62
static final int VBAA_RENDERING_BIT
Rendering-Mode bit for Region.
Definition: Region.java:115
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}.
Group of Shapes, optionally utilizing a Group.Layout.
Definition: Group.java:61
Default implementation of Scene.PMVMatrixSetup, implementing Scene.PMVMatrixSetup#set(PMVMatrix4f,...
Definition: Scene.java:1506
GraphUI Scene.
Definition: Scene.java:102
void addShape(final Shape s)
Adds a Shape.
Definition: Scene.java:287
final void setClearParams(final float[] clearColor, final int clearMask)
Sets the clear parameter for glClearColor(..) and glClear(..) to be issued at display(GLAutoDrawable)...
Definition: Scene.java:221
final void setPMvCullingEnabled(final boolean v)
Enable or disable Project-Modelview (PMv) frustum culling per Shape for this container.
Definition: Scene.java:230
void waitUntilDisplayed()
Blocks until first display(GLAutoDrawable) has completed after construction or dispose(GLAutoDrawable...
Definition: Scene.java:584
final void setPMVMatrixSetup(final PMVMatrixSetup setup)
Set a custom PMVMatrixSetup.
Definition: Scene.java:745
static final float DEFAULT_Z16_EPSILON
Default Z precision on 16-bit depth buffer using DEFAULT_SCENE_DIST z-position and DEFAULT_ZNEAR.
Definition: Scene.java:112
static float getZEpsilon(final int zBits, final PMVMatrixSetup setup)
Default Z precision on 16-bit depth buffer using -1 z-position and DEFAULT_ZNEAR.
Definition: Scene.java:126
AABBox getBounds(final PMVMatrix4f pmv, final Shape shape)
Returns AABBox dimension of given Shape from this container's perspective, i.e.
Definition: Scene.java:676
synchronized void attachInputListenerTo(final GLWindow window)
Definition: Scene.java:246
File nextScreenshotFile(final String dir, final String prefix, final int renderModes, final GLCapabilitiesImmutable caps, final String contentDetail)
Return the unique next technical screenshot PNG File instance as follows:
Definition: Scene.java:1434
Generic Shape, potentially using a Graph via GraphShape or other means of representing content.
Definition: Shape.java:87
Shape setColor(final float r, final float g, final float b, final float a)
Set base color.
Definition: Shape.java:1389
final Shape setInteractive(final boolean v)
Set whether this shape is interactive in general, i.e.
Definition: Shape.java:1711
Immutable layout alignment options, including Bit#Fill.
Definition: Alignment.java:35
static final Alignment Fill
Bit#Fill alignment constant.
Definition: Alignment.java:43
static final Alignment Center
Bit#CenterHoriz and Bit#CenterVert alignment constant.
Definition: Alignment.java:39
static final Alignment None
No alignment constant.
Definition: Alignment.java:37
static final Alignment FillCenter
Bit#Fill, Bit#CenterHoriz and Bit#CenterVert alignment constant.
Definition: Alignment.java:45
GraphUI Stack Group.Layout.
Definition: BoxLayout.java:53
GraphUI Grid Group.Layout.
Definition: GridLayout.java:56
A GraphUI text label GraphShape.
Definition: Label.java:50
Basic Float math utility functions.
Definition: FloatUtil.java:83
static float getZBufferEpsilon(final int zBits, final float z, final float zNear)
Returns resolution of Z buffer of given parameter, see Love Your Z-Buffer.
3D Vector based upon three float components.
Definition: Vec3f.java:37
void setX(final float x)
Definition: Vec3f.java:158
Vec3f set(final Vec3f o)
this = o, returns this.
Definition: Vec3f.java:79
4D Vector based upon four float components.
Definition: Vec4f.java:37
Axis Aligned Bounding Box.
Definition: AABBox.java:54
final float getWidth()
Definition: AABBox.java:879
final Vec3f getLow()
Returns the minimum left-bottom-far (xyz) coordinate.
Definition: AABBox.java:140
final float getHeight()
Definition: AABBox.java:883
NEWT Window events are provided for notification purposes ONLY.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
Definition: GLWindow.java:121
final int getSurfaceHeight()
Returns the height of this GLDrawable's surface client area in pixel units.
Definition: GLWindow.java:466
final void setTitle(final String title)
Definition: GLWindow.java:297
final int getSurfaceWidth()
Returns the width of this GLDrawable's surface client area in pixel units.
Definition: GLWindow.java:461
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
Definition: GLWindow.java:625
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
Definition: GLWindow.java:615
final void addWindowListener(final WindowListener l)
Appends the given com.jogamp.newt.event.WindowListener to the end of the list.
Definition: GLWindow.java:882
final void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
Definition: GLWindow.java:605
static GLWindow create(final GLCapabilitiesImmutable caps)
Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display wi...
Definition: GLWindow.java:169
Specifies a set of OpenGL capabilities.
final GLProfile getGLProfile()
Returns the GL profile you desire or used by the drawable.
Specifies the the OpenGL profile.
Definition: GLProfile.java:77
Res independent Shapes with offset (not starting at origin) in a Group using BoxLayout and GridLayout...
int graphAASamples
Sample count for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT...
final synchronized void add(final GLAutoDrawable drawable)
Adds a drawable to this animator's list of rendering drawables.
final void setUpdateFPSFrames(final int frames, final PrintStream out)
final synchronized boolean start()
Starts this animator, if not running.
Definition: Animator.java:344
final synchronized boolean stop()
Stops this animator.
Definition: Animator.java:368
static final int FAMILY_LIGHT
Font family LIGHT, {@value}.
Definition: FontSet.java:39
Font get(int family, int stylebits)
static final int STYLE_SERIF
SERIF style/family bit flag.
Definition: FontSet.java:54
float getAdvanceWidth()
Returns advance in font em-size [0..1], sourced from hmtx table.
Interface wrapper for font implementation.
Definition: Font.java:60
Glyph getGlyph(final String name)
Returns the Glyph mapped to given name.
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...
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
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