Selectable renderer implementation (#1247)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -3,13 +3,16 @@
|
||||
#include <mbgl/gl/enum.hpp>
|
||||
#include <mbgl/gl/defines.hpp>
|
||||
#include <mbgl/gl/command_encoder.hpp>
|
||||
#include <mbgl/gl/vertex_attribute_gl.hpp>
|
||||
#include <mbgl/gl/vertex_buffer_resource.hpp>
|
||||
#include <mbgl/gl/index_buffer_resource.hpp>
|
||||
#include <mbgl/gl/texture_resource.hpp>
|
||||
#include <mbgl/gl/texture2d.hpp>
|
||||
#include <mbgl/util/logging.hpp>
|
||||
|
||||
#if MLN_DRAWABLE_RENDERER
|
||||
#include <mbgl/gl/vertex_attribute_gl.hpp>
|
||||
#include <mbgl/gl/texture2d.hpp>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace mbgl {
|
||||
@@ -123,6 +126,7 @@ void UploadPass::updateTextureResourceSub(gfx::TextureResource& resource,
|
||||
data));
|
||||
}
|
||||
|
||||
#if MLN_DRAWABLE_RENDERER
|
||||
static std::size_t padSize(std::size_t size, std::size_t padding) {
|
||||
return (padding - (size % padding)) % padding;
|
||||
}
|
||||
@@ -231,6 +235,7 @@ gfx::AttributeBindingArray UploadPass::buildAttributeBindings(
|
||||
|
||||
return {};
|
||||
}
|
||||
#endif
|
||||
|
||||
void UploadPass::pushDebugGroup(const char* name) {
|
||||
commandEncoder.pushDebugGroup(name);
|
||||
@@ -240,6 +245,7 @@ void UploadPass::popDebugGroup() {
|
||||
commandEncoder.popDebugGroup();
|
||||
}
|
||||
|
||||
#if MLN_DRAWABLE_RENDERER
|
||||
gfx::Context& UploadPass::getContext() {
|
||||
return commandEncoder.context;
|
||||
}
|
||||
@@ -247,6 +253,7 @@ gfx::Context& UploadPass::getContext() {
|
||||
const gfx::Context& UploadPass::getContext() const {
|
||||
return commandEncoder.context;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace gl
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user