summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/context.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-03-15 20:31:12 +0100
committerGitHub <noreply@github.com>2019-03-15 20:31:12 +0100
commitc8cfdb1ced822711e772dfcc8f708b1a7a68b5fc (patch)
treebf511253e25459cafc91a5f3bea2f5c773677162 /src/mbgl/gl/context.hpp
parent62695c56956add5560933137a479f29f2d3a091b (diff)
downloadqtlocation-mapboxgl-c8cfdb1ced822711e772dfcc8f708b1a7a68b5fc.tar.gz
Merge pull request #14126 from mapbox/gfx-refactor-4
Graphics refactor #4
Diffstat (limited to 'src/mbgl/gl/context.hpp')
-rw-r--r--src/mbgl/gl/context.hpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp
index 51b79200ba..fe09390cc6 100644
--- a/src/mbgl/gl/context.hpp
+++ b/src/mbgl/gl/context.hpp
@@ -52,7 +52,6 @@ public:
void verifyProgramLinkage(ProgramID);
void linkProgram(ProgramID);
UniqueTexture createUniqueTexture();
- VertexArray createVertexArray();
#if MBGL_HAS_BINARY_PROGRAMS
bool supportsProgramBinaries() const;
@@ -100,18 +99,12 @@ public:
optional<float> depth,
optional<int32_t> stencil);
- void setDrawMode(const gfx::Points&);
- void setDrawMode(const gfx::Lines&);
- void setDrawMode(const gfx::LineStrip&);
- void setDrawMode(const gfx::Triangles&);
- void setDrawMode(const gfx::TriangleStrip&);
-
void setDepthMode(const gfx::DepthMode&);
void setStencilMode(const gfx::StencilMode&);
void setColorMode(const gfx::ColorMode&);
void setCullFaceMode(const gfx::CullFaceMode&);
- void draw(gfx::PrimitiveType,
+ void draw(const gfx::DrawMode&,
std::size_t indexOffset,
std::size_t indexLength);
@@ -216,6 +209,8 @@ private:
std::unique_ptr<gfx::TextureResource> createTextureResource(Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
void updateTextureResource(const gfx::TextureResource&, Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
+ std::unique_ptr<gfx::DrawScopeResource> createDrawScopeResource() override;
+
UniqueFramebuffer createFramebuffer();
UniqueRenderbuffer createRenderbuffer(RenderbufferType, Size size);
std::unique_ptr<uint8_t[]> readFramebuffer(Size, gfx::TexturePixelType, bool flip);
@@ -223,6 +218,7 @@ private:
void drawPixels(Size size, const void* data, gfx::TexturePixelType);
#endif // MBGL_USE_GLES2
+ VertexArray createVertexArray();
bool supportsVertexArrays() const;
friend detail::ProgramDeleter;