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

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.

License

NotificationsYou must be signed in to change notification settings

LWJGL/lwjgl3

Repository files navigation

Maven CentralAPI JavadocLicense

SizeBuild Status

LWJGL - Lightweight Java Game Library 3

LWJGL (https://www.lwjgl.org) is a Java library that enables cross-platformaccess to popular native APIs useful in the development of graphics(OpenGL/Vulkan), audio (OpenAL) and parallel computing (OpenCL) applications.This access is direct and high-performance, yet also wrapped in a type-safeand user-friendly layer, appropriate for the Java ecosystem.

LWJGL is an enabling technology and provides low-level access. It is not aframework and does not provide higher-level utilities than what the nativelibraries expose. As such, novice programmers are encouraged to try one ofthe frameworks or game engines that make use of LWJGL, before workingdirectly with the library.

LWJGL is open source software and freely available at no charge.

Useful links:

Contact:

If you'd like to contribute, seedoc/READMEfor a quick overview of the project structure, installation instructions andconfiguration options.

Getting Started

As of version3.1.0, LWJGL is distributed as a set of modules. Only thecore module is required and all bindings are optional (but some bindingsdepend on other bindings). The easiest way to download LWJGL is to use thebuild configurator on the website.

The build configurator generatesMaven & Gradle declarations that can beadded to existing projects. This is the easiest way to use LWJGL whiledeveloping.

LWJGL can also be downloaded as a simple set of JAR files. Each moduleconsists of the following files:

  • lwjgl-<module>.jar
  • lwjgl-<module>-sources.jar
  • lwjgl-<module>-javadoc.jar
  • lwjgl-<module>-natives-<platform>.jar (for some bindings)

To compile and run an LWJGL application, the base and natives JAR files ofthe core module and each binding used should be added to the classpath. LWJGLextracts the natives to a temporary folder and loads them automatically, sono further configuration is necessary. If more customization is required(e.g. when creating a platform-specific installer) the natives may beextracted manually and loaded viajava.library.path. See theConfigurationclass for more options.

LWJGL 3 requires Java 8 or later to build and run and currently supports thefollowing platforms/architectures:

  • FreeBSD x64
  • Linux x64
  • Linux arm64 (ARMv8/AArch64)
  • Linux arm32 (ARMv7/armhf)
  • Linux ppc64le
  • Linux riscv64
  • macOS x64
  • macOS arm64
  • Windows x64
  • Windows x86
  • Windows arm64

Example code:

For migrating LWJGL 2 code to LWJGL 3, see theMigration Guide.

Troubleshooting

Most common issues faced by LWJGL users are trivially addressed with thefollowing:

LWJGLX/debug is a Java Agent that willautomatically detect a lot of these issues. It can also generate a trace logthat's useful when reporting issues to LWJGL.

When asking for help or when you suspect a bug in LWJGL, preparing anMVCE(Minimal, Complete, and Verifiable example) that reproduces the issue willimprove the chances of a quick and useful response.

List of Supported Bindings

Khronos APIs

LibraryDescription
EGLAn interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system.
KTX (Khronos Texture)A lightweight container for textures for OpenGL®, Vulkan® and other GPU APIs.
OpenCLAn open, royalty-free standard for cross-platform, parallel programming of diverse processors found in personal computers, servers, mobile devices and embedded platforms.
OpenGLThe most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms.
OpenGL ESA royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems - including consoles, phones, appliances and vehicles.
OpenXRA royalty-free, open standard that provides high-performance access to Augmented Reality (AR) and Virtual Reality (VR)—collectively known as XR—platforms and devices.
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.
SDLSimple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL/Direct3D/Metal/Vulkan.
JAWTThe AWT native interface.
Native File Dialog ExtendedA small C library that portably invokes native file open, folder select and file save dialogs.
tinyfdA native dialog library.

Audio

LibraryDescription
FMODAn end-to-end solution for adding sound and music to any game.
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.
OpusA totally open, royalty-free, highly versatile audio codec.

Graphics

LibraryDescription
AssimpA portable Open Source library to import various well-known 3D model formats in a uniform manner.
bgfxCross-platform, graphics API agnostic, “Bring Your Own Engine/Framework” style rendering library, licensed under permissive BSD-2 clause open source license.
FreeTypeA freely available software library to render fonts.
HarfBuzzA text shaping library that allows programs to convert a sequence of Unicode input into properly formatted and positioned glyph output — for any writing system and language.
meshoptimizerA mesh optimization library that makes meshes smaller and faster to render.
msdfgenA multi-channel signed distance field generator.
NanoSVGA simple stupid SVG parser.
NanoVGA small antialiased vector graphics rendering library for OpenGL.
NuklearA minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain.
par_octasphereGenerates triangle meshes for spheres, rounded boxes, and capsules.
par_shapesGenerate parametric surfaces and other simple shapes.
par_streamlinesTriangulate wide lines and curves.
ShadercA collection of libraries for shader compilation.
SPIRV-CrossA library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Tiny OpenEXRA small, single header-only library to load and save OpenEXR(.exr) images.
Vulkan Memory AllocatorAn easy to integrate Vulkan memory allocation library.
YogaAn open-source, cross-platform layout library that implements Flexbox.

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_resizeResize 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
hwlocA portable abstraction of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading.
jemallocA general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support.
libffiA portable, high level programming interface to various calling conventions.
LLVMA collection of modular and reusable compiler and toolchain technologies.
LMDBAn extraordinarily fast, memory-efficient database. With memory-mapped files, it has the read performance of a pure in-memory database while retaining the persistence of standard disk-based databases.
LZ4A lossless data compression algorithm that is focused on compression and decompression speed.
ODBCA C programming language interface that makes it possible for applications to access data from a variety of database management systems (DBMSs).
RemoteryA realtime CPU/GPU profiler hosted in a single C file with a viewer that runs in a web browser.
rpmallocA public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C.
xxHashAn Extremely fast Hash algorithm, running at RAM speed limits.
Zstandard (zstd)A fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios.

Use of a binding is subject to the terms of thecorresponding license.

Supporting this project

LWJGL exists thanks toall the people whocontribute and donate to our collective.

About

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    [8]ページ先頭

    ©2009-2025 Movatter.jp