Route VR texture state through GL dispatch
This commit is contained in:
@@ -437,8 +437,8 @@ Known local toolchain state:
|
||||
counts so automation can assert backend interpretation without an OpenGL
|
||||
context.
|
||||
Desktop VR drawing also consumes backend-owned scissor/depth/blend state,
|
||||
blend/depth state query-restore, depth clear masks, active texture units,
|
||||
and fallback 2D texture unbind targets; VR SDK start/stop now dispatches
|
||||
blend/depth state query-restore, depth clear masks, active texture unit
|
||||
dispatch, and fallback 2D texture unbind dispatch; VR SDK start/stop now dispatches
|
||||
through `PlatformServices` while retaining the existing Windows OpenVR bridge
|
||||
shape.
|
||||
Canvas mode overlay, mask, and transform paths also consume backend-owned
|
||||
|
||||
@@ -23,7 +23,9 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
tested `pp_renderer_gl` capability-state dispatch; CanvasLayer equirect
|
||||
export now binds cube textures through tested `pp_renderer_gl` dispatch; and
|
||||
`Font` text drawing now activates texture units through tested
|
||||
`pp_renderer_gl` dispatch. The debt remains open for live stroke
|
||||
`pp_renderer_gl` dispatch. Desktop VR drawing also now routes active texture
|
||||
unit switches and fallback 2D texture unbinds through tested `pp_renderer_gl`
|
||||
dispatch. The debt remains open for live stroke
|
||||
rasterization, dual-brush compositing, pattern feedback math, thumbnail layer
|
||||
compositing, brush-preview compositing, and retained `ShaderManager::ext_*`
|
||||
compatibility fields.
|
||||
|
||||
@@ -798,9 +798,10 @@ VR UI framebuffer viewport and scissor-test setup now also consumes those
|
||||
`pp_renderer_gl` contracts, keeping desktop and VR UI rendering aligned while
|
||||
the retained OpenVR app path is split incrementally.
|
||||
VR draw blend/depth state snapshots, transitions, restore, and depth-buffer
|
||||
clears now use generic tested `pp_renderer_gl` capability query/apply and clear
|
||||
dispatch contracts, reducing direct OpenGL execution in the retained VR app
|
||||
path without changing state restore behavior.
|
||||
clears, active texture unit switches, and fallback 2D texture unbinds now use
|
||||
generic tested `pp_renderer_gl` capability query/apply, clear, active-texture,
|
||||
and texture-bind dispatch contracts, reducing direct OpenGL execution in the
|
||||
retained VR app path without changing state restore behavior.
|
||||
The retained `gl_state` save/restore utility now snapshots and restores through
|
||||
tested `pp_renderer_gl` saved-state dispatch contracts, covering capability
|
||||
state, viewport, clear color, framebuffer/program bindings, active texture,
|
||||
@@ -2034,7 +2035,7 @@ Results:
|
||||
wrapper and compiled headless foundation/tool/test targets.
|
||||
- Desktop VR drawing now routes generic OpenGL scissor/depth/blend state,
|
||||
blend/depth state snapshots and restores, depth clears, active texture units,
|
||||
and fallback 2D texture unbinds through the renderer GL backend mapping;
|
||||
and fallback 2D texture unbinds through tested renderer GL backend dispatch;
|
||||
platform VR SDK bridges remain isolated for later platform-shell extraction.
|
||||
Eye framebuffer viewport execution in the retained HMD path also routes
|
||||
through tested `pp_renderer_gl` viewport dispatch.
|
||||
|
||||
@@ -11,12 +11,30 @@ namespace {
|
||||
|
||||
void set_active_texture_unit(std::uint32_t unit_index)
|
||||
{
|
||||
glActiveTexture(pp::renderer::gl::active_texture_unit(unit_index));
|
||||
const auto status = pp::renderer::gl::activate_opengl_texture_unit(
|
||||
unit_index,
|
||||
pp::renderer::gl::OpenGlActiveTextureDispatch {
|
||||
.active_texture = [](std::uint32_t texture_unit) noexcept
|
||||
{
|
||||
glActiveTexture(static_cast<GLenum>(texture_unit));
|
||||
},
|
||||
});
|
||||
if (!status.ok())
|
||||
LOG("OpenGL VR active texture dispatch failed: %s", status.message);
|
||||
}
|
||||
|
||||
void unbind_texture_2d()
|
||||
{
|
||||
glBindTexture(pp::renderer::gl::texture_2d_target(), 0);
|
||||
const auto status = pp::renderer::gl::bind_opengl_texture_2d(
|
||||
0U,
|
||||
pp::renderer::gl::OpenGlTexture2DBindDispatch {
|
||||
.bind_texture = [](std::uint32_t target, std::uint32_t texture) noexcept
|
||||
{
|
||||
glBindTexture(static_cast<GLenum>(target), static_cast<GLuint>(texture));
|
||||
},
|
||||
});
|
||||
if (!status.ok())
|
||||
LOG("OpenGL VR texture unbind dispatch failed: %s", status.message);
|
||||
}
|
||||
|
||||
void enable_opengl_state(std::uint32_t state) noexcept
|
||||
|
||||
Reference in New Issue
Block a user