Commit ac67b20
ExternalTexture_OpenGL: implement GetInfo/Assign for GL texture handles
Implements the previously-stubbed OpenGL backend of the ExternalTexture
plugin. Mirrors the D3D11 backend pattern: per-API Impl class derived
from ImplBase, GetInfo/Assign/Ptr triplet, full bgfx<->GL format table.
Key details:
- 96-row s_textureFormat[] with static_assert against bgfx::TextureFormat::Count.
- All non-core extension constants (S3TC, BPTC, ASTC, BGRA, etc.) guarded
with #ifndef + OpenGL registry hex fallbacks so it compiles on minimal
Mesa GLES headers.
- Always sets BGFX_TEXTURE_RT (FBO bridging is the only supported use case;
GL has no introspection equivalent of D3D11 BIND_RENDER_TARGET).
- glIsTexture validation + pre/post-bind error drain; bounded mip walk;
GL_TEXTURE_BINDING_2D save/restore on every exit path.
- Throws on unsupported format rather than returning Unknown.
- MSAA explicitly unsupported for now (would need TEXTURE_2D_MULTISAMPLE +
GL_TEXTURE_SAMPLES query).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent af97986 commit ac67b20
1 file changed
Lines changed: 474 additions & 50 deletions
0 commit comments