Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate 3D scene in a Java canvas (AWT, Swing, JavaFX or SWT) #5

Open
Tracked by #6
jzy3d opened this issue Oct 17, 2021 · 1 comment · Fixed by #19 or #20
Open
Tracked by #6

Integrate 3D scene in a Java canvas (AWT, Swing, JavaFX or SWT) #5

jzy3d opened this issue Oct 17, 2021 · 1 comment · Fixed by #19 or #20
Labels
enhancement New feature or request

Comments

@jzy3d
Copy link
Owner

jzy3d commented Oct 17, 2021

Current prototype uses a native GLUT frame to render the scene, which is not suitable for a complete integration in a Java desktop application.

Ideas

Option 1 : Render offscreen, fetch image and add it to a classic AWT or Swing Canvas

Use FBO

Display in

  • AWT
  • JavaFX
  • Swing
  • SWT

Option 2 : Get a rendering context from a Canvas and expose GL functions with JExtract generated code

  • Pro : cleaner design similar to JOGL
  • Pro : Canvas may expose the current GL context hence avoid multithreading issues
  • Cons : requires understanding the depth of AWT & JDK

See JAWT
See JAWT IN LWJGL
See JAWT IN JOGL
See Project Lanai for Metal support on MacOS.

Questions

  • Why Sun drop JOGL and Java3D in 2004? Are there fundamental reasons why making OpenGL from Java is not viable?
  • Would an AWT Canvas support rendering with both internal JDK native code AND OpenGL wrapped methods with JExtract?
@jzy3d jzy3d added the enhancement New feature or request label Oct 17, 2021
@jzy3d jzy3d mentioned this issue Apr 27, 2022
11 tasks
@jzy3d jzy3d changed the title Integrate 3D scene in an AWT canvas Integrate 3D scene in a Java canvas (AWT, Swing, JavaFX or SWT) Dec 19, 2022
@jzy3d jzy3d closed this as completed in #19 Dec 24, 2022
@jzy3d
Copy link
Owner Author

jzy3d commented Dec 24, 2022

Merged improvements based on FBO for Ubuntu branch, but still FBO on Linux is not resolved

@jzy3d jzy3d reopened this Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant