Search code examples
javagraphicslwjgl

JComponent equivalent in LWJGL 3


I've been wondering if there's a class in LWJGL 3 similar to JComponent that I can import and use for a game character. I know that Blender models can be imported easily, but I'm wondering if there's a way for an class to extend some overarching LWJGL class, overriding some method in order to display as a 3D object (in the same way a class might extend JComponent and override paintComponent(Graphics)). LWJGL 3 doesn't yet support Swing/AWT, so I can't use actual JComponents like I used to. Thanks for the help!


Solution

  • No. LWJGL is GLFW(for opening windows), OpenGL(for using the graphics card) and OpenAL(for sound) for Java. You'll have to learn OpenGL and write some GLSL shaders to get anything drawn.