|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
TestSharedContextNewtAWTBug523. More...
Classes | |
| class | TwoTriangles |
Public Member Functions | |
| void | test01UseAWTNotShared () throws InterruptedException, InvocationTargetException |
| void | test02UseAWTSharedContext () throws InterruptedException, InvocationTargetException |
| void | test10UseNEWTNotShared () throws InterruptedException, InvocationTargetException |
| void | test11UseNEWTSharedContext () throws InterruptedException, InvocationTargetException |
| void | testContextSharingCreateVisibleDestroy (final boolean useNewt, final boolean shareContext) throws InterruptedException, InvocationTargetException |
| Assemble the user interface and start the animator. More... | |
Public Member Functions inherited from com.jogamp.opengl.test.junit.util.UITestCase | |
| int | getMaxTestNameLen () |
| String | getSnapshotFilename (final int sn, String postSNDetail, final GLCapabilitiesImmutable caps, final int width, final int height, final boolean sinkHasAlpha, String fileSuffix, final String destPath) |
| void | snapshot (final int sn, final String postSNDetail, final GL gl, final GLReadBufferUtil readBufferUtil, final String fileSuffix, final String destPath) |
| Takes a snapshot of the drawable's current front framebuffer. More... | |
Static Public Member Functions | |
| static void | initClass () |
| static void | logAnyErrorCodes (final Object obj, final GL gl, final String prefix) |
| static float | setupViewFrustum (final GL2 gl2, final int width, final int height, final float boundsRadius, final float zoomFactor, final float viewFovDegrees) |
| Sets the OpenGL projection matrix and front and back clipping planes for a viewport and returns the distance the camera should be placed from the center of the scene's bounding sphere such that the geometry is centered in the view frustum. More... | |
| static void | main (final String[] args) throws IOException |
Static Public Member Functions inherited from com.jogamp.opengl.test.junit.util.UITestCase | |
| static void | setResetXRandRIfX11AfterClass () |
| static int | resetXRandRIfX11 () |
| Iterates through all outputs and sets the preferred mode and normal rotation using RandR 1.3. More... | |
| static int | processCommand (final String[] cmdline, final OutputStream outstream, final StringBuilder outstring, final String outPrefix) |
| static final void | oneTimeSetUpUITest () |
| static final void | oneTimeTearDownUITest () |
TestSharedContextNewtAWTBug523.
Opens a single JFrame with two OpenGL widgets and sliders to adjust the view orientation.
Each OpenGL widget renders a red triangle and a blue triangle. The red triangle is rendered using glBegin / glVertex / glEnd. The blue triangle is rendered using vertex buffer objects.
VAO's are not used to allow testing on OSX GL2 context!
If static useNewt is true, then those OpenGL widgets are GLWindow objects in a NewtCanvasAWT. If static useNewt is false, then those OpenGL widgets are GLCanvas objects.
If shareContext is true, then the two OpenGL windows are initialized with a shared context, so that they share the vertex buffer and array objects and display lists. If shareContext is false, then the two OpenGL windows each have their own context, and the blue triangle fails to render in one of the windows.
The four test cases run through the four combinations of useNewt and shareContext.
Similar test cases are TestSharedContextListNEWT, TestSharedContextListAWT, TestSharedContextVBOES2NEWT1 and TestSharedContextVBOES1NEWT.
Definition at line 112 of file TestSharedContextNewtAWTBug523.java.
|
static |
Definition at line 131 of file TestSharedContextNewtAWTBug523.java.
|
static |
Definition at line 480 of file TestSharedContextNewtAWTBug523.java.
|
static |
Definition at line 825 of file TestSharedContextNewtAWTBug523.java.
|
static |
Sets the OpenGL projection matrix and front and back clipping planes for a viewport and returns the distance the camera should be placed from the center of the scene's bounding sphere such that the geometry is centered in the view frustum.
| gl2 | current OpenGL context |
| width | width of GLDrawable |
| height | height of GLDrawable |
| boundsRadius | radius of a minimal bounding sphere of objects to be rendered in the viewport |
| zoomFactor | affects how far away the camera is placed from the scene; changing the zoom from 1.0 to 0.5 would make the scene appear half the size |
| viewFovDegrees | the desired field of vision for the viewport, higher is more fish-eye |
Definition at line 517 of file TestSharedContextNewtAWTBug523.java.
| void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test01UseAWTNotShared | ( | ) | throws InterruptedException, InvocationTargetException |
Definition at line 537 of file TestSharedContextNewtAWTBug523.java.
| void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test02UseAWTSharedContext | ( | ) | throws InterruptedException, InvocationTargetException |
Definition at line 542 of file TestSharedContextNewtAWTBug523.java.
| void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test10UseNEWTNotShared | ( | ) | throws InterruptedException, InvocationTargetException |
Definition at line 547 of file TestSharedContextNewtAWTBug523.java.
| void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test11UseNEWTSharedContext | ( | ) | throws InterruptedException, InvocationTargetException |
Definition at line 552 of file TestSharedContextNewtAWTBug523.java.
| void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.testContextSharingCreateVisibleDestroy | ( | final boolean | useNewt, |
| final boolean | shareContext | ||
| ) | throws InterruptedException, InvocationTargetException |
Assemble the user interface and start the animator.
It waits until the window is closed an then attempts orderly shutdown and resource deallocation.
Definition at line 560 of file TestSharedContextNewtAWTBug523.java.