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

Render offscreen in Buffered Images #22

Closed
2 of 7 tasks
jzy3d opened this issue Dec 24, 2022 · 0 comments · Fixed by #19 or #20 · May be fixed by #21
Closed
2 of 7 tasks

Render offscreen in Buffered Images #22

jzy3d opened this issue Dec 24, 2022 · 0 comments · Fixed by #19 or #20 · May be fixed by #21
Labels
enhancement New feature or request

Comments

@jzy3d
Copy link
Owner

jzy3d commented Dec 24, 2022

Ideas

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

  • Pro : "not" complicated
  • Cons : Pixels go from GPU to CPU, CPU make it a BufferedImage, then push to GPU to draw pixels again/
  • Cons : Not sure OpenGL will agree to deal with the AWT Thread AND another application thread rendering offscreen (OpenGL is single threaded)

Implement FBO here, here and here.

  • on macOS (available : GL_ARB_framebuffer_object, GL_EXT_framebuffer_object)
  • on Linux (available : GL_ARB_framebuffer_object, GL_EXT_framebuffer_object) NO glGenFrameBuffersEXT
  • on Windows

Create a context based on OS. Get inspiration from JOGL

  • MacOSXCGLContext.createImpl : call to CGL.createContext requires generating CGL Panama bindings

  • WindowsWGLContext.createImpl : call to WGL.wglCreateContext requires generating WGL Panama bindings

  • X11GLXContext.createImpl : call to GLX.glXCreateContextrequires generating GLX Panama bindings

  • EGLContext.createImpl : call to EGL.EGL.eglMakeCurrent

  • What are external JOGL contexts? *ExternalContext inheriting each *Context?

  • What EGL is worth for?

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