Commit graph

162 commits

Author SHA1 Message Date
bjschnell
a5f1dfeb20 Replace JOGL with LWJGL 3 + forked rlawt; HD mode now works on macOS
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
2026-07-02 16:32:54 -07:00
psyopcutie
d29dd6f1b7 Final commit 2026-05-09 11:32:20 +02:00
Skalfate
3c07616fa8 Fixed some typos 2026-01-15 08:52:20 -07:00
Skalfate
8da1097d03 Fixed some typos 2026-01-15 01:59:06 -07:00
Skalfate
832a10a214 Some Code is documented with comments to help for better readability. 2026-01-15 01:56:36 -07:00
Skal Fate
ea2a7ae70d Merge branch rt4-client:master into HD-Mode_Fix_Windows 2026-01-15 01:36:10 -07:00
Skalfate
51b15b32d5 These changes fix the HD-Mode lag and crashes that happen when the client is launched into HD-Mode or when changing into HD-Mode..
In Windows, on first launch into HD-Mode or at launch going from SD-Mods to HD-Mode, the CPU maxes out and music issues, and is unable to enter into HD-Mode without lag or  multiple crashes.

This is because when the code that is supposed to execute GLProfile.initSingleton() waits for its turn on syncronized function queue and then a while loop keeps sleeping the thread until a status code of 1 is returned. Additionally, starting with jogl version 2.0 GLProfile.initSingleton() is not even necessary as its automatically done.

The code commented out has no purpose other than just to execute GLProfile.initSingleton().

Commented out the code and made comments to preserve the original code.
2026-01-07 22:36:57 -07:00
CuriouslyCurious
b8969cde39
Add sleep to game loop
This should ensure that the program does not hog up an entire CPU core just to get the current time.
2025-12-15 19:04:04 +01:00
downthecrop
cf5ccbf1ac undo some testing changes 2024-10-28 16:32:51 -07:00
downthecrop
1f1718d917 Keep the canvas in the frame but change the Z order 2024-10-27 08:10:38 -07:00
downthecrop
8180e20281 Removing debug from client + add print for unparented altcanvas 2024-10-26 22:33:54 -07:00
downthecrop
83fe4805ac GC issues + some late invokes 2024-10-26 09:59:25 -07:00
downthecrop
71afb2b385 greatly reduce flickering 2024-10-26 09:06:23 -07:00
downthecrop
4f8bf464c5 HD Resize redraw 2024-10-25 21:22:16 -07:00
downthecrop
b3c2adc51f support scaled fixed HD 2024-10-25 15:54:39 -07:00
downthecrop
668345b81e FIXED streched mode 2024-10-24 12:03:16 -07:00
downthecrop
6ec395bbcf Remove KondoKit dependency on XPGlobes 2024-09-15 00:44:13 +00:00
downthecrop
80960edaeb KondoKit v1.0 Plugin 2024-09-14 18:41:14 +00:00
ipkpjersi
47df7bd3d3 Added toggle resizeable SD plugin
This also fixes two CMEs, very cool.
2024-06-17 20:46:48 -04:00
downthecrop
5f527139b9 Add support for resizablesd / lowdetail with a new ::resizablesd command 2024-06-16 23:31:02 +09:00
ceikry
2051ba226c Revert sample rate buff 2024-06-08 14:24:11 -05:00
Ceikry
c89c2445c8 Merge branch 'customconfigarg' into 'master'
Add --config flag for passing custom config, add --help flag

See merge request 2009scape/rt4-client!17
2024-02-12 20:48:30 +00:00
dginovker
a87b92a25a Add --config flag for passing custom config, add --help flag 2024-01-21 13:47:55 +09:00
ipkpjersi
328e24e243 Removed specific AWT catch
It's better if we handle it here instead of bubbling the exception up the stack.
2024-01-06 16:13:18 -05:00
ipkpjersi
008324aa84 Removed extra whitespace 2024-01-06 16:12:29 -05:00
ipkpjersi
2079ec7459 Catch all exceptions for screenshots
This makes the code more reliable.
2024-01-06 16:12:16 -05:00
ipkpjersi
3762aed133 Cleaned up screenshot code 2024-01-06 16:11:34 -05:00
ipkpjersi
d52be460c6 Added check for screenshots 2024-01-06 16:10:51 -05:00
ipkpjersi
40b1fc47a6 Simplified the screenshot capturing
We don't actually need to capture the OpenGL buffer itself, this is fine. Also it simplifies the code a fair bit too, and as an added benefit we can also capture the entire window including the border/decorations etc.
2023-12-30 22:45:13 -05:00
ipkpjersi
ec65b9e947 Fixed formatting 2023-12-30 22:33:57 -05:00
ipkpjersi
6d2d8ad36d Added subfolders option
This allows for much greater flexibility of screenshotting, we can now pass in any number of levels of subfolders for our preferred directory depth for storing images.
2023-12-29 12:45:24 -05:00
ipkpjersi
4a5085380e Use correct directory for screenshots 2023-12-28 21:36:09 -05:00
ipkpjersi
2e2e3c2edc Added screenshot functionality to client 2023-12-27 21:19:29 -05:00
Ceikry
7957cdc8a6 Merge branch 'fps' into 'master'
Configurable FPS

See merge request 2009scape/rt4-client!14
2023-10-28 18:02:20 +00:00
Zerken
cf79528733 Holiday Login Music Plugin 2023-10-28 04:40:45 +00:00
Player Name
6b0f655434 Configurable FPS 2023-09-24 13:47:11 -04:00
bushtail
53dd5b1d92 Take stack sizes into account, deobfuscate anIntArray422 -> objectStackSizes 2023-08-19 18:14:27 -04:00
woahscam
3e45689d6e GL renaming, Rendering renaming 2023-06-29 16:37:38 -04:00
downthecrop
f4e2572b15 Add SceneGraph position to ScreenSpace position API method 2023-06-25 03:41:16 +09:00
zsrv
281d5e8db1 Fix combat level colors, rename variables 2023-06-11 20:11:50 -04:00
ceikry
311f9b1bdf Bring max tile dist back down 2023-06-08 05:46:53 -05:00
ceikry
6ae6b19e44 Improved client sample rate for audio from 22050 -> 44100 2023-06-07 11:05:30 -05:00
ceikry
150a7885dc Ironman icons support 2023-05-12 22:02:28 -05:00
ceikry
2281888e42 More branding, add CI 2023-05-05 17:12:33 -05:00
ceikry
1262d7cbd4 2009scape branding 2023-05-05 16:52:17 -05:00
Pazaz
7fc2498cc5 Identified some ClientProt packets 2023-01-23 00:02:43 -05:00
Ceikry
50d43b0a2f Made plugins reload when display mode changes 2022-12-02 07:47:29 -06:00
Ceikry
ec255eea52 Add API methods for controlling audio
Hook up Update() callback
Add Audio QOL plugin with mute/unmute hotkey and better settings persistence
2022-09-26 21:05:02 -05:00
Ceikry
7a7be2a54b Add API call for dispatching commands
Add Plugin for tab-to-reply command
2022-09-26 14:48:09 -05:00
Ceikry
b073365cd4 Add API calls for setting varcs, varbits, etc.
Add API support for arbitrary data storage
Add RememberMyLogin plugin
2022-09-25 19:54:54 -05:00