LWJGLX/lwjgl3-awt


License

License

Categories

Categories

LWJGL Business Logic Libraries
GroupId

GroupId

org.lwjglx
ArtifactId

ArtifactId

lwjgl3-awt
Last Version

Last Version

0.1.8
Release Date

Release Date

Type

Type

jar
Description

Description

LWJGLX/lwjgl3-awt
LWJGLX/lwjgl3-awt
Project Organization

Project Organization

LWJGLX
Source Code Management

Source Code Management

https://github.com/LWJGLX/lwjgl3-awt

Download lwjgl3-awt

How to add to project

<!-- https://jarcasting.com/artifacts/org.lwjglx/lwjgl3-awt/ -->
<dependency>
    <groupId>org.lwjglx</groupId>
    <artifactId>lwjgl3-awt</artifactId>
    <version>0.1.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.lwjglx/lwjgl3-awt/
implementation 'org.lwjglx:lwjgl3-awt:0.1.8'
// https://jarcasting.com/artifacts/org.lwjglx/lwjgl3-awt/
implementation ("org.lwjglx:lwjgl3-awt:0.1.8")
'org.lwjglx:lwjgl3-awt:jar:0.1.8'
<dependency org="org.lwjglx" name="lwjgl3-awt" rev="0.1.8">
  <artifact name="lwjgl3-awt" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.lwjglx', module='lwjgl3-awt', version='0.1.8')
)
libraryDependencies += "org.lwjglx" % "lwjgl3-awt" % "0.1.8"
[org.lwjglx/lwjgl3-awt "0.1.8"]

Dependencies

compile (4)

Group / Artifact Type Version
org.lwjgl : lwjgl jar 3.2.3
org.lwjgl : lwjgl-jawt jar 3.2.3
org.lwjgl : lwjgl-opengl Optional jar 3.2.3
org.lwjgl : lwjgl-vulkan Optional jar 3.2.3

test (5)

Group / Artifact Type Version
org.lwjgl : lwjgl jar 3.2.3
org.lwjgl : lwjgl-opengl jar 3.2.3
org.junit.jupiter : junit-jupiter-api jar 5.7.0
org.junit.jupiter : junit-jupiter-engine jar 5.7.0
com.github.romankh3 : image-comparison jar 4.3.0

Project Modules

There are no modules declared in this project.

Build-and-publish Actions Status Maven Central Maven Snapshot

What is it?

OpenGL and Vulkan support for AWT with LWJGL 3.

What does it get me?

Support for OpenGL:

  • creating OpenGL 3.0 and 3.2 core/compatibility contexts (including debug/forward compatible)
  • OpenGL ES contexts
  • floating-point and sRGB pixel formats
  • multisampled framebuffers (also with different number of color samples - Nvidia only)
  • v-sync/swap control
  • context flush control
  • robust buffer access (with application/share-group isolation)
  • sync'ing buffer swaps over multiple windows and cards - Nvidia only
  • delay before swap - Nvidia only

Why does it exist?

Because there is currently no other way to use OpenGL or Vulkan with AWT.

How to use it with OpenGL?

In order to create an OpenGL 3.3 core profile context with 4 sample MSAA, use:

JFrame frame = new JFrame("AWT test");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setLayout(new BorderLayout());
GLData data = new GLData();
data.majorVersion = 3;
data.minorVersion = 3;
data.profile = GLData.Profile.CORE;
data.samples = 4;
frame.add(new AWTGLCanvas(data) {
  public void initGL() {
  }
  public void paintGL() {
  }
});

How to use it with Vulkan?

JFrame frame = new JFrame("AWT test");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setLayout(new BorderLayout());
VkInstance instance = ...; // <- Vulkan instance created somewhere else
VKData data = new VKData();
data.instance = instance; // <- set Vulkan instance
frame.add(new AWTVKCanvas(data) {
    public void initVK() {
        long surface = this.surface;
        // Do something with surface...
    }
    public void paintVK() {
    }
});

How to rebuild the MacOS native library

gcc -dynamiclib lwjgl3awt/*.m -o native/macosx/liblwjgl3awt.dylib -framework CoreFoundation -framework AppKit -framework MetalKit -framework Metal 
org.lwjglx

LWJGLX

Addons and extensions to LWJGL

Versions

Version
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0