Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Overrun Game Library is a high-performance library implemented with Java 23, enables cross-platform access to a set of C/C++ library bindings, and provides some useful utilities.

License

NotificationsYou must be signed in to change notification settings

Over-Run/overrungl

Repository files navigation

License

Maven CentralSonatype Nexus (Snapshots)

Java CI with GradleOpenSSF Best Practices

Overview

voidmain() {// invoke native functions via static methodsglfwInit();// use MemorySegment to represent memory addressesMemorySegmentwindow =glfwCreateWindow(800,600,// use MemoryUtil::allocString to allocate string and manage by GCMemoryUtil.allocString("Title"),MemorySegment.NULL,MemorySegment.NULL    );intwidth,height;// use MemoryStack for one-time and quick allocationtry (varstack =MemoryStack.pushLocal()) {// use SegmentAllocator to allocate memoryvarpWidth =stack.allocate(ValueLayout.JAVA_INT);varpHeight =stack.allocate(ValueLayout.JAVA_INT);glfwGetFramebufferSize(window,pWidth,pHeight);// use accessors in MemorySegment to read and write memorywidth =pWidth.get(ValueLayout.JAVA_INT,0L);height =pHeight.get(ValueLayout.JAVA_INT,0L);    }// for OpenGL, create instance of wrappersvargl =newGL(GLFW::glfwGetProcAddress);// invoke OpenGL functions via instance methodsgl.ClearColor(0.0f,0.0f,0.0f,1.0f);}

Introduction

Overrun Game Library is a high-performance library implemented with Java 23,which enables cross-platform access to a set of C/C++ library bindings, providing various useful utilities.

Comparing with LWJGL 3

LWJGL 3 is also a Java library that enables cross-platform access.

LWJGL 3 uses JNI to access native functions, in OverrunGL, however,theFFM API is used, which makes the linking to native functions more convenientas well as providing better memory management.

Getting Started

You can check ourwiki orthesamples.

Checkdiscussions in case you have trouble in setup works, such as environment configuring.

Feel free to ask questions as long as you have searched in discussions and found no one had the same question.

Import as a Dependency

We provided a modules customizerhere.

  • Platform Maven coordinate:io.github.over-run:overrungl-bom
  • Core module Maven coordinate:io.github.over-run:overrungl
  • For others:io.github.over-run:overrungl-<module-name>

For example:

dependencies {    implementation(platform("io.github.over-run:overrungl-bom:<VERSION>"))    implementation("io.github.over-run:overrungl")    implementation("io.github.over-run:overrungl-glfw")}

Using -SNAPSHOT Versions

We publish-SNAPSHOT versions frequently.

For-SNAPSHOT versions, you can checkthelist of available versionsand include this maven repository:

repositories {    maven("https://s01.oss.sonatype.org/content/repositories/snapshots")}

Enable native access

You must enable the access to restricted methods by adding a VM argument or a manifest attribute.The customizer has already included this.

--enable-native-access=overrungl.core,...

List of Supported Bindings

Khronos APIs

LibraryDescription
OpenGLThe most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms.
VulkanA new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

Display and Input

LibraryDescription
GLFWCreate multiple windows, handle user input (keyboard, mouse, gaming peripherals) and manage contexts. Also features multi-monitor support, clipboard access, file drag-n-drop, andmuch more.
Native File Dialog ExtendedA small C library that portably invokes native file open, folder select and file save dialogs.

Audio

LibraryDescription
OpenALA cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications.
OpenAL SoftAn LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.

stb - single-file public domain libraries for C/C++

LibraryDescription
stb_easy_fontQuick-and-dirty easy-to-deploy bitmap font for printing frame rate, etc.
stb_imageImage loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC
stb_image_resize2Resize images larger/smaller with good quality.
stb_image_writeImage writing to disk: PNG, TGA, BMP
stb_perlinRevised Perlin noise (3D input, 1D output).
stb_rect_packSimple 2D rectangle packer with decent quality.
stb_truetypeParse, decode, and rasterize characters from truetype fonts.
stb_vorbisDecode ogg vorbis files from file/memory to float/16-bit signed output.

Other

LibraryDescription
JOMLA Java math library for OpenGL rendering calculations

Release Notes

Seedoc/notes.

Additional

The latest Javadoc can be foundhere.

Credits

JetBrains Logo (Main) logo.

About

Overrun Game Library is a high-performance library implemented with Java 23, enables cross-platform access to a set of C/C++ library bindings, and provides some useful utilities.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp