Heatmap layer (#1230)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
Bart Louwers
parent
e631bc3c42
commit
813ddb024a
@@ -21,6 +21,7 @@
|
||||
#include <mbgl/gl/drawable_gl_builder.hpp>
|
||||
#include <mbgl/gl/drawable_gl_tweaker.hpp>
|
||||
#include <mbgl/gl/layer_group_gl.hpp>
|
||||
#include <mbgl/gl/render_target_gl.hpp>
|
||||
#include <mbgl/gl/uniform_buffer_gl.hpp>
|
||||
#include <mbgl/gl/texture2d.hpp>
|
||||
#include <mbgl/shaders/gl/shader_program_gl.hpp>
|
||||
@@ -472,9 +473,9 @@ gfx::UniformBufferPtr Context::createUniformBuffer(const void* data, std::size_t
|
||||
}
|
||||
|
||||
gfx::ShaderProgramBasePtr Context::getGenericShader(gfx::ShaderRegistry& shaders, const std::string& name) {
|
||||
std::vector<std::string> emptyAttributes(0);
|
||||
std::vector<std::string> emptyProperties(0);
|
||||
return std::static_pointer_cast<gfx::ShaderProgramBase>(
|
||||
shaders.getShaderGroup(name)->getOrCreateShader(*this, emptyAttributes));
|
||||
shaders.getShaderGroup(name)->getOrCreateShader(*this, emptyProperties));
|
||||
}
|
||||
|
||||
TileLayerGroupPtr Context::createTileLayerGroup(int32_t layerIndex, std::size_t initialCapacity, std::string name) {
|
||||
@@ -488,6 +489,22 @@ LayerGroupPtr Context::createLayerGroup(int32_t layerIndex, std::size_t initialC
|
||||
gfx::Texture2DPtr Context::createTexture2D() {
|
||||
return std::make_shared<gl::Texture2D>(*this);
|
||||
}
|
||||
|
||||
RenderTargetPtr Context::createRenderTarget(const Size size, const gfx::TextureChannelDataType type) {
|
||||
return std::make_shared<gl::RenderTargetGL>(*this, size, type);
|
||||
}
|
||||
|
||||
UniqueFramebuffer Context::createFramebuffer(const gfx::Texture2D& color) {
|
||||
auto fbo = createFramebuffer();
|
||||
bindFramebuffer = fbo;
|
||||
MBGL_CHECK_ERROR(glFramebufferTexture2D(GL_FRAMEBUFFER,
|
||||
GL_COLOR_ATTACHMENT0,
|
||||
GL_TEXTURE_2D,
|
||||
static_cast<const gl::Texture2D&>(color).getTextureID(),
|
||||
0));
|
||||
checkFramebuffer();
|
||||
return fbo;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Context::clear(std::optional<mbgl::Color> color, std::optional<float> depth, std::optional<int32_t> stencil) {
|
||||
|
||||
Reference in New Issue
Block a user