mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-18 05:12:09 +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
|
## Instantaneous rendering
|
||||||
*This type of rendering should be done if you plan on rarely updating the map.*
|
*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.
|
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.
|
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`.
|
The map colors are available via `Framebuffer#toMapColors()` if you do not use `Framebuffer#preparePacket`.
|
||||||
|
Loading…
Reference in New Issue
Block a user