core: rename mbgl directories to mln (#4511)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Bart Louwers
2026-08-22 20:50:14 +02:00
committed by GitHub
parent 06fcf13d42
commit 2a8ebc4906
1924 changed files with 10489 additions and 10489 deletions

View File

@@ -0,0 +1,59 @@
#include <mln/gl/command_encoder.hpp>
#include <mln/gl/upload_pass.hpp>
#include <mln/gl/render_pass.hpp>
#include <mln/gl/context.hpp>
#include <mln/gl/renderable_resource.hpp>
#include <mln/gl/debugging_extension.hpp>
#include <mln/platform/gl_functions.hpp>
#include <cstring>
namespace mln {
namespace gl {
CommandEncoder::~CommandEncoder() {
const auto debugGroup(createDebugGroup("cleanup"));
context.performCleanup();
}
std::unique_ptr<gfx::UploadPass> CommandEncoder::createUploadPass(const char* name, gfx::Renderable&) {
return std::make_unique<gl::UploadPass>(*this, name);
}
std::unique_ptr<gfx::RenderPass> CommandEncoder::createRenderPass(const char* name,
const gfx::RenderPassDescriptor& descriptor) {
return std::make_unique<gl::RenderPass>(*this, name, descriptor);
}
void CommandEncoder::present(gfx::Renderable& renderable) {
renderable.getResource<gl::RenderableResource>().swap();
}
void CommandEncoder::pushDebugGroup(const char* name) {
(void)name;
#ifndef NDEBUG
if (auto debugging = context.getDebuggingExtension()) {
if (debugging->pushDebugGroup) {
MBGL_CHECK_ERROR(
debugging->pushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, platform::GLsizei(strlen(name)), name));
} else if (debugging->pushGroupMarkerEXT) {
MBGL_CHECK_ERROR(debugging->pushGroupMarkerEXT(platform::GLsizei(strlen(name) + 1), name));
}
}
#endif
}
void CommandEncoder::popDebugGroup() {
#ifndef NDEBUG
if (auto debugging = context.getDebuggingExtension()) {
if (debugging->popDebugGroup) {
MBGL_CHECK_ERROR(debugging->popDebugGroup());
} else if (debugging->popGroupMarkerEXT) {
MBGL_CHECK_ERROR(debugging->popGroupMarkerEXT());
}
}
#endif
}
} // namespace gl
} // namespace mln