ResourceThreadGL3
A specialized implementation of the ResourceThread
interface tailored for use with OpenGL or OpenGL ES.
ResourceThreadGL3
is used to initialize and manage a dedicated rendering context in a separate thread. This ensures that OpenGL-related resources can be managed independently without interfering with the primary graphics thread.
This class manages the creation of a hidden GLFW window and sets up an OpenGL or OpenGL ES context depending on the driver's configuration. Resources are processed within the thread, and a default render target (NullRenderTargetGL3
) is used for binding. This ensures a consistent and isolated environment for resource operations.
The create
function sets thread-specific properties, initializes OpenGL/GLES capabilities, and invokes the provided lambda (f
) within the resource processing thread. Cleanup of the created context and GLFW window is handled automatically after the lambda finishes execution.