Interface ImmediateWindowProvider
- All Superinterfaces:
EarlyLoadingScreenController
This is for allowing the plugging in of alternative early display implementations.
They can be selected through the config value "earlyWindowProvider" which defaults to "fmlearlywindow".
There are a few key things to keep in mind if following through on implementation. You cannot access the game state as it
literally DOES NOT EXIST at the time this object is constructed. You have to be very careful about managing the handoff
to mojang, be sure that if you're trying to tick your window in a background thread (a nice idea!) that you properly
transition to the main thread before handoff is complete. Do note that in general, you should construct your GL objects
on the MAIN thread before starting your ticker, to ensure MacOS compatibility.
No doubt many more things can be said here.
-
Method Summary
Methods inherited from interface net.neoforged.fml.loading.EarlyLoadingScreenController
completeProgress, periodicTick, takeOverGlfwWindow, updateProgress
-
Method Details
-
name
String name()- Returns:
- The name of this window provider. Do NOT use fmlearlywindow.
-
initialize
This is called very early on to initialize ourselves. Use this to initialize the window and other GL core resources. One thing we want to ensure is that we try and create the highest GL_PROFILE we can accomplish. GLFW_CONTEXT_VERSION_MAJOR,GLFW_CONTEXT_VERSION_MINOR should be as high as possible on the created window, and it should have all the typical profile settings.- Parameters:
arguments
- The arguments provided to the Java process. This is the entire command line, so you can process stuff from it.- Returns:
- A runnable that will be periodically ticked by FML during startup ON THE MAIN THREAD. This is usually a good place to put glfwPollEvents() tests.
-
crash
This is called during some very early startup routines to show a crash dialog using e.g. tinyfd dialogs- Parameters:
message
- The message to display
-