From 523ad72f60b3749d471d285b3db55033c7fc79b9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Nov 2025 03:15:06 +0000 Subject: [PATCH 1/4] Initial plan From 09ef10b6badfad16bf87223a9a61576ed3540afc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Nov 2025 03:25:34 +0000 Subject: [PATCH 2/4] Implement WebGL2 framebufferTextureLayer function - Add FRAMEBUFFER_TEXTURE_LAYER command buffer request to macros - Implement FramebufferTextureLayerCommandBufferRequest class - Implement framebufferTextureLayer C++ backend method - Add JavaScript binding for framebufferTextureLayer - Add OpenGL renderer handler for framebufferTextureLayer - Pass C++ formatting checks Co-authored-by: EndlessJour9527 <155411404+EndlessJour9527@users.noreply.github.com> --- src/client/graphics/webgl_context.cpp | 7 +- .../script_bindings/webgl/active_info.cpp | 2 +- .../script_bindings/webgl/active_info.hpp | 2 +- .../script_bindings/webgl/framebuffer.cpp | 2 +- .../script_bindings/webgl/framebuffer.hpp | 2 +- src/client/script_bindings/webgl/object.cpp | 2 +- src/client/script_bindings/webgl/object.hpp | 2 +- src/client/script_bindings/webgl/program.cpp | 2 +- src/client/script_bindings/webgl/program.hpp | 2 +- .../script_bindings/webgl/renderbuffer.cpp | 2 +- .../script_bindings/webgl/renderbuffer.hpp | 2 +- src/client/script_bindings/webgl/texture.cpp | 2 +- src/client/script_bindings/webgl/texture.hpp | 2 +- .../webgl/uniform_location.cpp | 2 +- .../webgl/uniform_location.hpp | 2 +- .../script_bindings/webgl/vertex_array.cpp | 2 +- .../script_bindings/webgl/vertex_array.hpp | 2 +- .../webgl/webgl2_rendering_context.cpp | 77 +++++++++++++++++++ .../webgl/webgl2_rendering_context.hpp | 1 + src/common/command_buffers/details/buffer.hpp | 46 +++++++++++ src/common/command_buffers/macros.hpp | 1 + src/renderer/render_api_opengles.cpp | 18 +++++ 22 files changed, 165 insertions(+), 17 deletions(-) diff --git a/src/client/graphics/webgl_context.cpp b/src/client/graphics/webgl_context.cpp index 9e60d485b..2893b4cc0 100644 --- a/src/client/graphics/webgl_context.cpp +++ b/src/client/graphics/webgl_context.cpp @@ -1936,7 +1936,12 @@ namespace endor int level, int layer) { - NOT_IMPLEMENTED(); + auto req = FramebufferTextureLayerCommandBufferRequest(static_cast(target), + static_cast(attachment), + texture != nullptr ? texture->id : 0, + level, + layer); + sendCommandBufferRequest(req); } string WebGL2Context::getActiveUniformBlockName(shared_ptr program, int uniformBlockIndex) diff --git a/src/client/script_bindings/webgl/active_info.cpp b/src/client/script_bindings/webgl/active_info.cpp index c0f9d3e81..803ffe763 100644 --- a/src/client/script_bindings/webgl/active_info.cpp +++ b/src/client/script_bindings/webgl/active_info.cpp @@ -60,5 +60,5 @@ namespace endor } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/active_info.hpp b/src/client/script_bindings/webgl/active_info.hpp index b125c893c..c2d6c9080 100644 --- a/src/client/script_bindings/webgl/active_info.hpp +++ b/src/client/script_bindings/webgl/active_info.hpp @@ -38,5 +38,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/framebuffer.cpp b/src/client/script_bindings/webgl/framebuffer.cpp index dbe790869..d38e0687c 100644 --- a/src/client/script_bindings/webgl/framebuffer.cpp +++ b/src/client/script_bindings/webgl/framebuffer.cpp @@ -31,5 +31,5 @@ namespace endor { } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/framebuffer.hpp b/src/client/script_bindings/webgl/framebuffer.hpp index c54189e65..fd3ab4ec2 100644 --- a/src/client/script_bindings/webgl/framebuffer.hpp +++ b/src/client/script_bindings/webgl/framebuffer.hpp @@ -37,5 +37,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/object.cpp b/src/client/script_bindings/webgl/object.cpp index b03f846b5..78779213d 100644 --- a/src/client/script_bindings/webgl/object.cpp +++ b/src/client/script_bindings/webgl/object.cpp @@ -28,5 +28,5 @@ namespace endor // WebGLObject is a base class, typically not instantiated directly } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/object.hpp b/src/client/script_bindings/webgl/object.hpp index cd48b93ae..f69bb78c8 100644 --- a/src/client/script_bindings/webgl/object.hpp +++ b/src/client/script_bindings/webgl/object.hpp @@ -45,5 +45,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/program.cpp b/src/client/script_bindings/webgl/program.cpp index e4a68a6f8..8c21d7e26 100644 --- a/src/client/script_bindings/webgl/program.cpp +++ b/src/client/script_bindings/webgl/program.cpp @@ -20,5 +20,5 @@ namespace endor } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/program.hpp b/src/client/script_bindings/webgl/program.hpp index ede29c134..0971e7271 100644 --- a/src/client/script_bindings/webgl/program.hpp +++ b/src/client/script_bindings/webgl/program.hpp @@ -32,5 +32,5 @@ namespace endor WebGLProgram(v8::Isolate *isolate, const v8::FunctionCallbackInfo &args); }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/renderbuffer.cpp b/src/client/script_bindings/webgl/renderbuffer.cpp index 7f512b63d..d858602e8 100644 --- a/src/client/script_bindings/webgl/renderbuffer.cpp +++ b/src/client/script_bindings/webgl/renderbuffer.cpp @@ -19,5 +19,5 @@ namespace endor // WebGLRenderbuffer objects are created by WebGL context, not by user code } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/renderbuffer.hpp b/src/client/script_bindings/webgl/renderbuffer.hpp index a9651c800..581ff1b2e 100644 --- a/src/client/script_bindings/webgl/renderbuffer.hpp +++ b/src/client/script_bindings/webgl/renderbuffer.hpp @@ -33,5 +33,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/texture.cpp b/src/client/script_bindings/webgl/texture.cpp index 3b51f5dfa..3d034839c 100644 --- a/src/client/script_bindings/webgl/texture.cpp +++ b/src/client/script_bindings/webgl/texture.cpp @@ -27,5 +27,5 @@ namespace endor { } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/texture.hpp b/src/client/script_bindings/webgl/texture.hpp index b40acad08..9272d305c 100644 --- a/src/client/script_bindings/webgl/texture.hpp +++ b/src/client/script_bindings/webgl/texture.hpp @@ -45,5 +45,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/uniform_location.cpp b/src/client/script_bindings/webgl/uniform_location.cpp index 597a73e97..ce71bd5d6 100644 --- a/src/client/script_bindings/webgl/uniform_location.cpp +++ b/src/client/script_bindings/webgl/uniform_location.cpp @@ -47,5 +47,5 @@ namespace endor } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/uniform_location.hpp b/src/client/script_bindings/webgl/uniform_location.hpp index a5e7de1f2..a1f98b66d 100644 --- a/src/client/script_bindings/webgl/uniform_location.hpp +++ b/src/client/script_bindings/webgl/uniform_location.hpp @@ -44,5 +44,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/vertex_array.cpp b/src/client/script_bindings/webgl/vertex_array.cpp index 3e6ed5f0a..48e8e644b 100644 --- a/src/client/script_bindings/webgl/vertex_array.cpp +++ b/src/client/script_bindings/webgl/vertex_array.cpp @@ -20,5 +20,5 @@ namespace endor { } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/vertex_array.hpp b/src/client/script_bindings/webgl/vertex_array.hpp index 7ba162aa3..a4a03cc1d 100644 --- a/src/client/script_bindings/webgl/vertex_array.hpp +++ b/src/client/script_bindings/webgl/vertex_array.hpp @@ -33,5 +33,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/webgl2_rendering_context.cpp b/src/client/script_bindings/webgl/webgl2_rendering_context.cpp index 8bace804f..f6797d1d1 100644 --- a/src/client/script_bindings/webgl/webgl2_rendering_context.cpp +++ b/src/client/script_bindings/webgl/webgl2_rendering_context.cpp @@ -3,6 +3,7 @@ #include "./buffer.hpp" #include "./program.hpp" #include "./vertex_array.hpp" +#include "./texture.hpp" namespace endor { @@ -417,6 +418,7 @@ namespace endor // Enhanced framebuffer operations ADD_WEBGL2_METHOD("blitFramebuffer", BlitFramebuffer) ADD_WEBGL2_METHOD("renderbufferStorageMultisample", RenderbufferStorageMultisample) + ADD_WEBGL2_METHOD("framebufferTextureLayer", FramebufferTextureLayer) // Enhanced texture operations ADD_WEBGL2_METHOD("texImage3D", TexImage3D) @@ -1701,6 +1703,81 @@ namespace endor args.GetReturnValue().SetUndefined(); } + void WebGL2RenderingContext::FramebufferTextureLayer(const v8::FunctionCallbackInfo &args) + { + Isolate *isolate = args.GetIsolate(); + HandleScope scope(isolate); + Local context = isolate->GetCurrentContext(); + + if (args.Length() < 5) + { + isolate->ThrowException(Exception::TypeError( + MakeMethodArgCountError(isolate, "framebufferTextureLayer", 5, args.Length()))); + return; + } + if (!args[0]->IsNumber()) + { + isolate->ThrowException(Exception::TypeError( + MakeMethodArgTypeError(isolate, "framebufferTextureLayer", 0, "number", args[0]))); + return; + } + if (!args[1]->IsNumber()) + { + isolate->ThrowException(Exception::TypeError( + MakeMethodArgTypeError(isolate, "framebufferTextureLayer", 1, "number", args[1]))); + return; + } + if (!args[2]->IsNull() && !WebGLTexture::IsInstanceOf(isolate, args[2])) + { + isolate->ThrowException(Exception::TypeError( + MakeMethodArgTypeError(isolate, "framebufferTextureLayer", 2, "WebGLTexture or null", args[2]))); + return; + } + if (!args[3]->IsNumber()) + { + isolate->ThrowException(Exception::TypeError( + MakeMethodArgTypeError(isolate, "framebufferTextureLayer", 3, "number", args[3]))); + return; + } + if (!args[4]->IsNumber()) + { + isolate->ThrowException(Exception::TypeError( + MakeMethodArgTypeError(isolate, "framebufferTextureLayer", 4, "number", args[4]))); + return; + } + + client_graphics::WebGLFramebufferBindingTarget target; + { + int value = args[0]->Int32Value(context).ToChecked(); + target = static_cast(value); + } + client_graphics::WebGLFramebufferAttachment attachment; + { + int value = args[1]->Int32Value(context).ToChecked(); + attachment = static_cast(value); + } + int level = args[3]->Int32Value(context).ToChecked(); + int layer = args[4]->Int32Value(context).ToChecked(); + + if (args[2]->IsNull()) + { + handle()->framebufferTextureLayer(target, attachment, nullptr, level, layer); + } + else + { + auto textureObj = args[2].As(); + auto textureBinding = WebGLTexture::Unwrap(isolate, textureObj); + if (textureBinding == nullptr || !textureBinding->hasData()) + { + isolate->ThrowException(Exception::TypeError( + MakeMethodError(isolate, "framebufferTextureLayer", "Invalid WebGLTexture object"))); + return; + } + handle()->framebufferTextureLayer(target, attachment, textureBinding->handle(), level, layer); + } + args.GetReturnValue().SetUndefined(); + } + // Enhanced texture operations void WebGL2RenderingContext::TexImage3D(const FunctionCallbackInfo &args) { diff --git a/src/client/script_bindings/webgl/webgl2_rendering_context.hpp b/src/client/script_bindings/webgl/webgl2_rendering_context.hpp index bc7cbbea7..faf38623b 100644 --- a/src/client/script_bindings/webgl/webgl2_rendering_context.hpp +++ b/src/client/script_bindings/webgl/webgl2_rendering_context.hpp @@ -100,6 +100,7 @@ namespace endor // Enhanced framebuffer operations void BlitFramebuffer(const v8::FunctionCallbackInfo &args); void RenderbufferStorageMultisample(const v8::FunctionCallbackInfo &args); + void FramebufferTextureLayer(const v8::FunctionCallbackInfo &args); // Enhanced texture operations void TexImage3D(const v8::FunctionCallbackInfo &args); diff --git a/src/common/command_buffers/details/buffer.hpp b/src/common/command_buffers/details/buffer.hpp index a116ecdd7..9a0b68f04 100644 --- a/src/common/command_buffers/details/buffer.hpp +++ b/src/common/command_buffers/details/buffer.hpp @@ -557,6 +557,52 @@ namespace commandbuffers uint32_t level; }; + class FramebufferTextureLayerCommandBufferRequest final + : public TrCommandBufferSimpleRequest + { + public: + FramebufferTextureLayerCommandBufferRequest() = delete; + FramebufferTextureLayerCommandBufferRequest(uint32_t target, uint32_t attachment, uint32_t texture, uint32_t level, uint32_t layer) + : TrCommandBufferSimpleRequest() + , target(target) + , attachment(attachment) + , texture(texture) + , level(level) + , layer(layer) + { + } + FramebufferTextureLayerCommandBufferRequest(const FramebufferTextureLayerCommandBufferRequest &that, bool clone) + : TrCommandBufferSimpleRequest(that, clone) + , target(that.target) + , attachment(that.attachment) + , texture(that.texture) + , level(that.level) + , layer(that.layer) + { + } + + std::string toString(const char *line_prefix) const override + { + std::stringstream ss; + ss << TrCommandBufferSimpleRequest::toString(line_prefix) << "(" + << WebGLHelper::WebGLEnumToString(target) << ", " + << "attachment=" << WebGLHelper::WebGLFramebufferAttachmentToString(attachment) << ", " + << "texture=" << texture << ", " + << "level=" << level << ", " + << "layer=" << layer + << ")"; + return ss.str(); + } + + public: + uint32_t target; + uint32_t attachment; + uint32_t texture; + uint32_t level; + uint32_t layer; + }; + class CheckFramebufferStatusCommandBufferRequest final : public TrCommandBufferSimpleRequest diff --git a/src/common/command_buffers/macros.hpp b/src/common/command_buffers/macros.hpp index 00c9ad7d6..15bad43b4 100644 --- a/src/common/command_buffers/macros.hpp +++ b/src/common/command_buffers/macros.hpp @@ -32,6 +32,7 @@ XX(BIND_FRAMEBUFFER, BindFramebufferCommandBufferRequest, "GL::BindFramebuffer") \ XX(FRAMEBUFFER_RENDERBUFFER, FramebufferRenderbufferCommandBufferRequest, "GL::FramebufferRenderbuffer") \ XX(FRAMEBUFFER_TEXTURE2D, FramebufferTexture2DCommandBufferRequest, "GL::FramebufferTexture2D") \ + XX(FRAMEBUFFER_TEXTURE_LAYER, FramebufferTextureLayerCommandBufferRequest, "GL::FramebufferTextureLayer") \ XX(CHECK_FRAMEBUFFER_STATUS, CheckFramebufferStatusCommandBufferRequest, "GL::CheckFramebufferStatus") \ XX(CREATE_RENDERBUFFER, CreateRenderbufferCommandBufferRequest, "GL::CreateRenderbuffer") \ XX(DELETE_RENDERBUFFER, DeleteRenderbufferCommandBufferRequest, "GL::DeleteRenderbuffer") \ diff --git a/src/renderer/render_api_opengles.cpp b/src/renderer/render_api_opengles.cpp index 37683c8ef..39e5a4e4e 100644 --- a/src/renderer/render_api_opengles.cpp +++ b/src/renderer/render_api_opengles.cpp @@ -1028,6 +1028,23 @@ class RHI_OpenGL : public TrRenderHardwareInterface if (TR_UNLIKELY(CheckError(req, reqContentRenderer) != GL_NO_ERROR || options.printsCall)) PrintDebugInfo(req, nullptr, nullptr, options); } + + TR_OPENGL_FUNC void OnFramebufferTextureLayer(FramebufferTextureLayerCommandBufferRequest *req, + renderer::TrContentRenderer *reqContentRenderer, + ApiCallOptions &options) + { + auto &glObjectManager = reqContentRenderer->getContextGL()->ObjectManagerRef(); + auto target = req->target; + auto attachment = req->attachment; + auto texture = glObjectManager.FindTexture(req->texture); + auto level = req->level; + auto layer = req->layer; + + glFramebufferTextureLayer(target, attachment, texture, level, layer); + if (TR_UNLIKELY(CheckError(req, reqContentRenderer) != GL_NO_ERROR || options.printsCall)) + PrintDebugInfo(req, nullptr, nullptr, options); + } + TR_OPENGL_FUNC void OnCheckFramebufferStatus(CheckFramebufferStatusCommandBufferRequest *req, renderer::TrContentRenderer *reqContentRenderer, ApiCallOptions &options) @@ -2899,6 +2916,7 @@ bool RHI_OpenGL::ExecuteCommandBuffer(vector Date: Tue, 18 Nov 2025 16:20:46 +0800 Subject: [PATCH 3/4] fix format --- src/client/script_bindings/webgl/active_info.cpp | 2 +- src/client/script_bindings/webgl/active_info.hpp | 2 +- src/client/script_bindings/webgl/framebuffer.cpp | 2 +- src/client/script_bindings/webgl/framebuffer.hpp | 2 +- src/client/script_bindings/webgl/object.cpp | 2 +- src/client/script_bindings/webgl/object.hpp | 2 +- src/client/script_bindings/webgl/program.cpp | 2 +- src/client/script_bindings/webgl/program.hpp | 2 +- src/client/script_bindings/webgl/renderbuffer.cpp | 2 +- src/client/script_bindings/webgl/renderbuffer.hpp | 2 +- src/client/script_bindings/webgl/texture.cpp | 2 +- src/client/script_bindings/webgl/texture.hpp | 2 +- src/client/script_bindings/webgl/uniform_location.cpp | 2 +- src/client/script_bindings/webgl/uniform_location.hpp | 2 +- src/client/script_bindings/webgl/vertex_array.cpp | 2 +- src/client/script_bindings/webgl/vertex_array.hpp | 2 +- src/common/command_buffers/shared.hpp | 1 + 17 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/client/script_bindings/webgl/active_info.cpp b/src/client/script_bindings/webgl/active_info.cpp index 803ffe763..c0f9d3e81 100644 --- a/src/client/script_bindings/webgl/active_info.cpp +++ b/src/client/script_bindings/webgl/active_info.cpp @@ -60,5 +60,5 @@ namespace endor } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/active_info.hpp b/src/client/script_bindings/webgl/active_info.hpp index c2d6c9080..b125c893c 100644 --- a/src/client/script_bindings/webgl/active_info.hpp +++ b/src/client/script_bindings/webgl/active_info.hpp @@ -38,5 +38,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/framebuffer.cpp b/src/client/script_bindings/webgl/framebuffer.cpp index d38e0687c..dbe790869 100644 --- a/src/client/script_bindings/webgl/framebuffer.cpp +++ b/src/client/script_bindings/webgl/framebuffer.cpp @@ -31,5 +31,5 @@ namespace endor { } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/framebuffer.hpp b/src/client/script_bindings/webgl/framebuffer.hpp index fd3ab4ec2..c54189e65 100644 --- a/src/client/script_bindings/webgl/framebuffer.hpp +++ b/src/client/script_bindings/webgl/framebuffer.hpp @@ -37,5 +37,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/object.cpp b/src/client/script_bindings/webgl/object.cpp index 78779213d..b03f846b5 100644 --- a/src/client/script_bindings/webgl/object.cpp +++ b/src/client/script_bindings/webgl/object.cpp @@ -28,5 +28,5 @@ namespace endor // WebGLObject is a base class, typically not instantiated directly } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/object.hpp b/src/client/script_bindings/webgl/object.hpp index f69bb78c8..cd48b93ae 100644 --- a/src/client/script_bindings/webgl/object.hpp +++ b/src/client/script_bindings/webgl/object.hpp @@ -45,5 +45,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/program.cpp b/src/client/script_bindings/webgl/program.cpp index 8c21d7e26..e4a68a6f8 100644 --- a/src/client/script_bindings/webgl/program.cpp +++ b/src/client/script_bindings/webgl/program.cpp @@ -20,5 +20,5 @@ namespace endor } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/program.hpp b/src/client/script_bindings/webgl/program.hpp index 0971e7271..ede29c134 100644 --- a/src/client/script_bindings/webgl/program.hpp +++ b/src/client/script_bindings/webgl/program.hpp @@ -32,5 +32,5 @@ namespace endor WebGLProgram(v8::Isolate *isolate, const v8::FunctionCallbackInfo &args); }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/renderbuffer.cpp b/src/client/script_bindings/webgl/renderbuffer.cpp index d858602e8..7f512b63d 100644 --- a/src/client/script_bindings/webgl/renderbuffer.cpp +++ b/src/client/script_bindings/webgl/renderbuffer.cpp @@ -19,5 +19,5 @@ namespace endor // WebGLRenderbuffer objects are created by WebGL context, not by user code } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/renderbuffer.hpp b/src/client/script_bindings/webgl/renderbuffer.hpp index 581ff1b2e..a9651c800 100644 --- a/src/client/script_bindings/webgl/renderbuffer.hpp +++ b/src/client/script_bindings/webgl/renderbuffer.hpp @@ -33,5 +33,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/texture.cpp b/src/client/script_bindings/webgl/texture.cpp index 3d034839c..3b51f5dfa 100644 --- a/src/client/script_bindings/webgl/texture.cpp +++ b/src/client/script_bindings/webgl/texture.cpp @@ -27,5 +27,5 @@ namespace endor { } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/texture.hpp b/src/client/script_bindings/webgl/texture.hpp index 9272d305c..b40acad08 100644 --- a/src/client/script_bindings/webgl/texture.hpp +++ b/src/client/script_bindings/webgl/texture.hpp @@ -45,5 +45,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/uniform_location.cpp b/src/client/script_bindings/webgl/uniform_location.cpp index ce71bd5d6..597a73e97 100644 --- a/src/client/script_bindings/webgl/uniform_location.cpp +++ b/src/client/script_bindings/webgl/uniform_location.cpp @@ -47,5 +47,5 @@ namespace endor } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/uniform_location.hpp b/src/client/script_bindings/webgl/uniform_location.hpp index a1f98b66d..a5e7de1f2 100644 --- a/src/client/script_bindings/webgl/uniform_location.hpp +++ b/src/client/script_bindings/webgl/uniform_location.hpp @@ -44,5 +44,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/client/script_bindings/webgl/vertex_array.cpp b/src/client/script_bindings/webgl/vertex_array.cpp index 48e8e644b..3e6ed5f0a 100644 --- a/src/client/script_bindings/webgl/vertex_array.cpp +++ b/src/client/script_bindings/webgl/vertex_array.cpp @@ -20,5 +20,5 @@ namespace endor { } } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor diff --git a/src/client/script_bindings/webgl/vertex_array.hpp b/src/client/script_bindings/webgl/vertex_array.hpp index a4a03cc1d..7ba162aa3 100644 --- a/src/client/script_bindings/webgl/vertex_array.hpp +++ b/src/client/script_bindings/webgl/vertex_array.hpp @@ -33,5 +33,5 @@ namespace endor }; } // namespace webgl - } // namespace script_bindings + } // namespace script_bindings } // namespace endor \ No newline at end of file diff --git a/src/common/command_buffers/shared.hpp b/src/common/command_buffers/shared.hpp index edf0e7874..a6a240567 100644 --- a/src/common/command_buffers/shared.hpp +++ b/src/common/command_buffers/shared.hpp @@ -75,6 +75,7 @@ namespace commandbuffers COMMAND_BUFFER_BIND_FRAMEBUFFER_REQ, COMMAND_BUFFER_FRAMEBUFFER_RENDERBUFFER_REQ, COMMAND_BUFFER_FRAMEBUFFER_TEXTURE2D_REQ, + COMMAND_BUFFER_FRAMEBUFFER_TEXTURE_LAYER_REQ, COMMAND_BUFFER_CHECK_FRAMEBUFFER_STATUS_REQ, COMMAND_BUFFER_CHECK_FRAMEBUFFER_STATUS_RES, COMMAND_BUFFER_CREATE_RENDERBUFFER_REQ, From e6ad63a84dc1bd8c1021247a3e9b6441f94f1ec7 Mon Sep 17 00:00:00 2001 From: EndlessJourney <155411404+EndlessJour9527@users.noreply.github.com> Date: Tue, 18 Nov 2025 16:36:25 +0800 Subject: [PATCH 4/4] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/common/command_buffers/details/buffer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/command_buffers/details/buffer.hpp b/src/common/command_buffers/details/buffer.hpp index 9a0b68f04..ce4c1dfec 100644 --- a/src/common/command_buffers/details/buffer.hpp +++ b/src/common/command_buffers/details/buffer.hpp @@ -572,7 +572,7 @@ namespace commandbuffers , layer(layer) { } - FramebufferTextureLayerCommandBufferRequest(const FramebufferTextureLayerCommandBufferRequest &that, bool clone) + FramebufferTextureLayerCommandBufferRequest(const FramebufferTextureLayerCommandBufferRequest &that, bool clone = false) : TrCommandBufferSimpleRequest(that, clone) , target(that.target) , attachment(that.attachment)