HD rendering previously required JOGL, whose macOS support was broken two
ways: the bundled natives are x86_64-only (UnsatisfiedLinkError on Apple
Silicon), and its AWT/CALayer presentation path never composites the GL
output (black window), on top of requesting a GL3bc profile macOS does not
offer. This replaces the whole windowing/GL layer:
* rlawt (RuneLite's AWT-GL bridge, BSD-2) vendored under rlawt/ with two
macOS patches: request the Legacy (2.1 compatibility) profile instead of
GL4 core, since this renderer is fixed-function + ARB assembly programs,
and attach a GL_DEPTH_COMPONENT24 renderbuffer to the IOSurface-backed
framebuffers (RuneLite renders depth-free; this client needs a Z-buffer).
Universal arm64+x86_64 dylib built by rlawt/build-macos.sh; Windows/Linux
ship unmodified upstream rlawt natives, whose contexts are already
compatibility-profile.
* New rt4.GL2 shim exposes JOGL's GL2 instance API over LWJGL 3 statics, so
the ~950 existing gl.glXxx call sites across 26 renderer files stay
untouched (they only lose their com.jogamp import). The shim bridges the
API differences: array+offset overloads, heap-buffer uploads copied to a
scratch direct buffer, glTexStorage2D emulation on pre-4.2 contexts,
glGenerateMipmap EXT fallback, extension queries, and vsync control.
* GlRenderer context lifecycle rewritten on AWTContext: synchronous init,
and the rotated IOSurface back-FBO is re-bound after every swap on macOS.
The old createAndDestroyContext JOGL surface-reset hack is now a no-op.
* The CS2 detail-mode auto-revert ("The change of detail mode has been
cancelled") no longer triggers: it raced JOGL's slow retry-looped init,
and rlawt's init completes synchronously before the script's readback.
Verified in-game on Apple Silicon with a native arm64 JVM (no Rosetta):
SD unchanged, HD switches and renders with no black screen and no revert.
Windows/Linux are compile-checked; runtime behavior should match JOGL's
(same GL calls on a compatibility context) but has not been re-tested.
Also lifts the old "Java 15 or lower" JOGL/WGL restriction on Windows.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PDSjdSB4Hwa53cmLg47pq3
|
||
|---|---|---|
| .github/workflows | ||
| client | ||
| deob-annotations | ||
| gradle/wrapper | ||
| lib | ||
| playground | ||
| plugin-playground | ||
| ref | ||
| rlawt | ||
| signlink | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| build.gradle | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle | ||
Goals
- Identify all classes
- Create new static classes by grouping related members
- Identify all methods
- Identify all fields
- Identify all local variables
- Remove any remaining obfuscation (possibly none left)
- Fix poor decompiler behavior (fernflower)
- Replace magic numbers and bitmasks with named final fields
- Refactor code to improve behavior/readability
- Modernize code/libraries (High DPI support, modern refresh rates, ...)
- Support existing servers via global config flags that adjust packet behaviors
- Organize classes into packages
OpenRS2 annotations are left in the source to build a deob map from, in case some of my changes aren't desirable.
That mapping can be used to generate a new deob with everything renamed for you.
Instructions
Build requirements:
- Java 8+
Runtime requirements:
- SD: Java 8+
- HD on Windows: Java 8+
- HD on Linux: Java 8+
- HD on macOS: Java 8+, works natively on both Apple Silicon (arm64) and Intel.
HD rendering uses LWJGL 3 with a forked rlawt
(RuneLite's AWT-GL bridge) for windowing — see rlawt/ for the fork and its build
script. The JOGL-era caveats (no macOS support, Java 15 ceiling on Windows) no
longer apply. Verified on macOS/Apple Silicon; the Windows/Linux paths use the
same port with upstream rlawt natives but have not been runtime-tested since the
switch from JOGL.
git clone https://github.com/Pazaz/RT4-Client.git
cd RT4-Client
./gradlew run
You will be connected to a test server automatically.
This server is provided by 2009scape for their own internal developments.
Deviations
Configurable:
- Packet behaviors to make it compatible with existing servers
- View distance in HD
- Bilinear map filtering in HD/SD
- Tweening enabled by default (existed in client)
- Shift-click behavior on inventory items enabled by default (existed in client)
Unconfigurable:
- JOGL was updated to 2.4.0
- Update/render loop was decoupled to tick indepedently from each other
- Camera panning input rewritten to use render loop timing
- Varp array size was extended to 3500 instead of 2500
- Mouse wheel camera movement (click middle button and move mouse)
- Render FPS is set to your monitor's refresh rate
Libraries Used
- JOGL/Gluegen 2.4.0rc
- Google Gson 2.9.0