JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523 Class Reference

TestSharedContextNewtAWTBug523. More...

Inheritance diagram for com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523:
Collaboration diagram for com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523:

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 ()
 

Detailed Description

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.

Member Function Documentation

◆ initClass()

static void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.initClass ( )
static

Definition at line 131 of file TestSharedContextNewtAWTBug523.java.

Here is the call graph for this function:

◆ logAnyErrorCodes()

static void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.logAnyErrorCodes ( final Object  obj,
final GL  gl,
final String  prefix 
)
static

Definition at line 480 of file TestSharedContextNewtAWTBug523.java.

Here is the call graph for this function:

◆ main()

static void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.main ( final String[]  args) throws IOException
static

Definition at line 825 of file TestSharedContextNewtAWTBug523.java.

◆ setupViewFrustum()

static float com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.setupViewFrustum ( final GL2  gl2,
final int  width,
final int  height,
final float  boundsRadius,
final float  zoomFactor,
final float  viewFovDegrees 
)
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.

Parameters
gl2current OpenGL context
widthwidth of GLDrawable
heightheight of GLDrawable
boundsRadiusradius of a minimal bounding sphere of objects to be rendered in the viewport
zoomFactoraffects 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
viewFovDegreesthe desired field of vision for the viewport, higher is more fish-eye
Returns
the distance the camera should be from the center of the scenes bounding sphere

Definition at line 517 of file TestSharedContextNewtAWTBug523.java.

Here is the call graph for this function:

◆ test01UseAWTNotShared()

void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test01UseAWTNotShared ( ) throws InterruptedException, InvocationTargetException

Definition at line 537 of file TestSharedContextNewtAWTBug523.java.

◆ test02UseAWTSharedContext()

void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test02UseAWTSharedContext ( ) throws InterruptedException, InvocationTargetException

Definition at line 542 of file TestSharedContextNewtAWTBug523.java.

◆ test10UseNEWTNotShared()

void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test10UseNEWTNotShared ( ) throws InterruptedException, InvocationTargetException

Definition at line 547 of file TestSharedContextNewtAWTBug523.java.

◆ test11UseNEWTSharedContext()

void com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523.test11UseNEWTSharedContext ( ) throws InterruptedException, InvocationTargetException

Definition at line 552 of file TestSharedContextNewtAWTBug523.java.

◆ testContextSharingCreateVisibleDestroy()

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.

Here is the call graph for this function:

The documentation for this class was generated from the following file: