mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWeb/WebGL: Map DEPTH_STENCIL to DEPTH24_STENCIL8 for WebGL 1 too
This commit is contained in:
parent
55f7cb4f10
commit
d13dd76818
Notes:
github-actions[bot]
2025-01-21 20:37:29 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/d13dd76818d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3239 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/kalenikaliaksandr
1 changed files with 13 additions and 1 deletions
|
@ -1548,10 +1548,22 @@ public:
|
|||
if (function.name == "renderbufferStorage"sv) {
|
||||
// To be backward compatible with WebGL 1, also accepts internal format DEPTH_STENCIL, which should be
|
||||
// mapped to DEPTH24_STENCIL8 by implementations.
|
||||
if (webgl_version == 2) {
|
||||
if (webgl_version == 1) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
#define GL_DEPTH_STENCIL 0x84F9
|
||||
#define GL_DEPTH24_STENCIL8 0x88F0
|
||||
)~~~");
|
||||
}
|
||||
|
||||
function_impl_generator.append(R"~~~(
|
||||
if (internalformat == GL_DEPTH_STENCIL)
|
||||
internalformat = GL_DEPTH24_STENCIL8;
|
||||
)~~~");
|
||||
|
||||
if (webgl_version == 1) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
#undef GL_DEPTH_STENCIL
|
||||
#undef GL_DEPTH24_STENCIL8
|
||||
)~~~");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue