mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-25 03:55:11 +01:00
Updated GLFWMapRendering (markdown)
parent
2b0a1cd4e2
commit
7503a503c8
@ -21,6 +21,7 @@ You must be aware that this creates a new GLFW context and a new window. It is p
|
||||
|
||||
## Instantaneous rendering
|
||||
*This type of rendering should be done if you plan on rarely updating the map.*
|
||||
|
||||
Start by calling `GLFWCapableBuffer#changeRenderingThreadToCurrent()` to bind the rendering context to the current thread.
|
||||
Then call `GLFWCapableBuffer#render(Runnable)` to render your content. This will call the `Runnable` argument, swap the invisible window buffer, extract the framebuffer pixels and convert to map colors.
|
||||
The map colors are available via `Framebuffer#toMapColors()` if you do not use `Framebuffer#preparePacket`.
|
||||
|
Loading…
Reference in New Issue
Block a user