Open imptah opened 3 years ago
Not sure if GLCanvas
is compatible with the way Skia interoperates with AWT. What will happen if you'll try another direction, and put GLCanvas in Swing hierarchy, and use ComposePanel
for Compose UI?
It seems that using a SwingPanel
to add a JPanel
does create a Swing hierarchy, so it seems like that should work, right @olonho ? Or what am I missing here?
@imptah Does the same code adding a JPanel
with GLJPanel
or GLCanvas
work if Compose is not involved? It was unclear from your bug report if your code was tested/working without Compose. Do you have a snippet which demonstrates the issue?
Not sure if
GLCanvas
is compatible with the way Skia interoperates with AWT. What will happen if you'll try another direction, and put GLCanvas in Swing hierarchy, and useComposePanel
for Compose UI?
Vice versa, when use ComposePanel inside Swing hierarchy I had next results:
JFrame
->JPanel
with BorderLayout —- it works, and everything fine, if we are not needed visualize ComposePanel
over GLCanvas
;
JFrame
->JPanel
with OverlayLayout
-- depends on what index inside of OverlayLayout
we set for our ComposePanel
it will be interactable and responsive for events or not.
JFrame
->JLayeredPane
— we can achieve ComposePanel
visualized above GLCanvas
, and both can responses for events, but ComposePanel
background are not transparent.
The same code of JPanel
with GLCanvas
perfectly works without Compose. But when we are trying to do that inside SwingPanel
it doesn't work as expected.
Here is repository with example.
I'm working on Desktop application with Map functionality, and I wanted to use WorldWind Java SDK (3D map framework). After adding
JPanel
withGLJPanel
orGLCanvas
to theSwingPanel
, it doesn't render it. Is it somehow related to Skia? Does it expect to haveGLJPanel
orGLCanvas
be successfully rendered?