-
Notifications
You must be signed in to change notification settings - Fork 32
Home
I'm writing this to give a bit of an explanation to how the project works so that it's easier for potential contributors to get a handle on how the whole project is laid out.
There are two projects here. One of them is wgpu-mc itself, and the other is Electrum, the Fabric mod which interfaces with Minecraft to make it use wgpu-mc instead of Blaze3D as its rendering engine.
This is the part of the mod that interfaces with Minecraft itself to hook into wgpu-mc using the Java Native Interface (JNI for short). Quite a bit of stuff happens here, but the high-level overview is:
- Disable Blaze3D and any code that calls or initializes LWJGL
- Hook into the important sections of the game and re-implement any missing core functionality to the game that was disabled by the first step.
- Generate a command queue for GUIs and upload to Rust this at the end of each frame
- Upload chunks and other game state data to the renderer whenever necessary
This is composed of three crates, the renderer, the JNI interface, and the demo (which is used for testing the renderer independent to Minecraft). The two important ones are the renderer (wgpu-mc crate) and the JNI interface (wgpu-mc-jni).
If you're not familiar with wgpu, I would recommend checking out the [https://sotrh.github.io/learn-wgpu/](Learn Wgpu) tutorial.
This happens because you're not logged in when running in dev mode - nothing to worry about, you just can't join any non-offline servers.
Known problem, just click "OK" and it will go away and launch the client.