Connect LWJGL to JComponent?
The title pretty much says it all. I want LWJGL to draw to a component in my JFrame, instead of a GLFW window. What's the most efficient way I can make this work, if it is possible? Thank you in advance.
4 Replies
⌛
This post has been reserved for your question.
Hey @The Typhothanian! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Code:
import com.jogamp.opengl.*;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.awt.GLJPanel;
import javax.swing.JFrame;
Gradle Imports:
implementation 'org.jogamp.jogl:jogl-all-main:2.3.2'
implementation 'org.jogamp.gluegen:gluegen-rt-main:2.3.2'
It uses JOGL instead of LWJGL, but all I needed was to draw polygons, so whatever.
This message has been formatted automatically. You can disable this using
/preferences
.ugh. auto format. well, it is good enough
Post Closed
This post has been closed by <@801145088830210129>.