[core] Modern C++ bindings for OpenGL
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include <mbgl/style/layers/raster_layer.hpp>
|
||||
#include <mbgl/shader/raster_shader.hpp>
|
||||
#include <mbgl/renderer/painter.hpp>
|
||||
#include <mbgl/gl/gl.hpp>
|
||||
#include <mbgl/gl/context.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
@@ -25,23 +24,8 @@ void RasterBucket::render(Painter& painter,
|
||||
painter.renderRaster(parameters, *this, *layer.as<RasterLayer>(), tile);
|
||||
}
|
||||
|
||||
void RasterBucket::drawRaster(RasterShader& shader,
|
||||
gl::VertexBuffer<RasterVertex>& vertices,
|
||||
gl::VertexArrayObject& array,
|
||||
gl::Context& context) {
|
||||
assert(texture);
|
||||
context.bindTexture(*texture, 0, gl::TextureFilter::Linear);
|
||||
context.bindTexture(*texture, 1, gl::TextureFilter::Linear);
|
||||
array.bind(shader, vertices, BUFFER_OFFSET_0, context);
|
||||
MBGL_CHECK_ERROR(glDrawArrays(GL_TRIANGLE_STRIP, 0, static_cast<GLsizei>(vertices.vertexCount)));
|
||||
}
|
||||
|
||||
bool RasterBucket::hasData() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RasterBucket::needsClipping() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user