29package com.jogamp.opengl.demos.av;
32import java.io.IOException;
34import java.net.URISyntaxException;
36import com.jogamp.common.av.PTS;
37import com.jogamp.common.net.Uri;
38import com.jogamp.common.os.Clock;
39import com.jogamp.common.util.InterruptSource;
40import com.jogamp.graph.curve.Region;
41import com.jogamp.graph.curve.opengl.GLRegion;
42import com.jogamp.graph.curve.opengl.RegionRenderer;
43import com.jogamp.graph.font.Font;
44import com.jogamp.graph.font.FontScale;
45import com.jogamp.newt.Window;
46import com.jogamp.newt.event.KeyAdapter;
47import com.jogamp.newt.event.KeyEvent;
48import com.jogamp.newt.event.KeyListener;
49import com.jogamp.newt.event.MouseAdapter;
50import com.jogamp.newt.event.MouseEvent;
51import com.jogamp.newt.event.MouseListener;
52import com.jogamp.newt.event.WindowAdapter;
53import com.jogamp.newt.event.WindowEvent;
54import com.jogamp.newt.opengl.GLWindow;
55import com.jogamp.opengl.GL2ES2;
56import com.jogamp.opengl.GLAnimatorControl;
57import com.jogamp.opengl.GLAutoDrawable;
58import com.jogamp.opengl.GLCapabilities;
59import com.jogamp.opengl.GLEventListener;
60import com.jogamp.opengl.GLException;
61import com.jogamp.opengl.GLProfile;
62import com.jogamp.opengl.GLRunnable;
63import com.jogamp.opengl.JoglVersion;
64import com.jogamp.opengl.demos.es2.TextureSequenceES2;
65import com.jogamp.opengl.demos.graph.TextRendererGLELBase;
66import com.jogamp.opengl.demos.util.MiscUtils;
67import com.jogamp.opengl.util.Animator;
68import com.jogamp.opengl.util.GLReadBufferUtil;
69import com.jogamp.opengl.util.av.GLMediaPlayer;
70import com.jogamp.opengl.util.av.GLMediaPlayer.GLMediaEventListener;
71import com.jogamp.opengl.util.av.GLMediaPlayerFactory;
72import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame;
83 public static final String
PLAYER =
"player";
85 private static boolean waitForKey =
false;
86 private int surfWidth, surfHeight;
87 private int prevMouseX;
88 private boolean orthoProjection =
true;
93 private float alpha = 1.0f;
94 private int swapInterval = 1;
95 private boolean swapIntervalSet =
true;
99 private final boolean mPlayerShared;
100 private boolean useOriginalScale;
101 private volatile boolean resetGLState =
false;
112 _defURI = Uri.cast(
"http://archive.org/download/BigBuckBunny_328/BigBuckBunny_512kb.mp4");
113 }
catch (
final URISyntaxException e) {
120 private final Font font = getFont(0, 0, 0);
121 private final float fontSize = 10f;
124 InfoTextRendererGLELBase(
final GLProfile glp,
final int rmode) {
130 staticRGBAColor[0] = 0.9f;
131 staticRGBAColor[1] = 0.9f;
132 staticRGBAColor[2] = 0.9f;
133 staticRGBAColor[3] = 1.0f;
138 super.init(drawable);
143 if(
null != regionFPS ) {
146 super.dispose(drawable);
149 String text1_old =
null;
152 public void display(
final GLAutoDrawable drawable) {
153 final GLAnimatorControl anim = drawable.getAnimator();
154 final float lfps =
null != anim ? anim.getLastFPS() : 0f;
155 final float tfps =
null != anim ? anim.getTotalFPS() : 0f;
156 final long currentMillis = Clock.currentMillis();
157 final PTS scr = mPlayer.
getPTS();
158 final float pts_s = scr.get(currentMillis) / 1000f;
159 final float now = currentMillis / 1000f;
163 final int height = drawable.getSurfaceHeight();
167 final String ptsPrec =
null != regionFPS ?
"3.1" :
"3.0";
168 final String text1 = String.format(
"%0"+ptsPrec+
"f/%0"+ptsPrec+
"f/%0"+ptsPrec+
"f s, %s (%01.2fx, vol %01.2f), a %01.2f, fps %02.1f -> %02.1f / %02.1f, swap %d",
171 aspect, mPlayer.
getFramerate(), lfps, tfps, drawable.getGL().getSwapInterval());
172 final String text2 = String.format(
"audio: id %d, kbps %d, codec %s",
174 final String text3 = String.format(
"video: id %d, kbps %d, codec %s",
176 final String text4 = mPlayer.
getUri().path.decode();
177 if( displayOSD &&
null != renderer ) {
179 final float pixelSize = FontScale.toPixels(fontSize, dpiH);
180 final GL2ES2 gl = drawable.getGL().getGL2ES2();
181 if( !text1.equals(text1_old) ) {
182 renderString(drawable, font, pixelSize, text1, 1 , 1 , 0, 0, -1, regionFPS.
clear(gl));
185 renderRegion(drawable, font, pixelSize, 1 , 1 , 0, 0, -1, regionFPS);
187 renderString(drawable, font, pixelSize, text2, 1 , -4 , 0, height, -1,
true);
188 renderString(drawable, font, pixelSize, text3, 1 , -3 , 0, height, -1,
true);
189 renderString(drawable, font, pixelSize, text4, 1 , -2 , 0, height, -1,
true);
192 private InfoTextRendererGLELBase textRendererGLEL =
null;
193 private boolean displayOSD =
true;
196 final String filename = String.format(
"MovieSimple-snap%02d-%03dx%03d.png", screenshot_num++, drawable.getSurfaceWidth(), drawable.getSurfaceHeight());
197 if(screenshot.
readPixels(drawable.getGL(),
false)) {
198 screenshot.
write(
new File(filename.toString()));
202 private int screenshot_num = 0;
212 }
catch (
final IOException e) {
223 public void mouseClicked(
final MouseEvent e) {
230 public void mousePressed(
final MouseEvent e) {
231 if(e.getY()<=surfHeight/2 &&
null!=mPlayer && 1 == e.getClickCount()) {
232 if(GLMediaPlayer.State.Playing == mPlayer.
getState()) {
233 mPlayer.
pause(
false);
240 public void mouseReleased(
final MouseEvent e) {
241 if(e.getY()<=surfHeight/2) {
243 if(
null != screen ) {
247 System.err.println(
"zoom: "+zoom);
251 public void mouseMoved(
final MouseEvent e) {
252 prevMouseX = e.getX();
256 public void mouseDragged(
final MouseEvent e) {
257 final int x = e.getX();
258 final int y = e.getY();
261 final float dp = (float)(x-prevMouseX)/(float)surfWidth;
262 final int pts0 = mPlayer.
getPTS().getCurrent();
267 if(
null != screen ) {
277 public void mouseWheelMoved(
final MouseEvent e) {
278 if( !e.isShiftDown() ) {
279 zoom += e.getRotation()[1]/10f;
280 if(
null != screen ) {
283 System.err.println(
"zoom: "+zoom);
287 private final KeyListener keyAction =
new KeyAdapter() {
289 public void keyReleased(
final KeyEvent e) {
290 if( e.isAutoRepeat() ) {
293 System.err.println(
"MC "+e);
294 final int pts0 = mPlayer.
getPTS().getCurrent();
296 switch(e.getKeySymbol()) {
297 case KeyEvent.VK_V: {
298 switch(swapInterval) {
299 case 0: swapInterval = -1;
break;
300 case -1: swapInterval = 1;
break;
301 case 1: swapInterval = 0;
break;
302 default: swapInterval = 1;
break;
304 swapIntervalSet =
true;
307 case KeyEvent.VK_O: displayOSD = !displayOSD;
break;
308 case KeyEvent.VK_RIGHT: pts1 = pts0 + 1000;
break;
309 case KeyEvent.VK_UP: pts1 = pts0 + 10000;
break;
310 case KeyEvent.VK_PAGE_UP: pts1 = pts0 + 30000;
break;
311 case KeyEvent.VK_LEFT: pts1 = pts0 - 1000;
break;
312 case KeyEvent.VK_DOWN: pts1 = pts0 - 10000;
break;
313 case KeyEvent.VK_PAGE_DOWN: pts1 = pts0 - 30000;
break;
314 case KeyEvent.VK_HOME:
315 case KeyEvent.VK_BACK_SPACE: {
316 System.err.println(
"Seek: "+pts0+
" -> 0");
320 case KeyEvent.VK_SPACE: {
321 if( GLMediaPlayer.State.Paused == mPlayer.
getState() ) {
323 }
else if(GLMediaPlayer.State.Uninitialized == mPlayer.
getState()) {
324 playStream(mPlayer.
getUri(), GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.STREAM_ID_AUTO, 3 );
325 }
else if( e.isShiftDown() ) {
328 mPlayer.
pause(
false);
332 case KeyEvent.VK_MULTIPLY:
335 case KeyEvent.VK_SUBTRACT: {
337 if( e.isShiftDown() ) {
344 case KeyEvent.VK_ADD: {
346 if( e.isShiftDown() ) {
353 case KeyEvent.VK_M: {
355 if( audioVolume > 0.5f ) {
363 if(
null != autoDrawable) {
368 case KeyEvent.VK_ESCAPE:
370 if(
null != autoDrawable) {
371 MiscUtils.destroyWindow(autoDrawable);
377 System.err.println(
"Seek: "+pts0+
" -> "+pts1);
396 System.err.println(
"MovieSimple.0 AttributesChanges: "+eventMask+
", when "+when);
397 System.err.println(
"MovieSimple.0 State: "+mp);
399 new InterruptSource.Thread() {
415 mPlayer = sharedMediaPlayer;
416 mPlayerShared =
null != mPlayer;
417 useOriginalScale =
false;
418 if( !mPlayerShared ) {
422 System.out.println(
"pC.1a shared "+mPlayerShared+
", "+mPlayer);
425 public void playStream(
final Uri streamLoc,
final int vid,
final int aid,
final int textureCount) {
427 System.out.println(
"pC.1b "+mPlayer);
433 useOriginalScale = v;
451 if(
null == mPlayer) {
452 throw new InternalError(
"mPlayer null");
455 resetGLState =
false;
457 zoom0 = orthoProjection ? 0f : -2.5f;
458 zoom1 = orthoProjection ? 0f : -5f;
461 autoDrawable = drawable;
466 ", "+drawable.getClass().getName()+
", "+drawable);
479 }
catch (
final Exception e) {
481 if(
null != mPlayer) {
487 screen.
init(drawable);
490 if (upstreamWidget instanceof
Window) {
498 textRendererGLEL =
new InfoTextRendererGLELBase(gl.
getGLProfile(), rmode);
504 if(
null == mPlayer) {
return; }
505 screen.
reshape(drawable, x, y, width, height);
508 System.out.println(
"pR "+mPlayer);
515 disposeImpl(drawable,
true);
518 private void disposeImpl(
final GLAutoDrawable drawable,
final boolean disposePlayer) {
519 if(
null == mPlayer) {
return; }
522 if (upstreamWidget instanceof Window) {
523 final Window window = (Window) upstreamWidget;
524 window.removeMouseListener(mouseAction);
525 window.removeKeyListener(keyAction);
528 System.out.println(
"pD.1 "+mPlayer+
", disposePlayer "+disposePlayer);
530 if(
null != textRendererGLEL ) {
532 textRendererGLEL =
null;
534 if( disposePlayer ) {
540 System.out.println(
"pD.X "+mPlayer);
547 long lastPerfPos = 0;
552 if( swapIntervalSet ) {
553 final int _swapInterval = swapInterval;
559 System.err.println(
"Swap Interval: "+_swapInterval+
" -> "+swapInterval);
560 swapIntervalSet =
false;
562 if(
null == mPlayer) {
return; }
565 resetGLState =
false;
566 System.err.println(
"XXX resetGLState");
567 disposeImpl(drawable,
false);
572 final long currentPos = System.currentTimeMillis();
573 if( currentPos - lastPerfPos > 2000 ) {
575 lastPerfPos = currentPos;
581 void destroyWindow(
final Window window) {
582 new InterruptSource.Thread( () -> { window.
destroy(); } ).start();
585 public void attributesChanged(
final GLMediaPlayer mp,
final GLMediaPlayer.EventMask eventMask,
final long when) {
586 System.err.println(
"MovieSimple.1 AttributesChanges: "+eventMask+
", when "+when);
587 System.err.println(
"MovieSimple.1 State: "+mp);
588 final GLWindow window = (GLWindow) mp.getAttachedObject(
WINDOW_KEY);
590 if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Size) ) {
592 window.setSurfaceSize(mp.getWidth(), mp.getHeight());
597 if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Init) ) {
599 final GLAnimatorControl anim = window.getAnimator();
600 anim.setUpdateFPSFrames(60,
null);
601 anim.resetFPSCounter();
623 }
else if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) {
624 window.getAnimator().resetFPSCounter();
627 boolean destroy =
false;
628 Throwable err =
null;
630 if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.EOS) ) {
631 err = ms.mPlayer.getStreamException();
633 System.err.println(
"MovieSimple State: Exception");
637 new InterruptSource.Thread() {
650 if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Error) ) {
651 err = ms.mPlayer.getStreamException();
653 System.err.println(
"MovieSimple State: Exception");
659 err.printStackTrace();
661 destroyWindow(window);
667 static boolean loopEOS =
false;
668 static boolean origSize;
670 public static void main(
final String[] args)
throws IOException, URISyntaxException {
671 int swapInterval = 1;
672 float playSpeed = 1.0f;
675 int textureCount = 3;
676 boolean ortho =
true;
677 boolean useOrigScale =
false;
679 boolean forceES2 =
false;
680 boolean forceES3 =
false;
681 boolean forceGL3 =
false;
682 boolean forceGLDef =
false;
685 float audioVolume = 1.0f;
687 final int windowCount;
689 int _windowCount = 0;
690 for(
int i=0; i<args.length; i++) {
691 if(args[i].equals(
"-url")) {
696 windowCount = Math.max(1, _windowCount);
698 final String[] urls_s =
new String[windowCount];
700 boolean _origSize =
false;
702 for(
int i=0; i<args.length; i++) {
703 if(args[i].equals(
"-vid")) {
706 }
else if(args[i].equals(
"-aid")) {
709 }
else if(args[i].equals(
"-width")) {
712 }
else if(args[i].equals(
"-height")) {
715 }
else if(args[i].equals(
"-osize")) {
717 }
else if(args[i].equals(
"-textureCount")) {
720 }
else if(args[i].equals(
"-es2")) {
722 }
else if(args[i].equals(
"-es3")) {
724 }
else if(args[i].equals(
"-gl3")) {
726 }
else if(args[i].equals(
"-gldef")) {
728 }
else if(args[i].equals(
"-vsync")) {
731 }
else if(args[i].equals(
"-speed")) {
734 }
else if(args[i].equals(
"-mute")) {
736 }
else if(args[i].equals(
"-projection")) {
738 }
else if(args[i].equals(
"-orig_scale")) {
740 }
else if(args[i].equals(
"-loop")) {
742 }
else if(args[i].equals(
"-url")) {
744 urls_s[url_idx++] = args[i];
745 }
else if(args[i].equals(
"-wait")) {
749 origSize = _origSize;
751 Uri streamLoc0 =
null;
752 if(
null != urls_s[0] ) {
753 streamLoc0 = Uri.tryUriOrFile( urls_s[0] );
755 if(
null == streamLoc0 ) {
758 System.err.println(
"url_s "+urls_s[0]);
759 System.err.println(
"stream0 "+streamLoc0);
760 System.err.println(
"vid "+vid+
", aid "+aid);
761 System.err.println(
"textureCount "+textureCount);
762 System.err.println(
"forceES2 "+forceES2);
763 System.err.println(
"forceES3 "+forceES3);
764 System.err.println(
"forceGL3 "+forceGL3);
765 System.err.println(
"forceGLDef "+forceGLDef);
766 System.err.println(
"swapInterval "+swapInterval);
767 System.err.println(
"playSpeed "+playSpeed);
768 System.err.println(
"audioVolume "+audioVolume);
773 }
else if(forceGL3) {
775 }
else if(forceES3) {
777 }
else if(forceES2) {
782 System.err.println(
"GLProfile: "+glp);
788 for(
int i=0; i<windowCount; i++) {
807 anim.
add(windows[i]);
810 windows[i].
setSize(width, height);
813 Uri streamLocN =
null;
815 streamLocN = streamLoc0;
817 if(
null != urls_s[i] ) {
818 streamLocN = Uri.tryUriOrFile( urls_s[i] );
820 if(
null == streamLocN ) {
824 System.err.println(
"Win #"+i+
": stream "+streamLocN);
825 mss[i].
playStream(streamLocN, vid, aid, textureCount);
Abstract Outline shape representation define the method an OutlineShape(s) is bound and rendered.
static String getRenderModeString(final int renderModes)
Returns a unique technical description string for renderModes as follows:
static final int DEFAULT_AA_SAMPLE_COUNT
Default pass2 AA sample count {@value} for Graph Region AA render-modes: VBAA_RENDERING_BIT or Region...
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...
Pointer event of type PointerType.
final short getClickCount()
NEWT Window events are provided for notification purposes ONLY.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
final void setTitle(final String title)
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.
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.
A generic exception for OpenGL errors used throughout the binding as a substitute for RuntimeExceptio...
Specifies the the OpenGL profile.
static final String GLES3
The embedded OpenGL profile ES 3.x, with x >= 0.
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 GLProfile getDefault(final AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform.
static GLProfile get(final AbstractGraphicsDevice device, String profile)
Returns a GLProfile object.
static GLProfile getGL2ES2(final AbstractGraphicsDevice device)
Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.
static StringBuilder getGLInfo(final GL gl, final StringBuilder sb)
Simple planar movie player w/ orthogonal 1:1 projection.
GLMediaPlayer getGLMediaPlayer()
void setEffects(final int e)
static final int EFFECT_TRANSPARENT
static final MyGLMediaEventListener myGLMediaEventListener
void setSwapInterval(final int v)
void playStream(final Uri streamLoc, final int vid, final int aid, final int textureCount)
void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height)
Called by the drawable during the first repaint after the component has been resized.
static final int EFFECT_GRADIENT_BOTTOM2TOP
static final String PLAYER
static void main(final String[] args)
void printScreenOnGLThread(final GLAutoDrawable drawable)
void dispose(final GLAutoDrawable drawable)
Notifies the listener to perform the release of all OpenGL resources per GLContext,...
void init(final GLAutoDrawable drawable)
Called by the drawable immediately after the OpenGL context is initialized.
void setTransparency(final float alpha)
boolean getOrthoProjection()
static final String WINDOW_KEY
void setUseOriginalScale(final boolean v)
MovieSimple()
Default constructor which also issues playStream(URI, int, int, int) w/ default values and polls unti...
void display(final GLAutoDrawable drawable)
Called by the drawable to initiate OpenGL rendering by the client.
void setOrthoProjection(final boolean v)
defaults to true
static final Uri defURI
Blender's Big Buck Bunny: 24f 416p H.264, AAC 48000 Hz, 2 ch, mpeg stream.
void printScreen(final GLAutoDrawable drawable)
MovieSimple(final GLMediaPlayer sharedMediaPlayer)
Custom constructor, user needs to issue playStream(URI, int, int, int) afterwards.
static final int EFFECT_NORMAL
Simple planar movie player w/ orthogonal 1:1 projection.
void display(final GLAutoDrawable drawable)
Called by the drawable to initiate OpenGL rendering by the client.
void setTransparency(final float alpha)
void init(final GLAutoDrawable drawable)
Called by the drawable immediately after the OpenGL context is initialized.
void setZRotation(final float zrot)
void dispose(final GLAutoDrawable drawable)
Notifies the listener to perform the release of all OpenGL resources per GLContext,...
void setUseOriginalScale(final boolean v)
void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height)
Called by the drawable during the first repaint after the component has been resized.
void setZoom(final float zoom)
void setEffects(final int e)
void renderString(final GLAutoDrawable drawable, final Font font, final float pixelSize, final CharSequence text, final int column, final float tx, final float ty, final float tz, final boolean cacheRegion)
static void waitForKey(final String preMessage)
static int atoi(final String str, final int def)
static void destroyWindow(final GLAutoDrawable glad)
static float atof(final String str, final float 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.
Interface wrapper for font implementation.
boolean isBackgroundOpaque()
Returns whether an opaque or translucent surface is requested, supported or chosen.
int getSurfaceWidth()
Returns the width of the client area excluding insets (window decorations) in pixel units.
int getSurfaceHeight()
Returns the height of the client area excluding insets (window decorations) in pixel units.
Specifying NEWT's Window functionality:
void addKeyListener(KeyListener l)
Appends the given com.jogamp.newt.event.KeyListener to the end of the list.
void addMouseListener(MouseListener l)
Appends the given MouseListener to the end of the list.
void destroy()
Destroys this window incl.releasing all related resources.
Listener for MouseEvents.
void resetFPSCounter()
Reset all performance counter (startTime, currentTime, frame number)
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()
GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove)
Disposes the given listener via dispose(..) if it has been initialized and added to this queue.
GL getGL()
Returns the GL pipeline object this GLAutoDrawable uses.
Object getUpstreamWidget()
Method may return the upstream UI toolkit object holding this GLAutoDrawable instance,...
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of 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.
int getSwapInterval()
Return the current swap interval.
boolean getSampleBuffers()
Returns whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawab...
GLCapabilitiesImmutable getChosenGLCapabilities()
Fetches the GLCapabilitiesImmutable corresponding to the chosen OpenGL capabilities (pixel format / v...
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.