tag:forum.jogamp.org,2006:forum-782158Nabble - jogl2024-03-28T12:15:16ZEverything related to JOGL, the Java Bindings to OpenGL - <a href="http://jogl.jogamp.org" target="_top" rel="nofollow" link="external">jogl.jogamp.org</a>tag:forum.jogamp.org,2006:post-4043442JOGL issue on Linux Asahi2024-03-28T04:30:51Z2024-03-28T04:30:51ZNicolas Roduit
I'm testing OpenGL 4.6 drivers on Apple Silicon hardware, see this <a href="https://rosenzweig.io/blog/conformant-gl46-on-the-m1.html" target="_top" rel="nofollow" link="external">post</a>.
<P>
The advantage of using Asahi in dual boot (perfectly legal) is OpenGL 4.6 vs 4.1 support on macOS. This enables the use of compute shaders.
<P>
Unfortunately, I can't get jogl linux-aarch64 to work with this profile:
<pre>28.03.2024 11:09:22.620 *INFO* [JOGL-GLWorkerThread-] org.weasis.dicom.viewer3d.View3DFactory: Video card for OpenGL: Mesa, Apple M1 (G13G B1) 4.6 (Core profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware) - 4.6 (Core Profile) Mesa 24.1.0-asahi20240228</pre>
<P>
The JVM crash:
<pre>
# JRE version: OpenJDK Runtime Environment Temurin-21.0.1+12 (21.0.1+12) (build 21.0.1+12-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (21.0.1+12-LTS, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# C [asahi_dri.so+0xbeb41c]
Current thread (0x0000ffff14621300): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=6937, stack(0x0000fffea7a00000,0x0000fffea7c00000) (2048K)]
Stack: [0x0000fffea7a00000,0x0000fffea7c00000], sp=0x0000fffea7bf95f0, free space=2021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [asahi_dri.so+0xbeb41c]
C [asahi_dri.so+0xbea800]
C [asahi_dri.so+0x1b2eb0]
C [asahi_dri.so+0x1b385c]
C [asahi_dri.so+0x187c60]
C [asahi_dri.so+0x189d54]
C [libjogl_desktop.so+0x5dc8c] Java_jogamp_opengl_gl4_GL4bcImpl_dispatch_1glTexImage2D1__IIIIIIIILjava_lang_Object_2IZJ+0xd0
j jogamp.opengl.gl4.GL4bcImpl.dispatch_glTexImage2D1(IIIIIIIILjava/lang/Object;IZJ)V+0
j jogamp.opengl.gl4.GL4bcImpl.glTexImage2D(IIIIIIIILjava/nio/Buffer;)V+122
j org.weasis.dicom.viewer3d.vr.Preset.init(Lcom/jogamp/opengl/GL4;Z)V+183
j org.weasis.dicom.viewer3d.vr.View3d.initShaders(Lcom/jogamp/opengl/GL4;)V+633
</pre>
Here is the debug test with jogamp:
<pre>
~/Downloads/jogl$ sh etc/test_dbg.sh
/usr/bin/java
openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment (Red_Hat-17.0.9.0.9-4) (build 17.0.9+9)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.9.0.9-4) (build 17.0.9+9, mixed mode)
LIBXCB_ALLOW_SLOPPY_LOCK:
LIBGL_DRIVERS_PATH:
LIBGL_DEBUG:
java
CLASSPATH: jar/gluegen-rt.jar:jar/jogl-all.jar
ELF-1: Using /proc/self/exe
ELF-1: cpuName aarch64 -> ARM64, EABI_AARCH64, machDesc LP64_UNIX(7)
ELF-1: Got ELF-1[vers 1, machine[183, ARM64, EABI_AARCH64, machDesc LP64_UNIX(7)], bits 64, enc LSB, abi[os 0, vers 0], type shared]
ELF-2: cpuName aarch64 -> ARM64, EABI_AARCH64
ELF-2: Got ELF-2[ARM64, EABI_AARCH64, flags[0x0], sh-num 33]
Platform.Elf: valid true, elfCpuName aarch64, cpuType ARM64, abiType EABI_AARCH64, elfLittleEndian 1
Platform.Endian: test-little true, elf[valid true, val 1] -> LITTLE_ENDIAN true
Platform.Property: ARCH aarch64, CpuType ARM64, ABIType EABI_AARCH64
Platform.Hard: ARCH aarch64, CPU_ARCH ARM64, ABI_TYPE EABI_AARCH64 - strategy 210(isAndroid false, elfValid true), useDynLibs true
forceES2 false
forceES3 false
forceGL3 false
forceGL4ES3 false
getJarUri Default jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/com/jogamp/common/os/Platform.class
-> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/com/jogamp/common/os/Platform.class
getJarUri res: com.jogamp.common.os.Platform -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/com/jogamp/common/os/Platform.class -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/com/jogamp/common/os/Platform.class
IOUtil.getTempRoot(): tempX1 </tmp>, used true
IOUtil.getTempRoot(): tempX3 <null>, used false
IOUtil.getTempRoot(): tempX4 </home/nicolas>, used true
IOUtil.getTempRoot(): tempX2 </home/nicolas/.cache>, used true
IOUtil.testDirExec(): test-exe </tmp/jogamp_exe_tst7926828519526091316.sh>, existingFile false, isNioExec true, returned 0
IOUtil.testDirExec(): abs-path </tmp>: res 1 -> true
IOUtil.testDirExec(): total 18ms, create 12ms, fill 0ms, execute 6ms
IOUtil.testDirImpl(tempX1): </tmp>, create true, exec true: true
IOUtil.testDirExec(): test-exe </tmp/jogamp_0000/jogamp_exe_tst1910454561651791772.sh>, existingFile false, isNioExec true, returned 0
IOUtil.testDirExec(): abs-path </tmp/jogamp_0000>: res 1 -> true
IOUtil.testDirExec(): total 1ms, create 0ms, fill 0ms, execute 1ms
IOUtil.testDirImpl(tempX1): </tmp/jogamp_0000>, create true, exec true: true
IOUtil.getTempRoot(): temp dirs: exec: /tmp/jogamp_0000, noexec: /tmp/jogamp_0000
IOUtil.testDirImpl(testDir): </tmp/jogamp_0000/file_cache>, create true, exec false: true
TempFileCache: Static Initialization ---------------------------------------------- OK: true
TempFileCache: Thread: main, CL 0x42110406, tempBaseDir /tmp/jogamp_0000/file_cache, executable true
TempFileCache: tmpFile = /tmp/jogamp_0000/file_cache/jln14305947333059389788.tmp
TempFileCache: lckFile = /tmp/jogamp_0000/file_cache/jln14305947333059389788.lck
TempFileCache: tmpRootDir = /tmp/jogamp_0000/file_cache/jln14305947333059389788
TempFileCache: Setting jnlp.jogamp.tmp.cache.root=jln14305947333059389788
------------------------------------------------------------------ OK: true
TempFileCache: new TempFileCache() --------------------- (static ok: true)
TempFileCache: *** Reaper: deleteOldTempDirs in /tmp/jogamp_0000/file_cache
TempFileCache: Thread: main, CL 0x42110406, this 0x631330c
TempFileCache: tempDir /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230 (ok: true)
----------------------------------------------------------
TempJarCache.initSingleton(): ok true, /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230, executable true
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101.tmp)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libgluegen_rt.so)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libjogl_desktop.so)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libjogl_mobile.so)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libnativewindow_awt.so)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libnativewindow_drm.so)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libnativewindow_x11.so)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libnewt_drm.so)
TempFileCache: removeAll(/tmp/jogamp_0000/file_cache/jln17132585225716752772/jln11441683556972563101/natives/linux-aarch64/libnewt_head.so)
JNILibLoaderBase: addNativeJarLibs(
classesFromJavaJars = [class jogamp.common.Debug]
singleJarMarker = null
)
getJarUri Default jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/jogamp/common/Debug.class
-> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/jogamp/common/Debug.class
getJarUri res: jogamp.common.Debug -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/jogamp/common/Debug.class -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/jogamp/common/Debug.class
getJarName res: gluegen-rt.jar
JNILibLoaderBase: jarBasename: gluegen-rt
JNILibLoaderBase: addNativeJarLibsImpl(
classFromJavaJar = class jogamp.common.Debug
classJarURI = jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar!/jogamp/common/Debug.class
jarBasename = gluegen-rt.jar
os.and.arch = linux-aarch64
nativeJarBasename = gluegen-rt-natives-linux-aarch64.jar
)
JNILibLoaderBase: addNativeJarLibsImpl: initial: file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt.jar -> file:/home/nicolas/Downloads/jogamp-all-platforms/jar/
JNILibLoaderBase: addNativeJarLibsImpl: nativeLibraryPath: natives/linux-aarch64/
JNILibLoaderBase: addNativeJarLibsImpl: module: gluegen-rt-natives-linux-aarch64.jar -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar!/
getJarFile.0: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar!/
getJarFile.1: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar!/
getJarFile res: /home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar
TempJarCache: addNativeLibs: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar!/: nativeJar /home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar (NEW)
TempJarCache: validateCertificates: OK - No rootCerts in given class jogamp.common.Debug, nativeJar /home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar
JarUtil: extract: /home/nicolas/Downloads/jogamp-all-platforms/jar/gluegen-rt-natives-linux-aarch64.jar -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230, extractNativeLibraries true (natives/linux-aarch64/), extractClassFiles false, extractOtherFiles false
JarUtil: JarEntry : META-INF/MANIFEST.MF other-file skipped
JarUtil: JarEntry : jogamp/nativetag/common/linux/aarch64/TAG.class class-file skipped
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: MKDIR (parent): natives/linux-aarch64/libgluegen_rt.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64
JarUtil: EXTRACT[1]: [gluegen_rt -> ] natives/linux-aarch64/libgluegen_rt.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libgluegen_rt.so: 13688 bytes, addedAsNativeLib: true
JNILibLoaderBase: addNativeJarLibsImpl.X: gluegen-rt.jar / gluegen-rt-natives-linux-aarch64.jar -> ok: true; duration: now 1 ms, total 1 ms (count 1, avrg 1.000 ms)
JNILibLoaderBase: addNativeJarLibsWhenInitialized: count 1, ok true
NativeLibrary.findLibrary(<gluegen_rt>) (TempJarCache): /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libgluegen_rt.so
JNILibLoaderBase: loadLibraryInternal(gluegen_rt), TempJarCache: /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libgluegen_rt.so
JNILibLoaderBase: System.load(/tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libgluegen_rt.so) - mode 2
JNILibLoaderBase: loadLibraryInternal(gluegen_rt): OK - mode 2
JNILibLoaderBase: Loaded Native Library: gluegen_rt
JNILibLoaderBase: loaded gluegen_rt
java.lang.Exception: JVMUtil.initSingleton() .. initialized main
at jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:62)
at com.jogamp.common.os.Platform$1.run(Platform.java:324)
at com.jogamp.common.util.SecurityUtil.doPrivileged(SecurityUtil.java:80)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
at com.jogamp.common.util.VersionUtil.getPlatformInfo(VersionUtil.java:57)
at com.jogamp.common.util.VersionUtil.getPlatformInfo(VersionUtil.java:99)
at com.jogamp.newt.opengl.GLWindow.main(GLWindow.java:1102)
MachineDataInfoRuntime.initialize():
Static MachineDataInfoStatic: LP64_UNIX(7): MachineDataInfo: runtimeValidated false, 32Bit false, primitive size / alignment:
int8 1 / 1, int16 2 / 2
int 4 / 4, long 8 / 8
int32 4 / 4, int64 8 / 8
float 4 / 4, double 8 / 8, ldouble 16 / 16
pointer 8 / 8, page 4096
Runtime MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment:
int8 1 / 1, int16 2 / 2
int 4 / 4, long 8 / 8
int32 4 / 4, int64 8 / 8
float 4 / 4, double 8 / 8, ldouble 16 / 16
pointer 8 / 8, page 16384
-----------------------------------------------------------------------------------------------------
Platform: LINUX / Linux 6.6.3-414.asahi.fc39.aarch64+16k (6.6.3), aarch64 (ARM64, EABI_AARCH64), 8 cores, littleEndian true
MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment:
int8 1 / 1, int16 2 / 2
int 4 / 4, long 8 / 8
int32 4 / 4, int64 8 / 8
float 4 / 4, double 8 / 8, ldouble 16 / 16
pointer 8 / 8, page 16384
Platform: Java Version: 17.0.9 (17.0.9u0), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment
Platform: Java Vendor: Red Hat, Inc., https://www.redhat.com/, Java17, dynamicLib: true, AWT enabled: true
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.common
Extension Name: com.jogamp.common
Specification Title: GlueGen Java Bindings Generator
Specification Vendor: JogAmp Community
Specification Version: 2.5
Implementation Title: GlueGen Run-Time
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.5.0
Implementation Build: 2.5-b967-20230818
Implementation Branch: origin/master
Implementation Commit: a235ae5dae463afa16f62f48bf62f896efa80b68
Implementation SHA Sources: 784913ee2d456eede9cfaf94e1182ff484f24107548dee8655d7207b858936ea
Implementation SHA Classes: 2ccd03d934cccce4f0bcc44aa3dc5c1999382abe812245c6bfbc5c1f8467d56f
Implementation SHA Classes-this: eceeebdce7de6d72726a1dd2b74d9716c6048db47a3ac197bf9ab88f09e9186c
Implementation SHA Natives: eb1fad0f383f4b918219d2c856f5ca10474433692e7d6f79920989a74d3cc64b
Implementation SHA Natives-this: 0
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.opengl
Extension Name: com.jogamp.opengl
Specification Title: Java Bindings for OpenGL API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.5
Implementation Title: Java Bindings for OpenGL Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.5.0
Implementation Build: 2.5-b1533-20230818
Implementation Branch: origin/master
Implementation Commit: 70f62ca5d121e5e71548246d468b5e7baa5faf25
Implementation SHA Sources: null
Implementation SHA Classes: null
Implementation SHA Classes-this: null
Implementation SHA Natives: null
Implementation SHA Natives-this: null
-----------------------------------------------------------------------------------------------------
GLProfile.initSingleton() - thread main
[2]: com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:213)
[3]: com.jogamp.opengl.GLProfile.getDefaultDevice(GLProfile.java:2113)
[4]: com.jogamp.opengl.JoglVersion.getDefaultOpenGLInfo(JoglVersion.java:122)
[5]: com.jogamp.newt.opengl.GLWindow.main(GLWindow.java:1106)
JNILibLoaderBase: addNativeJarLibs(
classesFromJavaJars = [class jogamp.nativewindow.Debug, class jogamp.opengl.Debug, class jogamp.newt.Debug]
singleJarMarker = -all
)
getJarUri Default jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/nativewindow/Debug.class
-> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/nativewindow/Debug.class
getJarUri res: jogamp.nativewindow.Debug -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/nativewindow/Debug.class -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/nativewindow/Debug.class
getJarName res: jogl-all.jar
JNILibLoaderBase: jarBasename: jogl-all
JNILibLoaderBase: addNativeJarLibsImpl(
classFromJavaJar = class jogamp.nativewindow.Debug
classJarURI = jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/nativewindow/Debug.class
jarBasename = jogl-all.jar
os.and.arch = linux-aarch64
nativeJarBasename = jogl-all-natives-linux-aarch64.jar
)
JNILibLoaderBase: addNativeJarLibsImpl: initial: file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar -> file:/home/nicolas/Downloads/jogamp-all-platforms/jar/
JNILibLoaderBase: addNativeJarLibsImpl: nativeLibraryPath: natives/linux-aarch64/
JNILibLoaderBase: addNativeJarLibsImpl: module: jogl-all-natives-linux-aarch64.jar -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/
getJarFile.0: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/
getJarFile.1: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/
getJarFile res: /home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar
TempJarCache: addNativeLibs: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/: nativeJar /home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar (NEW)
TempJarCache: validateCertificates: OK - No rootCerts in given class jogamp.nativewindow.Debug, nativeJar /home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar
JarUtil: extract: /home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230, extractNativeLibraries true (natives/linux-aarch64/), extractClassFiles false, extractOtherFiles false
JarUtil: JarEntry : META-INF/MANIFEST.MF other-file skipped
JarUtil: JarEntry : jogamp/nativetag/opengl/linux/aarch64/TAG.class class-file skipped
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: EXTRACT[1]: [jogl_desktop -> ] natives/linux-aarch64/libjogl_desktop.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libjogl_desktop.so: 796552 bytes, addedAsNativeLib: true
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: EXTRACT[2]: [jogl_mobile -> ] natives/linux-aarch64/libjogl_mobile.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libjogl_mobile.so: 382824 bytes, addedAsNativeLib: true
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: EXTRACT[3]: [nativewindow_awt -> ] natives/linux-aarch64/libnativewindow_awt.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libnativewindow_awt.so: 9376 bytes, addedAsNativeLib: true
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: EXTRACT[4]: [nativewindow_drm -> ] natives/linux-aarch64/libnativewindow_drm.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libnativewindow_drm.so: 38872 bytes, addedAsNativeLib: true
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: EXTRACT[5]: [nativewindow_x11 -> ] natives/linux-aarch64/libnativewindow_x11.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libnativewindow_x11.so: 30664 bytes, addedAsNativeLib: true
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: EXTRACT[6]: [newt_drm -> ] natives/linux-aarch64/libnewt_drm.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libnewt_drm.so: 22368 bytes, addedAsNativeLib: true
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: EXTRACT[7]: [newt_head -> ] natives/linux-aarch64/libnewt_head.so -> /tmp/jogamp_0000/file_cache/jln14305947333059389788/jln4881654207644424230/natives/linux-aarch64/libnewt_head.so: 84576 bytes, addedAsNativeLib: true
JNILibLoaderBase: addNativeJarLibsImpl.X: jogl-all.jar / jogl-all-natives-linux-aarch64.jar -> ok: true; duration: now 4 ms, total 5 ms (count 2, avrg 2.500 ms)
JNILibLoaderBase: addNativeJarLibs0: done: jogl-all
getJarUri Default jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/opengl/Debug.class
-> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/opengl/Debug.class
getJarUri res: jogamp.opengl.Debug -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/opengl/Debug.class -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/opengl/Debug.class
getJarName res: jogl-all.jar
JNILibLoaderBase: jarBasename: jogl-all
JNILibLoaderBase: addNativeJarLibsImpl(
classFromJavaJar = class jogamp.opengl.Debug
classJarURI = jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/opengl/Debug.class
jarBasename = jogl-all.jar
os.and.arch = linux-aarch64
nativeJarBasename = jogl-all-natives-linux-aarch64.jar
)
JNILibLoaderBase: addNativeJarLibsImpl: initial: file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar -> file:/home/nicolas/Downloads/jogamp-all-platforms/jar/
JNILibLoaderBase: addNativeJarLibsImpl: nativeLibraryPath: natives/linux-aarch64/
JNILibLoaderBase: addNativeJarLibsImpl: module: jogl-all-natives-linux-aarch64.jar -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/
TempJarCache: addNativeLibs: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/: nativeJar jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/ (REUSE)
JNILibLoaderBase: addNativeJarLibsImpl.X: jogl-all.jar / jogl-all-natives-linux-aarch64.jar -> ok: true; duration: now 0 ms, total 5 ms (count 3, avrg 1.667 ms)
JNILibLoaderBase: addNativeJarLibs0: done: jogl-all
getJarUri Default jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/newt/Debug.class
-> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/newt/Debug.class
getJarUri res: jogamp.newt.Debug -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/newt/Debug.class -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/newt/Debug.class
getJarName res: jogl-all.jar
JNILibLoaderBase: jarBasename: jogl-all
JNILibLoaderBase: addNativeJarLibsImpl(
classFromJavaJar = class jogamp.newt.Debug
classJarURI = jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar!/jogamp/newt/Debug.class
jarBasename = jogl-all.jar
os.and.arch = linux-aarch64
nativeJarBasename = jogl-all-natives-linux-aarch64.jar
)
JNILibLoaderBase: addNativeJarLibsImpl: initial: file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all.jar -> file:/home/nicolas/Downloads/jogamp-all-platforms/jar/
JNILibLoaderBase: addNativeJarLibsImpl: nativeLibraryPath: natives/linux-aarch64/
JNILibLoaderBase: addNativeJarLibsImpl: module: jogl-all-natives-linux-aarch64.jar -> jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/
TempJarCache: addNativeLibs: jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/: nativeJar jar:file:/home/nicolas/Downloads/jogamp-all-platforms/jar/jogl-all-natives-linux-aarch64.jar!/ (REUSE)
JNILibLoaderBase: addNativeJarLibsImpl.X: jogl-all.jar / jogl-all-natives-linux-aarch64.jar -> ok: true; duration: now 0 ms, total 5 ms (count 4, avrg 1.250 ms)
JNILibLoaderBase: addNativeJarLibs0: done: jogl-all
JNILibLoaderBase: addNativeJarLibsWhenInitialized: count 3, ok true
guessX: <:0> isSet true
guessWayland: <wayland-0> isSet true
guessGBM: </dev/dri/card0> exists true
guessVCIVUsed: hasVCLib = false && !hasVC4ModLocation = !false && !hasDriCard0File = !true
main - Info: NativeWindowFactory.<init>: Type .x11 custom / .x11 native
main - NativeWindowFactory.initSingleton()
JAWTUtil initialization (JAWT/JNI/...); SKIP_AWT_HIDPI false
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.aarch64/lib/libawt_xawt.so
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2403)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1989)
at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1392)
at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1390)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1389)
at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1427)
at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1401)
at jogamp.nativewindow.jawt.JAWTJNILibLoader$1.run(JAWTJNILibLoader.java:58)
at com.jogamp.common.util.SecurityUtil.doPrivileged(SecurityUtil.java:80)
at jogamp.nativewindow.jawt.JAWTJNILibLoader.<clinit>(JAWTJNILibLoader.java:52)
at jogamp.nativewindow.jawt.JAWTUtil.<clinit>(JAWTUtil.java:350)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.jogamp.nativewindow.NativeWindowFactory$2.run(NativeWindowFactory.java:392)
at com.jogamp.nativewindow.NativeWindowFactory$2.run(NativeWindowFactory.java:388)
at com.jogamp.common.util.SecurityUtil.doPrivileged(SecurityUtil.java:80)
at com.jogamp.nativewindow.NativeWindowFactory.initSingleton(NativeWindowFactory.java:388)
at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1787)
at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:77)
at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:236)
at com.jogamp.common.util.SecurityUtil.doPrivileged(SecurityUtil.java:80)
at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:222)
at com.jogamp.opengl.GLProfile.getDefaultDevice(GLProfile.java:2113)
at com.jogamp.opengl.JoglVersion.getDefaultOpenGLInfo(JoglVersion.java:122)
at com.jogamp.newt.opengl.GLWindow.main(GLWindow.java:1106)
NativeWindowFactory.shutdown() START: JVM Shutdown true, on thread NativeWindowFactory_ShutdownHook
NativeWindowFactory.shutdown(): Post customShutdownHook
NativeWindowFactory_ShutdownHook - Info: GraphicsConfigurationFactory.<init>
NativeWindowFactory_ShutdownHook - NativeWindowFactory.shutdown() END JVM Shutdown true
</pre>
tag:forum.jogamp.org,2006:post-4043441Is it allowed to call glDrawArray inside init method?2024-03-26T07:50:14Z2024-03-26T07:50:14ZHamudHaa
I found a strange phenomenon that sometime display method is called twice . Then I started to consider if it is possible to drawArray inside init method . Because I'm working on a ray tracer but I only need it to be called once . Multiple calls are meaningless and I want to avoid it .
<br/>I have tried to call glDrawArray inside init method , and the result is blackness . However if I move glDrawArray to inside display method then everything is okay .
<br/>I think after init method is over and before the beginning of display method , reshape method is called . So I added a line to set glViewport before the calling of glDrawArray , but the result is the same blackness .
<br/>So I guess it is probably not permitted to draw primitives inside init method , tho I don't know why .
tag:forum.jogamp.org,2006:post-4043439Problem running OpenGL application in Eclipse using JOGL2024-03-25T18:48:14Z2024-03-25T18:48:14ZStrider
I am having difficulty running an OpenGL application in Eclipse using JOGL (Java OpenGL). I have carefully followed the setup instructions and verified that my code is correctly implemented. However, when running the application, the window appears blank and only briefly shows the rendered content before disappearing.
<br/><br/>I've checked my configuration in Eclipse and it appears to be set correctly. Additionally, I have tested the same application on my college lab computers and it works fine, which makes me think the problem could be related to my personal configuration or hardware.
<br/><br/>My computer has an AMD Ryzen 5 3400G processor.
<br/><br/>I am attaching the code I am using below:
<br/><br/>import javax.swing.JFrame;
<br/><br/>import com.jogamp.opengl.GL2;
<br/>import com.jogamp.opengl.GLAutoDrawable;
<br/>import com.jogamp.opengl.GLCapabilities;
<br/>import com.jogamp.opengl.GLEventListener;
<br/>import com.jogamp.opengl.GLProfile;
<br/>import com.jogamp.opengl.awt.GLCanvas;
<br/><br/><br/>public class Principal extends JFrame implements GLEventListener{
<br/> private static final long serialVersionUID = 1L;
<br/><br/> public static void main(String[] args) {
<br/> // TODO Auto-generated method stub
<br/> Principal ren= new Principal();
<br/> }
<br/> public Principal() {
<br/> super("Programación Gráfica - OpenGL");
<br/> this.setSize(640,480);
<br/> this.setLocationRelativeTo(null);
<br/> this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
<br/> this.setResizable(false);
<br/>
<br/> GLProfile profile = GLProfile.get(GLProfile.GL2);
<br/> GLCapabilities caps = new GLCapabilities(profile);
<br/> GLCanvas canvas = new GLCanvas(caps);
<br/> canvas.addGLEventListener(this);
<br/> this.add(canvas);
<br/> this.setVisible(true);
<br/> canvas.requestFocusInWindow();
<br/> }
<br/><br/> @Override
<br/> public void display(GLAutoDrawable drawable) {
<br/> // TODO Auto-generated method stub
<br/> GL2 gl = drawable.getGL().getGL2();
<br/> gl.glClearColor(0.0f, 0.0f, 1.0f, 0.0f);
<br/> gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT);
<br/> gl.glFlush();
<br/> }
<br/><br/> @Override
<br/> public void dispose(GLAutoDrawable drawable) {
<br/> // TODO Auto-generated method stub
<br/> }
<br/><br/> @Override
<br/> public void init(GLAutoDrawable drawable) {
<br/> // TODO Auto-generated method stub
<br/> GL2 gl = drawable.getGL().getGL2();
<br/> gl.glClearColor(0.392f, 0.584f, 0.929f, 1.0f);
<br/> }
<br/><br/> @Override
<br/> public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4) {
<br/> // TODO Auto-generated method stub
<br/> }
<br/>
<br/>}
<br/><br/>I would greatly appreciate any help or suggestions on how to fix this issue. Are there any specific settings I should check on my computer with an AMD processor? Has anyone else experienced a similar problem when trying to run OpenGL applications on AMD hardware?
<br/><br/>Thank you in advance for your help!
tag:forum.jogamp.org,2006:post-4042444Unable to determine GraphicsConfiguration2023-04-12T14:46:00Z2023-04-12T14:46:00ZDeCiBelZerg
I've done a lot of googling and I've seen this has been posted a ton, but following each thread and trying each workaround/fix that's been listed hasn't really worked for me.
<br/><br/>This is my first post and I'm not sure if I'm breaking any community guidelines by posting this, so please bear with me.
<br/><br/>Right now I'm trying to run an old program that *was* working, but upon revisiting it has somehow magically decided not to work anymore.
<br/><br/>My <b>system</b> is:
<br/>Processor: Intel i7-8700 3.20GHz
<br/>RAM: 32.0GB
<br/>Edition: Windows 10 Home (V. 22H2)
<br/>Graphics Card: NVIDIA GeForce GTX 1060 3GB
<br/><br/>My <b>PATH</b> is:
<br/>C:\Program Files\Zulu\zulu-11\bin\
<br/>C:\Program Files\Zulu\zulu-18\bin\
<br/>C:\Program Files (x86)\Razer Chroma SDK\bin
<br/>C:\Program Files\Razer Chroma SDK\bin
<br/>C:\Program Files (x86)\Razer\ChromaBroadcast\bin
<br/>C:\Program Files\Razer\ChromaBroadcast\bin
<br/>C:\Program Files\Common Files\Oracle\Java\javapath
<br/>C:\Windows\system32
<br/>C:\Windows
<br/>C:\Windows\System32\Wbem
<br/>C:\Windows\System32\WindowsPowerShell\v1.0\
<br/>C:\Windows\System32\OpenSSH\
<br/>C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
<br/>C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
<br/>D:\Git\cmd
<br/><br/>My <b>IDE</b> is:
<br/>VS Code (using RedHat for Java)
<br/>Java Version: C:\Program Files\Zulu\zulu-18
<br/>launch.json:
<br/>{
<br/> // Use IntelliSense to learn about possible attributes.
<br/> // Hover to view descriptions of existing attributes.
<br/> // For more information, visit: <a href="https://go.microsoft.com/fwlink/?linkid=830387" target="_top" rel="nofollow" link="external">https://go.microsoft.com/fwlink/?linkid=830387</a><br/> "version": "0.2.0",
<br/> "configurations": [
<br/> {
<br/> "type": "java",
<br/> "name": "Code",
<br/> "request": "launch",
<br/> "mainClass": "a2.Code",
<br/> "projectName": "Assignment 2_a05f56dc"
<br/> },
<br/> {
<br/> "type": "java",
<br/> "name": "Code",
<br/> "request": "launch",
<br/> "mainClass": "a2.Code",
<br/> "projectName": "Assignment 2_4d0a9515"
<br/> },
<br/> {
<br/> "type": "java",
<br/> "name": "Current File",
<br/> "request": "launch",
<br/> "mainClass": "${file}"
<br/> },
<br/> {
<br/> "type": "java",
<br/> "name": "Code",
<br/> "request": "launch",
<br/> "mainClass": "a2.Code",
<br/> "projectName": "Assignment 2_5fced8d",
<br/> "args": "-Dsun.java2d.d3d=false -Dsun.java2d.uiScale=1"
<br/> }
<br/> ]
<br/>
<br/>}
<br/><br/><br/>My <b>File structure</b> is:
<br/>...hard to type out, so let me get back to you on this.
<br/><br/><br/>My <b>Error</b> is:
<br/>Exception in thread "main" com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x7acd9cd4]], idx 0], pfdID 9, ARB-Choosen true,
<br/> requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
<br/> chosen GLCaps[wgl vid 9 arb: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]]
<br/> at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:182)
<br/> at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
<br/> at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513)
<br/> at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609)
<br/> at java.desktop/java.awt.Container.addNotify(Container.java:2804)
<br/> at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846)
<br/> at java.desktop/java.awt.Container.addNotify(Container.java:2804)
<br/> at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846)
<br/> at java.desktop/java.awt.Container.addNotify(Container.java:2804)
<br/> at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846)
<br/> at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:721)
<br/> at java.desktop/java.awt.Container.addNotify(Container.java:2804)
<br/> at java.desktop/java.awt.Window.addNotify(Window.java:791)
<br/> at java.desktop/java.awt.Frame.addNotify(Frame.java:495)
<br/> at java.desktop/java.awt.Window.show(Window.java:1053)
<br/> at java.desktop/java.awt.Component.show(Component.java:1729)
<br/> at java.desktop/java.awt.Component.setVisible(Component.java:1676)
<br/> at java.desktop/java.awt.Window.setVisible(Window.java:1036)
<br/> at a2.Code.<init>(Code.java:144)
<br/> at a2.Code.main(Code.java:1008)
<br/><br/>
tag:forum.jogamp.org,2006:post-4043384drawable render issue2024-03-09T23:46:25Z2024-03-09T23:46:25ZroeeNavon
i am trying to render images and text to screen, all configured to be at 0,0 but this is the results
<br/><img src="https://forum.jogamp.org/file/n4043384/%E2%80%8F%E2%80%8F%D7%9C%D7%9B%D7%99%D7%93%D7%94.png" border="0"/><br/>and this is my code:
<br/>public class Main implements GLEventListener {
<br/> private TextRenderer textRenderer;
<br/> private static final int WIN_WIDTH = 600;
<br/> private static final int WIN_HEIGHT = 400;
<br/><br/> public static void main(String[] args) {
<br/> JFrame frame = new JFrame("JOGL Application");
<br/> GLProfile profile = GLProfile.getDefault();
<br/> GLCapabilities capabilities = new GLCapabilities(profile);
<br/> GLCanvas canvas = new GLCanvas(capabilities);
<br/><br/> Main mainInstance = new Main();
<br/> canvas.addGLEventListener(mainInstance);
<br/><br/> frame.getContentPane().add(canvas);
<br/> frame.setSize(WIN_WIDTH, WIN_HEIGHT);
<br/> frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
<br/> frame.setVisible(true);
<br/> }
<br/><br/> @Override
<br/> public void init(GLAutoDrawable drawable) {
<br/> textRenderer = new TextRenderer(new java.awt.Font("Arial", java.awt.Font.BOLD, 12));
<br/> textRenderer.setColor(1.0f, 1.0f, 1.0f, 1.0f); // White color
<br/> }
<br/><br/> @Override
<br/> public void display(GLAutoDrawable drawable) {
<br/> GL2 gl = drawable.getGL().getGL2();
<br/>
<br/> // Clear the color buffer with a black background
<br/> gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
<br/> gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
<br/>
<br/> // Enable blending for transparency
<br/> gl.glEnable(GL2.GL_BLEND);
<br/> gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);
<br/>
<br/> // Set up the orthographic projection matrix
<br/> gl.glMatrixMode(GL2.GL_PROJECTION);
<br/> gl.glLoadIdentity();
<br/> gl.glOrtho(0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), 0, -1, 1);
<br/>
<br/> // Switch back to the modelview matrix
<br/> gl.glMatrixMode(GL2.GL_MODELVIEW);
<br/> gl.glLoadIdentity();
<br/>
<br/> // Render the sprite using SpriteRenderer.renderSprite method
<br/> SpriteRenderer.renderSprite(Assets.image, gl, drawable, 0, 0, 64, 64);
<br/> }
<br/><br/> @Override
<br/> public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
<br/> // Unused
<br/> }
<br/><br/> @Override
<br/> public void dispose(GLAutoDrawable drawable) {
<br/> // Unused
<br/> }
<br/>}
<br/><br/>it worked once, but then i upgraded my jogl version and this bug started
tag:forum.jogamp.org,2006:post-4043236Bug after Touch2024-01-02T12:03:10Z2024-01-02T17:18:41ZAndre
iBug?
<br/><br/>Hello. jogl 2.5.0 and java 12. win11, surface pro.
<br/><br/>once i an while if i pinch, like zooming in with PointerType.Touch (important: use 2 fingers), the mouseMoved does not return and instead mouseDragged stays stuck when going back to PointerType.Mouse and fires constantly instead of mouseMoved.
<br/><br/>Can anyone help?
<br/><br/><br/>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<br/><br/>import java.awt.Dimension;
<br/><br/>import javax.swing.JFrame;
<br/><br/>import com.jogamp.newt.awt.NewtCanvasAWT;
<br/>import com.jogamp.newt.event.MouseAdapter;
<br/>import com.jogamp.newt.event.MouseEvent;
<br/>import com.jogamp.newt.opengl.GLWindow;
<br/>import com.jogamp.opengl.GLCapabilities;
<br/>import com.jogamp.opengl.GLProfile;
<br/>import com.jogamp.opengl.util.FPSAnimator;
<br/><br/>public class Test {
<br/><br/> public static void main(String[] args) {
<br/> new Test();
<br/> }
<br/><br/> private GLWindow glWindow;
<br/> private NewtCanvasAWT newtCanvasAWT;
<br/> private JFrame jFrame;
<br/><br/> public Test() {
<br/> this.jFrame = new JFrame();
<br/> this.jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
<br/> this.jFrame.setMinimumSize(new Dimension(640, 480));
<br/> GLProfile profile = GLProfile.getDefault();
<br/> GLCapabilities glCapabilities = new GLCapabilities(profile);
<br/> this.glWindow = GLWindow.create(glCapabilities);
<br/> this.glWindow.addMouseListener(new MouseAdapter() {
<br/> @Override
<br/> public void mouseMoved(final MouseEvent e) {
<br/> System.out.println("move " + System.currentTimeMillis());
<br/> }
<br/> @Override
<br/> public void mouseDragged(final MouseEvent e) {
<br/> System.out.println("drag " + System.currentTimeMillis());
<br/> }
<br/> });
<br/> FPSAnimator a = new FPSAnimator(this.glWindow, 60, true);
<br/> this.newtCanvasAWT = new NewtCanvasAWT(this.glWindow);
<br/> this.jFrame.add(this.newtCanvasAWT);
<br/> this.jFrame.setVisible(true);
<br/> }
<br/>}
<br/><br/><br/><img src="https://forum.jogamp.org/file/n4043236/Screenshot_2024-01-02_200548.png" border="0"/><br/><br/><br/><br/>Happens like this too.
<br/><br/>import com.jogamp.newt.event.MouseAdapter;
<br/>import com.jogamp.newt.event.MouseEvent;
<br/>import com.jogamp.newt.opengl.GLWindow;
<br/>import com.jogamp.opengl.GLCapabilities;
<br/>import com.jogamp.opengl.GLProfile;
<br/>import com.jogamp.opengl.util.FPSAnimator;
<br/><br/>public class Test {
<br/><br/> public static void main(String[] args) {
<br/> new Test();
<br/> }
<br/><br/> private GLWindow glWindow;
<br/><br/> public Test() {
<br/> GLProfile profile = GLProfile.getDefault();
<br/> GLCapabilities glCapabilities = new GLCapabilities(profile);
<br/> this.glWindow = GLWindow.create(glCapabilities);
<br/> this.glWindow.setSize(640, 480);
<br/> this.glWindow.addMouseListener(new MouseAdapter() {
<br/> @Override
<br/> public void mousePressed(final MouseEvent e) {
<br/> System.out.print("Pressed " + System.currentTimeMillis());
<br/> System.out.print(" " + e.getPointerType(0) + " " + e.getPointerCount());
<br/> System.out.println();
<br/> }
<br/><br/> @Override
<br/> public void mouseMoved(final MouseEvent e) {
<br/> System.out.print("Moved " + System.currentTimeMillis());
<br/> System.out.print(" " + e.getPointerType(0) + " " + e.getPointerCount());
<br/> System.out.println();
<br/> }
<br/><br/> @Override
<br/> public void mouseDragged(final MouseEvent e) {
<br/> System.out.print("Dragged " + System.currentTimeMillis());
<br/> System.out.print(" " + e.getPointerType(0) + " " + e.getPointerCount());
<br/> System.out.println();
<br/> }
<br/><br/> @Override
<br/> public void mouseReleased(final MouseEvent e) {
<br/> System.out.print("Released " + System.currentTimeMillis());
<br/> System.out.print(" " + e.getPointerType(0) + " " + e.getPointerCount());
<br/> System.out.println();
<br/> }
<br/> });
<br/> FPSAnimator a = new FPSAnimator(this.glWindow, 60, true);
<br/> a.start();
<br/> this.glWindow.setVisible(true);
<br/> }
<br/>}
<br/><br/><br/>if its ending on touch released the mouse somehow looses focus while touch still works.
<br/>So when moving the mouse gives no response. looks like "lost focus" but requestFocus() does not bring it back. see:
<br/><br/><img src="https://forum.jogamp.org/file/n4043236/Screenshot_2024-01-02_205019.png" border="0"/><br/><br/>But if the chain of events ends with Mouse move it still works. i still wonder why mouse move shows up after touchrelease happens, But it works normally like this. See:
<br/><br/><img src="https://forum.jogamp.org/file/n4043236/Screenshot_2024-01-02_205412.png" border="0"/><br/><br/><br/>touching with 1 finger sometimes brings the responsiveness back.
<br/><br/>i tried an earlier version. .... And 2.4.0 does the same here.
<br/><br/>Jikes. i need that transition between Pointertype.Touch and. Mouse.
<br/><br/>Since imouseMoved and mouseDragged are nearly the same event, i can quick fix it with checking if pressed and released is fired before and after drag by adding a Boolean.
<div class="signature weak-color">
I am a Robot
</div>
tag:forum.jogamp.org,2006:post-4043329Placing a NewtCanvasJFX within other JavaFX layout elements2024-02-26T15:10:34Z2024-02-26T15:10:34Zleeca
The NewtCanvasJFX canvas all seem to want to render from the origin the underlying window region. It does not seem to respect placements with a y-offset. (I suspect x-offsets are also a problem, but that does not affect my use case.)
<br/><br/>When a NewtCanvasJFX is placed as the only child of a Group, the OGL render appears correctly in the screen space.
<br/><br/>If the NewtCanvasJFX is a second or third child of a VBOX, the canvas appears to ignore the offset. It renders from the origin (0, 0) of the underlying region (e.g. Stage). This over-writes the top elements in the VBox, and leaves a large gap between the bottom of the canvas and bottom element of the VBox.
<br/><br/>The code to implement this is based on JavaFx et JOGL (<a href="https://gouessej.wordpress.com/2020/04/05/javafx-et-jogl-fonctionnent-ensemble-javafx-and-jogl-work-together/" target="_top" rel="nofollow" link="external">https://gouessej.wordpress.com/2020/04/05/javafx-et-jogl-fonctionnent-ensemble-javafx-and-jogl-work-together/</a>). This demo refactors that example for Gradle and Java 17 modules in git repository (<a href="https://github.com/leeca/JavaFx_JOGL" target="_top" rel="nofollow" link="external">https://github.com/leeca/JavaFx_JOGL</a>). Branch [vbox-canvas] provides the variations for the demo code.
<br/><br/>The code in block 1 sets up a simple VBox with three components in a vertical stack. Running this example produces the output in image 1.
<br/><br/><code><br/> @Override
<br/> public void start(Stage stage) {
<br/> Platform.setImplicitExit(true);
<br/> final Group group = new Group();
<br/> Scene scene = new Scene(group, 800, 600);
<br/> stage.setScene(scene);
<br/> stage.show();
<br/><br/> jogl = new JoglModule();
<br/> group.getChildren().add(asVBox());
<br/> jogl.demoDisplay();
<br/> jogl.start();
<br/> }
<br/><br/> private Node asVBox() {
<br/> VBox result = new VBox();
<br/> result.getChildren().add(new Label("Top"));
<br/> result.getChildren().add(new Label("Middle"));
<br/> Canvas canvas = jogl.prepareCanvas();
<br/> // result.getChildren().add(canvas);
<br/> result.getChildren().add(new Label("Bottom"));
<br/> return result;
<br/> }
<br/></code><br/><br/><img src="https://forum.jogamp.org/file/n4043329/VBox_with_3_Labels.png" border="0" alt="VBox with 3 Labels"/><br/><br/><br/>If we uncomment the addition of the canvas in asVbox(), the rendering is completely different. The Top and Middle elements of the VBox are being overwritten with the JOGL output, and the gap between the canvas frame and the Bottom element is larger than expected. That gap is comparable to the ignored offset from the Top and Middle elements.
<br/><br/><img src="https://forum.jogamp.org/file/n4043329/VBox_with_JOGL_canvas.png" border="0" alt="VBox with NewtCanvasJFX"/><br/><br/>I suspect the NEWT window is ignoring the offsets, and places itself at the origin of the “primary” window’s client space. For this example, that happens to be a Scene.
<br/><br/>In another use case, the NEWT window is placed in a Tabbed client area. But other layout placement (e.g. BorderPane) within the tabbed window’s client area is ignored. Even directly setting the layout Y in a custom wrapper Pane fails to modify the placement of the JOGL canvas. But those are more complex examples.
<br/><br/>Is there a kind of JOGL container that has hard-offsets that make a better wrapper for the NewtCanvasJFX?
<br/>
tag:forum.jogamp.org,2006:post-4043328Error information output by Console is not complete2024-02-26T09:39:11Z2024-02-26T09:39:11ZHamudHaa
It shows me
<br/><i>Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught BufferOverflowException: null on thread AWT-EventQueue-0
<br/> at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
<br/> at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
<br/> at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
<br/> at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1441)
<br/> at com.jogamp.opengl.Threading.invoke(Threading.java:223)
<br/> at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:500)
<br/> at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:554)
<br/> at java.desktop/sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
<br/> at java.desktop/sun.awt.RepaintArea.paint(RepaintArea.java:240)
<br/> at java.desktop/sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:371)
<br/> at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5062)
<br/> at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
<br/> at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
<br/> at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
<br/> at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
<br/> at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
<br/> at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
<br/> at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
<br/> at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
<br/> at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
<br/> at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
<br/> at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
<br/> at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
<br/> at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
<br/> at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
<br/> at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
<br/> at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
<br/> at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
<br/> at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
<br/>Caused by: java.nio.BufferOverflowException
<br/> at java.base/java.nio.Buffer.nextPutIndex(Buffer.java:722)
<br/> at java.base/java.nio.HeapIntBuffer.put(HeapIntBuffer.java:209)
<br/> at jogl3.Trace.RayTraceProgram.CreateGeo(RayTraceProgram.java:96)
<br/> at jogl3.Trace.TraceListener.init(TraceListener.java:29)
<br/> at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
<br/> at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
<br/> at com.jogamp.opengl.awt.GLCanvas$9.run(GLCanvas.java:1410)
<br/> at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
<br/> ... 27 more</i><br/>Which is hard to trace which line is bugged .
<br/>How can I get rid of '27 more' and expand the full trace list ?
<br/>Thanks for your helps
tag:forum.jogamp.org,2006:post-4043313macOS Apple Silicon bug - [libGLImage.dylib+0x1de2c] storeVecColor_RGBA_UI+0x402024-02-12T13:50:59Z2024-02-12T13:50:59ZMabula
Hi support,
<br/><br/>I want to report a serious issue with JOGL on macOS Apple Silicon using JOGL 2.5.0 released on 2023-08-18. The error is confirmed to happen with all JDKs 17 to 21, both Oracle JDK and also GraalVM JDK. I have not tested with older JDKs.
<br/><br/>We know that the issue is specifically related to macOS Apple Silicon, because it does not occur on macOS intel, nor on Windows, nor Linux.
<br/><br/>Our application is an image processing application, and we load images as 1 big texture at the moment to view them visually, provided that the reported image texture size is big enough, otherwise we fall back to a CPU image viewer.
<br/><br/>We get consistent crashes on Apple Silicon if we load an image with dimensions of roughly 13000x12000 pixels. With smaller images all is fine. All bigger images will crash in the same way.
<br/><br/>The error that we see on system out is:
<br/><br/>[thread 22275 also had an error][thread 115519 also had an error]
<br/>#
<br/><br/>[thread 102699 also had an error][thread 93207 also had an error]
<br/><br/># A fatal error has been detected by the Java Runtime Environment:
<br/>#
<br/># SIGSEGV (0xb) at pc=0x00000001f561ae2c, pid=1377, tid=45827
<br/>#
<br/># JRE version: Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (21.0.2+13) (build 21.0.2+13-LTS-jvmci-23.1-b30)
<br/># Java VM: Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
<br/># Problematic frame:
<br/># [thread 95235 also had an error]
<br/>[thread 173863 also had an error]
<br/>[thread 107019 also had an error]
<br/>[thread 107291 also had an error]
<br/>[thread 103259 also had an error]
<br/>[thread 124207 also had an error]
<br/>[thread 123911 also had an error]
<br/>C [libGLImage.dylib+0x1de2c] storeVecColor_RGBA_UI+0x40
<br/>#
<br/># No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
<br/>#
<br/>[thread 102923 also had an error]
<br/>[thread 110299 also had an error]
<br/>[thread 99359 also had an error]
<br/>[thread 173391 also had an error]
<br/># An error report file with more information is saved as:
<br/># /Users/mabula/IdeaProjects/astropixelprocessor-jdk17/hs_err_pid1377.log
<br/>#
<br/># If you would like to submit a bug report, please visit:
<br/># <a href="https://bugreport.java.com/bugreport/crash.jsp" target="_top" rel="nofollow" link="external">https://bugreport.java.com/bugreport/crash.jsp</a><br/>#
<br/><br/><br/>So it seems that the error might occur in C [libGLImage.dylib+0x1de2c] storeVecColor_RGBA_UI+0x40
<br/><br/>macOS reports this, thread crashing is Crashed Thread: 47 Dispatch queue: GLImageWork:
<br/><br/>"Process: java [26857]
<br/>Path: /Applications/AstroPixelProcessor.app/Contents/MacOS/
<br/>universalJavaApplicationStub
<br/>Identifier: java
<br/>Version: ???
<br/>Code Type: ARM-64 (Native)
<br/>Parent Process: launchd [1]
<br/>User ID: 501
<br/>Date/Time: 2023-06-14 13:22:54.7681 -0700
<br/>OS Version: macOS 13.4 (22F66)
<br/>Report Version: 12
<br/>Anonymous UUID: C22A1F61-83E1-B9CD-3580-041C170F34EB
<br/>Sleep/Wake UUID: B34BF2F5-BE15-48EC-8B15-1641ADF6D333
<br/>Time Awake Since Boot: 120000 seconds
<br/>Time Since Wake: 5138 seconds
<br/>System Integrity Protection: enabled
<br/><b>Crashed Thread: 47 Dispatch queue: GLImageWork</b><br/>Exception Type: EXC_BAD_ACCESS (SIGABRT)
<br/>Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
<br/>Exception Codes: 0x0000000000000001, 0x0000000000000000
<br/>VM Region Info: 0 is not in any region. Bytes before following region: 4334796800
<br/>REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD
<br/>REGION DETAIL
<br/>UNUSED SPACE AT START
<br/>--->
<br/>__TEXT 1025fc000-102600000 [ 16K] r-x/r-x
<br/>SM=COW ...Home/bin/java"
<br/><br/><br/>My first question is if this issue is known already or if you need more information from me to get this solved?
<br/>I think the crashes will occur if the texture size is bigger than a certain threshold, which I will try to determine in the meantime.
<br/>
tag:forum.jogamp.org,2006:post-4043290Problems with macOS Sonoma 14.4 beta2024-02-05T08:48:34Z2024-02-05T09:53:27Zmottelet
Hello,
<br/><br/>I currently have problems with Scilab (see callstack of crash at the end of this message) after an upgrade to macOS 14.4 beta and I presume it's a general problem in jogamp_nativewindow_macosx (not just with Scilab, which uses latests 2.5.0 version of jogl). Is there an HelloWorld program using joGL that I can use to provide a simple test ?
<br/><br/>I have found the following related links (astropixel also uses jogl):
<br/><br/><a href="https://www.astropixelprocessor.com/community/macos/app-not-starting-sonoma-14-4-tried-beta-28-and-29-test-but-no-joy/" target="_top" rel="nofollow" link="external">https://www.astropixelprocessor.com/community/macos/app-not-starting-sonoma-14-4-tried-beta-28-and-29-test-but-no-joy/</a><br/><a href="https://www.astropixelprocessor.com/community/release-information/astro-pixel-processor-2-0-0-beta28-release-notes/" target="_top" rel="nofollow" link="external">https://www.astropixelprocessor.com/community/release-information/astro-pixel-processor-2-0-0-beta28-release-notes/</a><br/><a href="https://youtrack.jetbrains.com/issue/JBR-6180" target="_top" rel="nofollow" link="external">https://youtrack.jetbrains.com/issue/JBR-6180</a><br/><br/>Seems that disabling metal at compilation could fix the problem.
<br/><br/>S.
<br/><br/>Thread 1 crashed with ARM Thread State (64-bit):
<br/> x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
<br/> x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000
<br/> x8: 0x33303aa2bf3400a8 x9: 0x33303aa2bf3400a8 x10: 0x0000000000000025 x11: 0x0000000000000001
<br/> x12: 0x000000016d7a95c2 x13: 0x0000000000000000 x14: 0x0000000102e787e9 x15: 0x0000000207c5c5b0
<br/> x16: 0xfffffffffffffff4 x17: 0x0000000211f42c48 x18: 0x0000000000000000 x19: 0x000000016d7a98a8
<br/> x20: 0x000060000290e8c0 x21: 0x0000600003ce5120 x22: 0x0000000000000003 x23: 0x0000000277b7e040
<br/> x24: 0x0000000000000273 x25: 0x0000000000000001 x26: 0x0000000000000000 x27: 0x0000000000000000
<br/> x28: 0x0000000207c96b50 fp: 0x000000016d7a9890 lr: 0x040f0001a439d394
<br/> sp: 0x000000016d7a97c0 pc: 0x00000001a439d394 cpsr: 0x60001000
<br/> far: 0x0000000000000000 esr: 0xf2000001 (Breakpoint) brk 1
<br/><br/>Binary Images:
<br/> 0x14fa60000 - 0x14facbfff com.apple.AppleMetalOpenGLRenderer (1.0) <8b69c871-19c2-3d46-b8de-8dbc62e532cd> /System/Library/Extensions/AppleMetalOpenGLRenderer.bundle/Contents/MacOS/AppleMetalOpenGLRenderer
<br/> 0x121d30000 - 0x121d6bfff libjogl_mobile.dylib (*) <9c3ef505-8828-36ab-a776-5ffdb9d4cd79> /Applications/scilab-2024.0.0.app/Contents/lib/thirdparty/libjogl_mobile.dylib
<br/> 0x3136cc000 - 0x313747fff libjogl_desktop.dylib (*) <543b42ae-90a4-325c-8850-84951b1fa6ee> /Applications/scilab-2024.0.0.app/Contents/lib/thirdparty/libjogl_desktop.dylib
<br/> 0x121d18000 - 0x121d1ffff libnativewindow_macosx.dylib (*) <2c256988-735b-38b7-9712-0bfc58c3ff90> /Applications/scilab-2024.0.0.app/Contents/lib/thirdparty/libnativewindow_macosx.dylib
<br/> 0x107f70000 - 0x107f73fff libnativewindow_awt.dylib (*) <f01b5bf6-6e12-3013-a19d-9a371d95fb5c> /Applications/scilab-2024.0.0.app/Contents/lib/thirdparty/libnativewindow_awt.dylib
<br/> 0x107f58000 - 0x107f5bfff libjawt.dylib (*) <5784ddd5-63d7-392c-9952-937b221dcf58> /Library/Java/JavaVirtualMachines/temurin-17.jre/Contents/Home/lib/libjawt.dylib
<br/> 0x107e98000 - 0x107e9bfff libgluegen_rt.dylib (*) <c7d0a72d-9862-32a8-b02f-66b24145a27f> /Applications/scilab-2024.0.0.app/Contents/lib/thirdparty/libgluegen_rt.dylib
<br/> 0x107e2c000 - 0x107e33fff libosxui.dylib (*) <7c68617d-9c76-3838-9452-787cd3d921b2> /Library/Java/JavaVirtualMachines/temurin-17.jre/Contents/Home/lib/libosxui.dylib
<br/><br/>(...)
tag:forum.jogamp.org,2006:post-4043303Corrupted frame or transform Mac OSX (OK on win/linux)2024-02-08T23:58:05Z2024-02-08T23:58:05ZTobi Delbruck
Our project <a href="https://jaerproject.org" target="_top" rel="nofollow" link="external">https://jaerproject.org</a> has been using JOGL for about 10 years now very successfully and happily, but we always had a problem on Mac/OSX with rendering of the event camera output, where alternating frames were showing up as weirdly transformed with black background. Now finally we bought a mac mini to try to debug the problem but still cannot figure it out. This follows with the wonderful release of JOGL2.5.0 that finally allowed us to update jaer to use Java 21 and netbeans 20 and make real install4j installers for it.
<br/><br/>A rendered frame should look like this (here I zoomed out a lot to show the context better):
<br/>The scene is from a recording with DAVIS frame event camera of spinning coins
<br/><br/><img src="https://forum.jogamp.org/file/n4043303/ok_frame.png" border="0"/><br/><br/>But every other frame looks like this on Mac OSX machine:
<br/><br/><img src="https://forum.jogamp.org/file/n4043303/bad_frame.png" border="0"/><br/><br/>The problem is shown in the 2 videos in this folder: <a href="https://www.dropbox.com/scl/fo/6vhxmwqv85btlpfwcgqdo/h?rlkey=oald0p3wixny5y6z5o3q3m3l3&dl=0" target="_top" rel="nofollow" link="external">https://www.dropbox.com/scl/fo/6vhxmwqv85btlpfwcgqdo/h?rlkey=oald0p3wixny5y6z5o3q3m3l3&dl=0</a><br/><br/>These videos are screen capture videos of the behavior on OSX and Windows.
<br/>In each video I put breakpoints on the display() method and the internal JOGL swapBuffers calls.
<br/><br/>I don't know if it some handing of the frame buffer objects in our code or the way we make textures or something else.
<br/>The code is really complicated for me to follow but I can fully appreciate Sven's comments about how handling the FBO is a PIA on OSX :-)
<br/><br/>This folder also has the jogamp debug logs
<br/><br/><img src="https://forum.jogamp.org/file/n4043303/bugreport_folder.png" border="0"/><br/><br/>If anyone has some idea about what is going on it would very helpful.
<br/><br/>
tag:forum.jogamp.org,2006:post-4043298What's the relation between GLCanvas.setsize , JFrame.setsize , JFrame.getLocationOnScreen , and gl.glViewport?2024-02-07T20:44:12Z2024-02-07T21:37:39ZHamudHaa
Are they referring to the same size beginning at the same left corner coordinate and the same width and height ?
<br/>Is glViewport automatically called when the window is resized ?
<br/>What should I do to prevent jogl from automatically stretching my screen after resizing? I'd like to have it to show part of my screen or blackness which is not rendered when I'm resizing and moving the window .
<br/>And , if I have blackness outside the rendered area after resizing the window , what should I do to stretch the screen to fit the blackness ? This is the problem I'm facing when messing around offscreen rendering where I'm trying to set glViewport larger than the GLcanvas ( which is also the size of JFrame ). In my case the output image fills the exceeded area with blackness while my stuff are placed at a corner . But , isn't glViewport remapping NDC to framebuffer ? How could you even be possible to render only part of the viewport ? My explanation is that , since I'm calling glviewport in init . There might be another glviewport is called from another place which overrode my call of glviewport .
<br/>Thanks all your replies
tag:forum.jogamp.org,2006:post-4043294When rendering to framebuffer that is not the default one there'll be error 'GL_INVALID_FRAMEBUFFER_OPERATION'2024-02-07T06:12:36Z2024-02-07T06:12:36ZHamudHaa
I designed a constructor function that will run when init method of the implemented GLEventListener is called. Then I have glGetError in display method .
<br/>Inside the constructor function I designed , I have glBindFramebuffer which binds a user-defined fbo to GL_FRAMEBUFFER .
<br/>The problem is , when my program is launched :
<br/>1.If I bind that fbo to GL_FRAMEBUFFER . The glGetError in display will output GL_INVALID_FRAMEBUFFER_OPERATION error .
<br/>2.If I bind 0 to GL_FRAMEBUFFER( I guess it means default ?) , then no error
<br/>I'm sure the user-defined FBO is okay . Because even if I had it to firstly execute glBindFramebuffer( not the 0 one) then secondly execute glBindFramebuffer( the 0 one) there's no error.
<br/>So I wonder if you really have to render things into the default frame buffer when the program is initialized
tag:forum.jogamp.org,2006:post-4043280GLU tesselation problem2024-01-26T06:57:14Z2024-01-26T06:57:14Zmaartenc
Hi,
<br/><br/>we are using the GLUtesselator to triangulate triangles where some area has been cut off.
<br/>This works most of the time, but for some cases, the tesselator generator strange results.
<br/><br/>I was able to reproduce the issue to a simplified example, where we cut away the upper part of a triangle.
<br/>The Java code is this:
<br/><br/>// define the triangle corner vertices
<br/>double[] vertex0 = new double[] {-3.5355339059327386, -3.5355339059327373, 0.0};
<br/>double[] vertex1 = new double[] {-3.8650522668136853, -3.1719664208182263, 0};
<br/>double[] vertex2 = new double[] {-3.865052266813685, 3.1719664208182277, 0};
<br/><br/>// define the vertices splitting the triangle in two parts
<br/>double[] vertex3 = new double[] {-3.7092235489843537, 4.440892098500626E-16, 0.0};
<br/>double[] vertex4 = new double[] {-3.8650522668136853, 0.0, 0.0};
<br/><br/>GLUtessellatorCallbackAdapter callback = new GLUtessellatorCallbackAdapter() {
<br/> @Override
<br/> public void begin(int aType) {
<br/> System.out.println("type = " + aType);
<br/> }
<br/><br/> @Override
<br/> public void vertex(Object aVertex) {
<br/> System.out.println("vertex = " + aVertex);
<br/> }
<br/>};
<br/><br/>GLUtessellator tesselator = GLU.gluNewTess();
<br/>GLU.gluTessProperty(tesselator, GLU.GLU_TESS_WINDING_RULE, GLU.GLU_TESS_WINDING_POSITIVE);
<br/>GLU.gluTessCallback(tesselator, GLU.GLU_TESS_BEGIN, callback);
<br/>GLU.gluTessCallback(tesselator, GLU.GLU_VERTEX, callback);
<br/><br/>GLU.gluTessBeginPolygon(tesselator, null);
<br/><br/>// triangle outer contour (clockwise)
<br/>GLU.gluTessBeginContour(tesselator);
<br/>GLU.gluTessVertex(tesselator, vertex0, 0, "V0");
<br/>GLU.gluTessVertex(tesselator, vertex1, 0, "V1");
<br/>GLU.gluTessVertex(tesselator, vertex2, 0, "V2");
<br/>GLU.gluTessEndContour(tesselator);
<br/><br/>// part of the triangle we want to cut away (define the contour anti-clockwise)
<br/>GLU.gluTessBeginContour(tesselator);
<br/>GLU.gluTessVertex(tesselator, vertex3, 0, "V3");
<br/>GLU.gluTessVertex(tesselator, vertex2, 0, "V2");
<br/>GLU.gluTessVertex(tesselator, vertex4, 0, "V4");
<br/>GLU.gluTessEndContour(tesselator);
<br/><br/>GLU.gluTessEndPolygon(tesselator);
<br/><br/>When I run this code, the callback function gives this output:
<br/>type = 6 --> GL_TRIANGLE_FAN
<br/>vertex = V0
<br/>vertex = V1
<br/>vertex = V3
<br/>vertex = V2
<br/><br/>This gives the following 2 triangles: V0-V1-V3; V0-V3-V2. One triangle is missing here in the result (V1-V4-V3).
<br/>When I run this sample code on cases where it does tesselate properly, the resulting triangles are V0-V1-V4, V0-V4-V3 and V0-V3-V2.
<br/><br/>Any idea what's going wrong here?
<br/><br/>Maarten
tag:forum.jogamp.org,2006:post-4043228Robot Overlord 3 (WIP)2023-12-29T11:21:32Z2023-12-29T11:21:32Zimakerobots
Thank you everyone for all your hard work making Jogamp happen and empowering me to make useful apps.
<br/>Instead of only posting problems... here's a WIP for Robot Overlord 3, the tool I use to simulate and program robots.
<br/>It uses Modern Docking and Jogamp, which I'm happy to report play nice together.
<br/><br/><img src="https://forum.jogamp.org/file/n4043228/Screenshot_2023-12-29_101743.png" border="0"/><br/><br/>
tag:forum.jogamp.org,2006:post-4043285java.lang.IllegalStateException: Module 'jogl.all' is already on the module path!2024-01-29T14:03:31Z2024-01-29T14:03:31Zimakerobots
This is a non fatal message I get only when running <b>mvn test</b> and when github actions run tests.
<br/>It appears to run for every native that is included. Anyone know why and how to make it behave? Thank you~!
<br/><br/>My project is <a href="https://github.com/marginallyclever/robot-overlord-app" target="_top" rel="nofollow" link="external">https://github.com/marginallyclever/robot-overlord-app</a><br/><br/>I'm using surefire 3.2.5, if that means anything.
<br/><br/>-----------
<br/><br/>[WARNING] Exception for 'C:\Users\aggra\.m2\repository\org\jogamp\jogl\jogl-all\2.5.0\jogl-all-2.5.0-natives-windows-amd64.jar'.
<br/>java.lang.IllegalStateException: Module 'jogl.all' is already on the module path!
<br/> at org.codehaus.plexus.languages.java.jpms.LocationManager.resolvePaths (LocationManager.java:270)
<br/> at org.apache.maven.plugin.surefire.AbstractSurefireMojo.newStartupConfigWithModularPath (AbstractSurefireMojo.java:1860)
<br/> at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createStartupConfiguration (AbstractSurefireMojo.java:1731)
<br/> at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createForkStarter (AbstractSurefireMojo.java:2203)
<br/> at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:1230)
<br/> at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:1090)
<br/> at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:910)
<br/> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
<br/> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
<br/> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
<br/> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
<br/> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
<br/> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
<br/> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
<br/> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
<br/> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
<br/> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
<br/> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
<br/> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
<br/> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
<br/> at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
<br/> at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
<br/> at java.lang.reflect.Method.invoke (Method.java:580)
<br/> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
<br/> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
<br/> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
<br/> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
<br/> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
<br/><br/>[WARNING] Exception for 'C:\Users\aggra\.m2\repository\org\jogamp\jogl\jogl-all\2.5.0\jogl-all-2.5.0-natives-linux-armv6hf.jar'.
<br/>java.lang.IllegalStateException: Module 'jogl.all' is already on the module path!
<br/><same trace back><br/><br/>[WARNING] Exception for 'C:\Users\aggra\.m2\repository\org\jogamp\jogl\jogl-all\2.5.0\jogl-all-2.5.0-natives-linux-aarch64.jar'.
<br/>java.lang.IllegalStateException: Module 'jogl.all' is already on the module path!
<br/><same trace back><br/><br/>[WARNING] Exception for 'C:\Users\aggra\.m2\repository\org\jogamp\jogl\jogl-all\2.5.0\jogl-all-2.5.0-natives-android-aarch64.jar'.
<br/>java.lang.IllegalStateException: Module 'jogl.all' is already on the module path!
<br/><same trace back><br/><br/>[WARNING] Exception for 'C:\Users\aggra\.m2\repository\org\jogamp\jogl\jogl-all\2.5.0\jogl-all-2.5.0-natives-linux-amd64.jar'.
<br/>java.lang.IllegalStateException: Module 'jogl.all' is already on the module path!
<br/><same trace back><br/><br/>[WARNING] Exception for 'C:\Users\aggra\.m2\repository\org\jogamp\jogl\jogl-all\2.5.0\jogl-all-2.5.0-natives-macosx-universal.jar'.
<br/>java.lang.IllegalStateException: Module 'jogl.all' is already on the module path!
<br/><same trace back><br/>
tag:forum.jogamp.org,2006:post-4043262Rendering outside EventListener and program fell into dead loop2024-01-20T06:09:54Z2024-01-20T06:09:54ZHamudHaa
As a beginner , I'm trying to understand why we have to use EventListener instead of writing codes outside of it
<br/>I wrote some codes in attempt to render a triangle without using EvenListener, as I understanding that EventListener provides functions for Drawable to call, but the core rendering process is independent from it , having things only to do with the Drawable .
<br/>After I clicked run button , my screen turned white and the program lost response . I had to terminate it to end this eternal loop .
<br/>May I ask is there problem with my codes ? Why I shouldn't write them in this way ? What's the reason for my program to be dead ? Thanks for all your replies .
<br/>Additional information : 0 error 1 warning (GL_TRIANGLES should be accessed in a static way)
<br/><br/><br/><b><br/>JFrame frame = new JFrame("title");
<br/>frame.setSize(new Dimension(1200,1200));
<br/>frame.getContentPane().add(canvas);
<br/>frame.setVisible(true);
<br/>GLContext temp = canvas.createContext(null);
<br/>temp.setGLDrawable(canvas.getDelegatedDrawable(), false);
<br/>GLContext ctx = canvas.getContext();
<br/>canvas.setRealized(true);
<br/>System.out.print(canvas.isRealized()); //true
<br/>ctx.makeCurrent();
<br/>MyOpenGL myglobj = new MyOpenGL();
<br/>OpenGL.part1 test = myglobj.new part1(ctx.getGL().getGL3());
<br/>test.test();//It's just a bunch of glGenBuffers glBindBuffer glEnableVertexAttribArray to set up my rendering environment
<br/>canvas.getGL().getGL3().glDrawArrays(canvas.getGL().GL_TRIANGLES, 0, 12);</b><br/><br/>
tag:forum.jogamp.org,2006:post-4042206DPI scaling not working2023-02-21T11:30:59Z2023-02-21T11:30:59Zgbburkhardt
JOGL specification version 2.4
<br/>JOGL implementation version 2.4.0-rc-20221130
<br/>JOGL implementation vendor JogAmp Community
<br/><br/>I'm working with NASA WorldWind's "InstallImagery" example. On a Windows 11 platform with Java 11, when I set the text scaling to something other that 125%, the GLCanvas doesn't fill the entire application pane, e.g.,
<br/><br/><img src="https://forum.jogamp.org/file/n4042206/installImagery-125percent.png" border="0"/><br/><br/>It looks like the scaling updates are not working properly. I turned on jogl.debug.GLCanvas=true, and I don't see the scaling change in the log output:
<br/><br/>Changing to 125%:
<br/><br/>AWT-EventQueue-0: GLCanvas.reshape.0 canvas0 resize [ this 994x765, pixelScale [1.0, 1.0]] -> 994x765 * [1.0, 1.0] -> 994x765 - surfaceHandle 0x0
<br/>AWT-EventQueue-0: GLCanvas.reshape.0 canvas0 resize [ this 998x775, pixelScale [1.0, 1.0]] -> 998x775 * [1.0, 1.0] -> 998x775 - surfaceHandle 0x0
<br/>AWT-EventQueue-0: Reshape: 998x775
<br/><br/><br/>Changing to 100%:
<br/>AWT-EventQueue-0: GLCanvas.reshape.0 canvas0 resize [ this 996x773, pixelScale [1.0, 1.0]] -> 996x773 * [1.0, 1.0] -> 996x773 - surfaceHandle 0x0
<br/>AWT-EventQueue-0: Reshape: 996x773
<br/><br/>The initial size of the canvas is set to 1000x800, but that doesn't seem to change even though the frame containing resizes when the text size changes. The display is the same if the text scaling is set to 125% before starting the application.
<br/><br/>It looks like GLCanvas.updatePixelScale is being called before JAWTWindow.updatePixelScale, and the jawtWindow.hasPixelScaleChanged() return is false when called in GLCanvas.
<br/>
tag:forum.jogamp.org,2006:post-4043252Struggling to understand GLCanvas / GLPanel2024-01-17T06:53:17Z2024-01-17T06:53:17Zunixnerd
In order to make my software work with webswing I need to use GLCanvas / GLPanel as webswing doesn't like heavyweight components. I'm really struggling trying to understand how to implement this.
<br/><br/>Right now I have a JDialog with a Canvas3D as a child and all my code uses Java3D. I think I need to change the Canvas3D to a GLCanvas? But clearly it's not that simple as things like SimpleUniverse and PickCanvas which take a Canvas3D in their constuctors won't take a GLCanvas.
<br/><br/>I think there is something fundamental about Java3D / Jogamp and JOGL I'm failing to understand. Do need to bin my Java3D code and convert it all to JOGL equivalents?
<br/>
tag:forum.jogamp.org,2006:post-4043235BugReport - EXCEPTION_ACCESS_VIOLATION during call of GDI.DescribePixelFormat2024-01-02T02:29:18Z2024-01-02T02:29:18ZMathieu Féry
Hi all,
<br/><br/>First of all, Happy New Year to everyone ! :)
<br/><br/>And secondly, I'm here to report a bug :c
<br/><br/>One of our users has the following problem: JRE crashes with an EXCEPTION_ACCESS_VIOLATION during the call to jogamp.nativewindow.windows.GDI.DescribePixelFormat1
<br/><br/>We therefore followed the bug reporting procedure described here: <a href="https://forum.jogamp.org/Bugreport-How-to-report-a-bug-td4042945.html" target="_top" rel="nofollow" link="external">https://forum.jogamp.org/Bugreport-How-to-report-a-bug-td4042945.html</a><br/><br/>The problem is present every time.
<br/><br/>Here the JRE used is the following:
<br/>JRE version: OpenJDK Runtime Environment Temurin-11.0.21+9 (11.0.21+9) (build 11.0.21+9)
<br/>Java VM: OpenJDK 64-Bit Server VM Temurin-11.0.21+9 (11.0.21+9, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
<br/><br/>The user in question is on the following OS : Windows 7
<br/>Platform: WINDOWS / Windows 7 6.1 (6.1.0), amd64 (X86_64, GENERIC_ABI), 4 cores, littleEndian true
<br/><br/>We use version 2.5.0 of Jogamp
<br/><br/>Here are a minimal reproduction scenario: Launch UISceneDemo20
<br/><br/>Script related : <a href="https://forum.jogamp.org/file/n4043235/test-fat-jars.bat" target="_top" rel="nofollow" link="external">test-fat-jars.bat</a><br/><br/>Here stdout & stderr : <a href="https://forum.jogamp.org/file/n4043235/v2.log" target="_top" rel="nofollow" link="external">v2.5.0.log</a> and hs_err_pidXXX : <a href="https://forum.jogamp.org/file/n4043235/hs_err_pid6872.log" target="_top" rel="nofollow" link="external">hs_err_pid6872.log</a><br/><br/>In this case jre are present in ./jre folder and we add jogamp-fat.jar, jogl-demos.jar and jogl-fonts-p0.jar in current directory
<br/><br/>Here are the results of the detailed debugging scripts :
<br/><br/>With following script : <a href="https://forum.jogamp.org/file/n4043235/test.bat" target="_top" rel="nofollow" link="external">test.bat</a><br/>stdout & stderr : <a href="https://forum.jogamp.org/file/n4043235/test.log" target="_top" rel="nofollow" link="external">test.log</a> and hs_err_pidXXX : <a href="https://forum.jogamp.org/file/n4043235/hs_err_pid6508.log" target="_top" rel="nofollow" link="external">hs_err_pid6508.log</a><br/><br/>With following script : <a href="https://forum.jogamp.org/file/n4043235/test_dbg.bat" target="_top" rel="nofollow" link="external">test_dbg.bat</a><br/>stdout & stderr : <a href="https://forum.jogamp.org/file/n4043235/test_dbg.log" target="_top" rel="nofollow" link="external">test_dbg.log</a> and hs_err_pidXXX : <a href="https://forum.jogamp.org/file/n4043235/hs_err_pid3212.log" target="_top" rel="nofollow" link="external">hs_err_pid3212.log</a><br/><br/>I hope I haven't forgotten anything for the bug report :x
<br/><br/>Thanks for all your hard work on Jogamp!
tag:forum.jogamp.org,2006:post-4043227glDrawArrays crashes Java but only on client's machine2023-12-29T11:15:58Z2023-12-29T11:15:58Zimakerobots
Sorry this isn't a fully fleshed out bug report. I still suspect it's something I'm doing, but I hope that someone might have a clue what I've done.
<br/><br/>Windows 11, Jogamp 2.5.0, Java 21. Client says their video card is <i>NVidia GeForce GTX 1080 Ti with dedicated 27,536 Mb Mem</i><br/><br/>My log file says...
<br/><br/><pre>09:33:15.744 [AWT-EventQueue-0] INFO c.m.ro3.apps.render.OpenGLPanel - availability=Natives[
GL4bc true [4.6 (Compat profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
GL4 true [4.6 (Core profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
GLES3 false,
GL3bc true [4.6 (Compat profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
GL3 true [4.6 (Core profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
GL2 true [4.6 (Compat profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
GLES2 false,
GLES1 false, count 5 / 8],
Common[, GL4ES3 true, GL2GL3 true, GL2ES2 true, GL2ES1 true],
Mappings[GL3bc GLProfile[GL3bc/GL4bc.hw],
GL2ES1 GLProfile[GL2ES1/GL4bc.hw],
GL4ES3 GLProfile[GL4ES3/GL4.hw],
GL2ES2 GLProfile[GL2ES2/GL4.hw],
GL4bc GLProfile[GL4bc/GL4bc.hw],
GL2 GLProfile[GL2/GL4bc.hw],
GL4 GLProfile[GL4/GL4.hw],
GL3 GLProfile[GL3/GL4.hw],
GL2GL3 GLProfile[GL2GL3/GL4bc.hw],
,
default GLProfile[GL4bc/GL4bc.hw],
count 9 / 12]
09:33:15.745 [AWT-EventQueue-0] INFO c.m.ro3.apps.render.OpenGLPanel - capabilities=rgba 8/8/8/1,
opaque,
accum-rgba 0/0/0/0,
dp/st/ms 16/8/4,
sample-ext default,
dbl,
mono ,
hw,
GLProfile[GL4bc/GL4bc.hw],
on-scr[.]</pre><br/>then creates the canvas, calls init... and then in display it dies with the attached crash report: <a href="https://forum.jogamp.org/file/n4043227/hs_err_pid9836.log" target="_top" rel="nofollow" link="external">hs_err_pid9836.log</a><br/><br/>Specifically...
<br/><br/><pre>Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jogamp.opengl.gl4.GL4bcImpl.dispatch_glDrawArrays1(IIIJ)V+0
j jogamp.opengl.gl4.GL4bcImpl.glDrawArrays(III)V+45
j com.marginallyclever.ro3.mesh.Mesh.render(Lcom/jogamp/opengl/GL3;II)V+166
j com.marginallyclever.ro3.mesh.Mesh.render(Lcom/jogamp/opengl/GL3;)V+32
j com.marginallyclever.ro3.apps.render.renderpasses.DrawBackground.drawSkybox(Lcom/jogamp/opengl/GL3;Lcom/marginallyclever/ro3/node/nodes/Camera;)V+279
j com.marginallyclever.ro3.apps.render.renderpasses.DrawBackground.draw(Lcom/marginallyclever/ro3/apps/render/Viewport;)V+116
j com.marginallyclever.ro3.apps.render.Viewport.renderAllPasses()V+44
j com.marginallyclever.ro3.apps.render.Viewport.display(Lcom/jogamp/opengl/GLAutoDrawable;)V+54</pre><br/>I don't think I'm doing anything too spicy with my draw arrays call... so... any idea what I'm doing wrong?
<br/><br/>Thank you!
tag:forum.jogamp.org,2006:post-4043199Performance2023-12-06T02:01:25Z2023-12-06T02:33:39ZJoglCoder
Hello community,
<br/><br/>I recently stumbled upon a project that uses JogAmp libraries for rendering graphics and using a bird's eye like perspective of objects in an old swing application.
<br/><br/>We are currently using gluegen-rt-main and jogl-all-main in the version 2.3.2.
<br/><br/>I tried to update to the version 2.5.0 as there seemed to be a problem with Citrix messing with the OpenGL32.dll or so I have read in another thread. This caused a problem, that the library did not work at all at computers running Citrix. Unfortunately the user feedback was, that the performance in relation to the 2.3.2 degraded.
<br/><br/>If one applies the "NVIDIA Hardware Acceleration" instead of the "Integrated graphic driver" directly to the corresponding program, it is fast as before with the 2.3.2 version. However, as the software is used in quite old machines, we can not enforce customers upgrade their hardware.
<br/><br/>So I tried to pinpoint the issue by trying out the 2.4.0 as well as the 2.5.0 version, but the result was the same.
<br/>The old one renders the objects "fluently" and the new versions judder.
<br/><br/>As I am no expert with the library, I just used VisualVM to get a few methods we use quite often:
<br/><br/>jogamp.opengl.gl4.GL4bcImpl.glNormal3f (float, float, float)
<br/>jogamp.opengl.gl4.GL4bcImpl.glVertex3f (float, float, float)
<br/>jogamp.opengl.gl4.GL4bcImpl.glBegin (int)
<br/>jogamp.opengl.gl4.GL4bcImpl.glBindTexture (int, int)
<br/>jogamp.opengl.gl4.GL4bcImpl.glEnd ()
<br/><br/>The runtime environment is the Temurin release jdk-21.0.1+12. The issue has been reproduced with an Intel UDH Graphics 630.
<br/><br/>Have there been any changes with regards to the nature of the graphics processing, that could explain this issue?
<br/><br/>Thank you in advance!
<br/><br/><br/>
tag:forum.jogamp.org,2006:post-4043168how to use GLContext.getCurrentGL() ???2023-11-26T16:57:50Z2023-11-26T16:57:50Zcylob
Do you really have to call it in every different method that needs to call a gl function? If so, is that a performance problem?
<br/>If not, what's the strategy for storing the context so all the different methods can call it?
tag:forum.jogamp.org,2006:post-4043219NativeWindowFactory.initSingleton()2023-12-19T07:03:42Z2023-12-19T07:03:42ZChristophe LAFOLET
Hello,
<br/><br/>in one of my projects, the thread executing NativeWindowFactory.initSingleton() received an interrupt ... (bad luck)
<br/><br/>in NativeWindowFactory.initSingleton(), the static field "initialized" is set to true at the beginning of the method but no "try catch" is done to verify if the init is successfull
<br/><br/>Regards
tag:forum.jogamp.org,2006:post-4043119Reenable windows-i5862023-11-05T22:40:51Z2023-11-05T22:40:51Zbreiler
Hi, thanks for your work on this library!
<br/><br/>Is it possible to add the windows-i586 binaries back to the later builds? Windows 10 still comes in a 32-bit version and will reach its end of life on October 14, 2025.
<br/><br/>What is the best way to sponsor this project?
<br/><br/>Thanks,
<br/>Joacim Breiler
<br/><br/><br/>
tag:forum.jogamp.org,2006:post-4043152flipping textures with awtTextureIO?2023-11-23T09:56:56Z2023-11-23T09:56:56Zimakerobots
In jogamp 2.5.0 I have a method which creates or update a Texture.
<br/><br/> private static Texture BufferedImageToTexture(Texture texture,BufferedImage image) {
<br/> GL glContext = GLContext.getCurrentGL();
<br/> GLProfile glProfile = glContext.getGLProfile();
<br/> if(glProfile==null) return texture;
<br/><br/> TextureData textureData = AWTTextureIO.newTextureData(glProfile, image, true);
<br/><br/> if(texture==null) {
<br/> texture = AWTTextureIO.newTexture(textureData);
<br/> } else {
<br/> texture.updateImage(glContext,textureData);
<br/> }
<br/><br/> return texture;
<br/> }
<br/><br/>The Texture appears in app flipped upside down. I have tried using
<br/><br/> textureData.setMustFlipVertically(true);
<br/><br/>after creating textureData. I have also tried
<br/><br/> texture.setMustFlipVertically(true);
<br/><br/>before returning. Neither one changes the flip results. Prior to this I was using `TextureIO.newTexture()` to load textures directly from disk. What am I missing?
<br/><br/>Also congrats to the team that released 2.5.0. I bet that wasn't easy. I appreciate all your hard work!
tag:forum.jogamp.org,2006:post-4043178NewtCanvasAWT, Unable to determine GraphicsConfiguration, Java SE.17, Jogl 2.5.02023-11-28T05:58:35Z2023-11-28T08:01:02ZAndre
i just installed the newest Eclipse Version. 2023-09 (4.29.0) Java SE.17
<br/>I am using Jogl 2.5.0.
<br/><br/>Here is a code that used to work fine but gives me now an error message, JFrames.addNotify() has something to do with it, "this.jFrame.add(this.glCanvas);" is the line that breakes it.
<br/><br/>com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x16f8e2e7]], idx 0], pfdID 8, ARB-Choosen true, requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL4bc.hw], on-scr[.]], chosen GLCaps[wgl vid 8 arb: rgba 10/10/10/2, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL2/GL4bc.hw], on-scr[.]]]
<br/><br/>The normal GLWindow approach with FPSAnimator still works but the NewtCanvasAWT wont run anymore :(
<br/>Any clues?
<br/><br/>i just wanted to be up-to-date
<br/><br/>See stripped down code:
<br/><br/>import javax.swing.JFrame;
<br/><br/>import com.jogamp.newt.awt.NewtCanvasAWT;
<br/>import com.jogamp.newt.opengl.GLWindow;
<br/>import com.jogamp.opengl.GLAutoDrawable;
<br/>import com.jogamp.opengl.GLCapabilities;
<br/>import com.jogamp.opengl.GLEventListener;
<br/>import com.jogamp.opengl.GLProfile;
<br/><br/>public class Main implements GLEventListener {
<br/><br/> public static void main(String[] args) {
<br/> new Main();
<br/> }
<br/><br/> private JFrame jFrame;
<br/> private GLWindow glWindow;
<br/> private NewtCanvasAWT glCanvas;
<br/><br/> public Main() {
<br/> this.jFrame = new JFrame();
<br/> this.jFrame.setSize(320, 240);
<br/> this.jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
<br/> this.jFrame.setLocationRelativeTo(null);
<br/> this.glWindow = GLWindow.create(new GLCapabilities(GLProfile.get(GLProfile.GL2)));
<br/> this.glWindow.addGLEventListener(this);
<br/> this.glCanvas = new NewtCanvasAWT(this.glWindow);
<br/> this.jFrame.add(this.glCanvas);
<br/> this.jFrame.setVisible(true);
<br/> }
<br/><br/> @Override
<br/> public void display(GLAutoDrawable arg0) {
<br/> // TODO Auto-generated method stub
<br/><br/> }
<br/><br/> @Override
<br/> public void dispose(GLAutoDrawable arg0) {
<br/> // TODO Auto-generated method stub
<br/><br/> }
<br/><br/> @Override
<br/> public void init(GLAutoDrawable arg0) {
<br/> // TODO Auto-generated method stub
<br/><br/> }
<br/><br/> @Override
<br/> public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4) {
<br/> // TODO Auto-generated method stub
<br/><br/> }
<br/><br/>}
<br/><br/><br/>THX
<br/>
<div class="signature weak-color">
I am a Robot
</div>
tag:forum.jogamp.org,2006:post-4043164help using TextureIO.newTexture() ???2023-11-26T10:50:34Z2023-11-26T10:50:34Zcylob
I'm coming from doing opengl with java on android. The way I have it there is when I go to load a texture, I specify an ID for the texture ahead of time, then i call the following before teximage2d uploads the image:
<br/><br/> glActiveTexture(GL_TEXTURE0+ID);
<br/><br/>and after teximage2d i call:
<br/><br/> glUniform1i(glGetUniformLocation(shaderID,"tex_unit"+String.valueOf(ID)),ID);
<br/><br/>and in this way, i can just associate a tex id in my vertex buffers to a tex_unitN in my frag shader....thats just how i do things so i dont have to mess with binding textures and stuff in my draw loop....but i cant seem to figure out how to do this with jogl because newTexture() doesnt let you specify an id, does anyone know if i can do this? thanks for your help plz
<br/><br/>
tag:forum.jogamp.org,2006:post-4043154Trouble Creating a Texture Array2023-11-23T22:47:35Z2023-11-23T22:47:35Zandromda
<pre>
Hey all, I have been learning OpenGL in one of my college courses and have decided to try to make a very simple/dumb Minecraft clone as a learning exercise.
At first to load textures I was using a texture atlas and while I had that working as expected, it resulted in textures bleeding over the edge. I read that using a texture array has more benefits/less drawbacks so I have decided to switch to that.
<details>
<summary><strong>Vertex Shader</strong></summary>
#version 410
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNorm;
layout (location = 2) in vec2 aTexCoords;
layout (location = 3) in float aDepth;
out vec2 TexCoords;
out vec3 Normal;
out vec3 FragPos;
out float vDepth;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform float aTexID;
void main()
{
TexCoords = aTexCoords;
vDepth = aDepth;
gl_Position = projection * view * model * vec4(aPos, 1.0);
}
</details>
<details>
<summary><strong>Fragment Shader</strong></summary>
#version 410
out vec4 FragColor;
in vec2 TexCoords;
in float vDepth;
uniform sampler2DArray textureArray;
void main()
{
FragColor = texture(textureArray, vec3(TexCoords, vDepth));
}
</details>
<details>
<summary><strong>Creating the texture array</strong></summary>
public class TextureArray {
private static int imageIndex = 0;
public final IntBuffer textureID = Buffers.newDirectIntBuffer(1);
public TextureArray(GL4 gl) {
try {
TextureData data = TextureIO.newTextureData(gl.getGLProfile(), new File("src/main/resources/textures/atlas.png"), true, "png");
gl.glGenTextures(1, textureID);
gl.glBindTexture(GL_TEXTURE_2D_ARRAY, textureID.get(0));
gl.glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 128, 128, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, data.getBuffer());
} catch (IOException ignored) {
System.out.println("Texture Array Failed");
}
}
}
</details>
<details>
<summary><strong>Draw function for cube</strong></summary>
gl.glUseProgram(shaderProgram);
gl.glActiveTexture(GL_TEXTURE0);
gl.glBindTexture(GL_TEXTURE_2D_ARRAY, Main.textureArray.textureID.get(0));
... send model/view/projection matrices
// draw cubes
gl.glBindVertexArray(vao[0]);
gl.glDrawArrays(GL_TRIANGLES, 0, numVertices);
gl.glBindVertexArray(0);
</details>
I am pretty confident that my issue lies in how I am creating the texture array,
as when I draw the blocks everyone of them is black. I recognize that I am
not sending the vDepth value to the vertex/fragment shader yet,
however as I understand it defaults to 0, I am just trying to get a
texture showing and then configure that properly later on.
Thank you for your help and time.
</pre>
tag:forum.jogamp.org,2006:post-4043075Error on arm64 linux: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice2023-10-18T15:37:20Z2023-10-18T15:37:20Zwspear
Greetings. I'm trying to track down a fix for this. I tried updating to the latest stable build of jogl but the nature of the error didn't seem to change. We've only seen this on our arm64 test system, other platforms work fine. Is there anything else I could track down to help debug? glxgears works on this system but I don't know what jogl test code would exercise the path that leads to this error. The
<br/><pre>
NvRmMemInitNvmap failed with Permission denied
549: Memory Manager Not supported
****NvRmMemInit failed**** error type: 196626
*** NvRmMemInit failed NvRmMemConstructor</pre><br/>portion of the error also shows up in the etc/test.sh output from the jogamp-all-platforms package but whatever gets run there doesn't crash so that may be unrelated. Please let me know if any of the text output from that test script would be useful in diagnosing the issue.
<br/><br/><pre>NvRmMemInitNvmap failed with Permission denied
549: Memory Manager Not supported
****NvRmMemInit failed**** error type: 196626
*** NvRmMemInit failed NvRmMemConstructor
Caught handled GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection localhost:10.0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x1a99560c, isOwner false, <300c08cd, e324157>[count 0, qsz 0, owner <NULL>]]] on thread AWT-EventQueue-0-SharedResourceRunner
[0]: jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:306)
[1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
[2]: java.base/java.lang.Thread.run(Thread.java:833)
Caused[0] by GLException: AWT-EventQueue-0-SharedResourceRunner: Unable to create temp OpenGL context(1) on thread AWT-EventQueue-0-SharedResourceRunner
[0]: jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:390)
[1]: jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:794)
[2]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:677)
[3]: jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:615)
[4]: jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:277)
[5]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
[6]: java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: AWT-EventQueue-0: Unable to create temp OpenGL context(1)
at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:390)
at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:794)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:677)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:615)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1279)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1441)
at com.jogamp.opengl.Threading.invoke(Threading.java:223)
at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:500)
at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:554)
at java.desktop/sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
at java.desktop/sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:66)
at java.desktop/sun.awt.RepaintArea.paint(RepaintArea.java:240)
at java.desktop/sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:555)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5062)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[localhost:10.0, 0xffff0c0ef8e0, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[localhost:10.0, 0xffff14563aa0, refCount 1, unCloseable false]
</pre>
tag:forum.jogamp.org,2006:post-4043094Unable to determine GraphicsConfiguration - Java 17 - JOGL 2.5.0 - Eclipse RCP App2023-10-25T05:22:06Z2023-10-25T05:22:06ZTomasCvincek
Hi All,
<br/><br/>I am facing <b>com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration</b> problem. I searched for solutions and I found some even on this forum - <a href="https://github.com/jzy3d/jogl/issues/4" target="_top" rel="nofollow" link="external">https://github.com/jzy3d/jogl/issues/4</a>, <a href="https://forum.jogamp.org/Unable-to-determine-Graphics-Configuration-Am-I-setting-up-something-wrong-td4041606.html" target="_top" rel="nofollow" link="external">https://forum.jogamp.org/Unable-to-determine-Graphics-Configuration-Am-I-setting-up-something-wrong-td4041606.html</a><br/><br/>I found following solution (workaround) - add 3 JVM parameters:
<br/> --add-exports java.base/java.lang=ALL-UNNAMED
<br/> --add-exports java.desktop/sun.awt=ALL-UNNAMED
<br/> --add-exports java.desktop/sun.java2d=ALL-UNNAMED
<br/><br/>I tried this and it worked just fine when I launched my application from Eclipse IDE (in Debug mode). When running it from IDE, there is no exception and everything seems to be working as expected. But when I run it from build - runtime application, exception is still there, no matter if I pass those parameters to it or not.
<br/><br/>I tried to print all VM arguments from eclipse:
<br/><i>[-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:59220, -Dosgi.requiredJavaVersion=17, -Xms256m, -Xmx4g, -Djava.library.path=C:\lite3d_repos\zdrojaky_linux-afterconfig\litebox3d\win_b64\code\bin;C:\lite3d_repos\zdrojaky_linux-afterconfig\litebox3d\win_b64\code\bin\plugins;C:\lite3d_repos\zdrojaky_linux-afterconfig\litebox3d\java, -DTCA_PROJECT_VARRAY=1, -DTCA_PROJECT_SUFFIX=, -DTCA_PROJECT_DEBUG=, -DTCA_DRY_RUN=, -Dsun.java2d.noddraw=true, -Dsun.java2d.uiScale=1, --add-exports=java.base/java.lang=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED, --add-exports=java.desktop/sun.java2d=ALL-UNNAMED, --add-modules=ALL-SYSTEM, -Dfile.encoding=Cp1250]</i>.
<br/><br/>And I also tried to print all VM arguments from runtime build:
<br/><i>[-Xms40m, -Xmx4g, -DTCA_PROJECT_VARRAY=1, -DTCA_PROJECT_SUFFIX=, -Dsun.java2d.noddraw=true, -Dsun.java2d.uiScale=1, --add-exports java.base/java.lang=ALL-UNNAMED, --add-exports java.desktop/sun.awt=ALL-UNNAMED, --add-exports java.desktop/sun.java2d=ALL-UNNAMED]</i>.
<br/><br/>We build our application using SCons but not sure, if that is important. On Java 11, everything is fine. Java 17 update is necesarry for us because of the other tool, where we integrate our solution.
<br/><br/>Does anyone have any idea, why it behaves like this? Are there any differences for JOGL libs when they are run from debug and from release? Are there any other workarounds for this?
<br/><br/>I guess this might be more question for Eclipse RCP forum and I am planning to share it there as well but in case you have any idea how to overcome this, it would be very appreciated. I can provide more information if requested.
<br/><br/>Thanks
<br/>Tomas C.
<br/><br/>
tag:forum.jogamp.org,2006:post-4043038RenderDoc - how?2023-10-12T08:11:38Z2023-10-12T09:44:46Zimakerobots
Hey all. I'm running jogamp 2.5.0 in my app. Because of a visual glitch, people suggested I run RenderDoc to capture frames and analyze what's going on under the hood.
<br/><br/>RenderDoc says it won't help me because of calls to unsupported functions <b>glPushClientAttrib</b> and <b>glPopClientAttrib</b>. I have searched my code base and find neither call. I also don't find anything ending in *ClientAttrib or starting with glPush* or glPop*. Is it possible this call is in jogamp 2.5.0? How do I make this work?
<br/><br/>The profile being created on my system is GL4bc.
<br/><br/>Thank you!
<br/><br/><a href="https://forum.jogamp.org/file/n4043038/Screenshot_2023-10-12_081223.png" target="_top" rel="nofollow" link="external">Screenshot_2023-10-12_081223.png</a><br/><a href="https://forum.jogamp.org/file/n4043038/Screenshot_2023-10-12_081414.png" target="_top" rel="nofollow" link="external">Screenshot_2023-10-12_081414.png</a>
tag:forum.jogamp.org,2006:post-4042942SWT-AWT high DPI problems with Java 112023-09-15T01:57:49Z2023-09-17T20:33:55ZTomasCvincek
Hello there,
<br/><br/>I am facing problems when I updated Java on our application from version 8 to 11. I am aware of this HighDPI issues and that is why I also updated to newest JOGAMP libs (2.5.0).
<br/><br/>I have Eclipse E4 RCP application, which works fine with SWT widgets. My GLCanvas is inside AWT frame that is created inside SWT composite using SWT_AWT bridge. Here is code snippet, how it is created (it is simplified code, I removed stuff that I do not consider important. I can provide more code if needed):
<br/><br/> // Composite glComposite comes as argument to this method - parental composite
<br/> GLProfile profile = GLProfile.getDefault(GLProfile.getDefaultDevice());
<br/> GLCapabilities capabilities = new GLCapabilities(profile);
<br/> capabilities.setDoubleBuffered(true);
<br/> capabilities.setStencilBits(8);
<br/><br/> com.jogamp.opengl.awt.GLCanvas glCanvasAWT = new com.jogamp.opengl.awt.GLCanvas(capabilities);
<br/> glCanvasAWT.setAutoSwapBufferMode(false);
<br/><br/> Frame frame = SWT_AWT.new_Frame(glComposite);
<br/> frame.setLayout(new java.awt.CardLayout());
<br/> frame.add(glCanvasAWT, "GL_RENDER");
<br/><br/> frame.addComponentListener(new ComponentListener()
<br/> {
<br/> @Override
<br/> public void componentResized(ComponentEvent e)
<br/> {
<br/> Display.getDefault().syncExec(() ->
<br/> {
<br/> System.out.println("Composite bounds: " + glComposite.getBounds());
<br/> System.out.println("Frame bounds: " + frame.getBounds());
<br/> System.out.println("AWT canvas bounds: " + glCanvasAWT.getBounds());
<br/> }
<br/> }
<br/><br/> // other ComponentListener methods
<br/><br/> });
<br/> frame.doLayout();
<br/><br/>When I resize my application, componentResized(ComponentEvent) is called and bounds of each object is printed to console. For some reason, they are not all the same - AWT frame and AWT Canvas bounds are smaller than SWT composite bounds and ratio between those bounds is corresponding to current monitor zoom (e.g.: Monitor zoom is 125%, SWT Composite bounds are 1000x1000 -> AWT frame bounds are 800x800).
<br/><br/>This desynchronization happens only with zoom higher than 100% and it is of course causing my scene to "overlap" behind application. And of course, scene events are not working as expected when bounds are not correct.
<br/><br/>Am I missing something in my code, is it somehow possible to fix this? Same code works fine on java 8 - bounds are same for SWT and AWT widgets.
<br/><br/>Thank you for your answers in advance.
<br/><br/>My versions:
<br/> JOGAMP 2.5.0
<br/> SWT 3.109
<br/> Adoptium Terumin jdk 11.0.20
<br/>
tag:forum.jogamp.org,2006:post-4043003Bug #1431 - NewtCanvasAWT broken: Resize not working2023-09-27T23:45:15Z2023-09-27T23:45:15ZYodoga
Hi,
<br/><br/>With version 2.4.0 (still existing in 2.5.0) came a new error/bug. A bug ticket was already raised in march 2023 by someone else (bug number 1431).
<br/><br/>Unfortunately the bug is not yet confirmed.
<br/><br/>I have the same problem. I can confirm the problem with the example code attached in the bug report and in our real world application as well.
<br/><br/>To make it short: The NewtCanvasAWT in a Linux enviroment is not resizeable. If you change the size of the window/canvas the rendering stops.
<br/>From my perspective it's a show stopper. Jogl is broken (with NewtCanvasAWT under Linux).
<br/>I'm only saying this so clearly because I have the feeling that the relevance of the bug has been underrated so far.
<br/><br/>I tried to locate the bug, but I failed. The debug messages gave no hint to me. I think the parenting lost during/after the resize.
<br/><br/>There is a kind of workaround, but it's very ugly: Add a resize listener to the frame and in every resize event remove and add the NewtCanvasAWT from/to the component.
<br/>You can shorten that by calling only removeNotify and addNotify in the NewtCanvasAWT component. But this isn't a proper solution.
<br/><br/>I also noticed that rendering in a multi-monitor environment works again after moving the window to another monitor (but only until the next resize). I think it's because of the the calls of removeNotify/addNotify which are caused by the monitor device change.
<br/><br/><br/>I know that time/attention is a valuable commodity in an open source project. Hence I can offer support for fixing the bug. But I would need a hint what/where is the problem.
<br/><br/><br/>Details of my environment: Rocky Linux 8, nvidia GPU, JDK 8/11/17
tag:forum.jogamp.org,2006:post-4042948Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit agnostic (PMVMatrix, Matrix4f, Vec4f, ..)2023-09-20T11:20:52Z2023-09-20T11:20:52ZSven Gothel
Posting Bug 1452 here to be noticed .. and discussion, if applicable.
<br/><br/>FYI, see
<br/>- <a href="https://jogamp.org/bugzilla//show_bug.cgi?id=1452" target="_top" rel="nofollow" link="external">https://jogamp.org/bugzilla//show_bug.cgi?id=1452</a><br/>- <a href="https://jogamp.org/cgit/jogl.git/commit/?id=5d6e8a367c03644740187e500c6de5d3ac039d5e" target="_top" rel="nofollow" link="external">https://jogamp.org/cgit/jogl.git/commit/?id=5d6e8a367c03644740187e500c6de5d3ac039d5e</a><br/><br/>Math functionality (PMVMatrix, Matrix4f, Vec4f, ..)
<br/>- shall be used toolkit agnostic, e.g. independent from OpenGL
<br/>- shall be reused within our upcoming Vulkan implementation
<br/>- may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed.
<br/>
<br/>The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData
<br/>via the toolkit agnostic SyncAction and SyncBuffer
<br/>shall also be split to a toolkit agnostic variant.
<br/>
<br/>An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist,
<br/>being derived from the toolkit agnostic base implementation.