renderdoc_jffm

Maven Central Maven Central (snapshot) Codecov Java Version

com.io7m.renderdoc_jffm

JVM Platform Status
OpenJDK (Temurin) Current Linux Build (OpenJDK (Temurin) Current, Linux)
OpenJDK (Temurin) LTS Linux Build (OpenJDK (Temurin) LTS, Linux)
OpenJDK (Temurin) Current Windows Build (OpenJDK (Temurin) Current, Windows)
OpenJDK (Temurin) LTS Windows Build (OpenJDK (Temurin) LTS, Windows)

renderdoc_jffm

A Java interface to the RenderDoc API.

Features

  • A friendly Java interface to the RenderDoc API.
  • JPMS-ready.
  • ISC license.

Usage

When running your application, you must allow access to the FFM API for the module com.io7m.renderdoc_jffm.core:

$ java --enable-native-access=com.io7m.renderdoc_jffm.core ...

Run your application from RenderDoc. RenderDoc works by injecting a native library into your application. Then, inside your application, call RenderDoc.open():

try (final var doc = RenderDoc.open()) {
  ...
}

The obtained RenderDocType interface is a type-safe, memory-safe interface to the API exposed by the RenderDoc native library. The interface allows for setting options and triggering captures.

The open() method will raise an IOException with a useful error message if the renderdoc native library is not present in the current application process.

LD_LIBRARY_PATH

It may be necessary on some systems (notably Fedora Linux) to set the LD_LIBRARY_PATH environment variable. It seems that some packaging systems place renderdoc into its own subdirectory under /lib64:

$ file /lib64/renderdoc/librenderdoc.so
/lib64/renderdoc/librenderdoc.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c8dcf24af968317d361ea1bb021f8a5919fefb1f, stripped

The Java FFM API will use the system's default library path, and this tends not to contain /lib64/renderdoc on those systems.

$ export LD_LIBRARY_PATH=/lib:/lib64:/lib64/renderdoc