From 3a6ff7710fcf201f82ddc2090488ef585bd8ab17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Mon, 13 May 2019 17:13:31 -0700 Subject: [core] add gfx::UploadPass, split startRender into prepare and upload --- src/mbgl/gl/context.hpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/mbgl/gl/context.hpp') diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp index aa8d2c4c84..41e5b5f22d 100644 --- a/src/mbgl/gl/context.hpp +++ b/src/mbgl/gl/context.hpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,8 @@ public: Context(const Context&) = delete; Context& operator=(const Context& other) = delete; + std::unique_ptr createCommandEncoder() override; + void initializeExtensions(const std::function&); void enableDebugging(); @@ -189,15 +192,6 @@ private: State pointSize; #endif // MBGL_USE_GLES2 - std::unique_ptr createVertexBufferResource(const void* data, std::size_t size, const gfx::BufferUsageType) override; - void updateVertexBufferResource(gfx::VertexBufferResource&, const void* data, std::size_t size) override; - std::unique_ptr createIndexBufferResource(const void* data, std::size_t size, const gfx::BufferUsageType) override; - void updateIndexBufferResource(gfx::IndexBufferResource&, const void* data, std::size_t size) override; - - std::unique_ptr createTextureResource(Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override; - void updateTextureResource(gfx::TextureResource&, Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override; - void updateTextureResourceSub(gfx::TextureResource&, const uint16_t xOffset, const uint16_t yOffset, Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override; - std::unique_ptr createOffscreenTexture( Size, gfx::TextureChannelDataType = gfx::TextureChannelDataType::UnsignedByte) override; std::unique_ptr createOffscreenTexture( @@ -205,6 +199,9 @@ private: gfx::Renderbuffer&, gfx::TextureChannelDataType = gfx::TextureChannelDataType::UnsignedByte) override; + std::unique_ptr + createTextureResource(Size, gfx::TexturePixelType, gfx::TextureChannelDataType) override; + std::unique_ptr createRenderbufferResource(gfx::RenderbufferPixelType, Size size) override; std::unique_ptr createDrawScopeResource() override; @@ -218,8 +215,6 @@ private: VertexArray createVertexArray(); bool supportsVertexArrays() const; - std::unique_ptr createCommandEncoder() override; - friend detail::ProgramDeleter; friend detail::ShaderDeleter; friend detail::BufferDeleter; -- cgit v1.2.1