diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-05-13 17:13:31 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-05-15 11:57:43 -0700 |
commit | 3a6ff7710fcf201f82ddc2090488ef585bd8ab17 (patch) | |
tree | de380cbb7f5553282b081dce9202cbe9e502ebe5 /src/mbgl/gl/context.hpp | |
parent | bf0998697e0893d8a56421a139c7fc4855e89fa5 (diff) | |
download | qtlocation-mapboxgl-3a6ff7710fcf201f82ddc2090488ef585bd8ab17.tar.gz |
[core] add gfx::UploadPass, split startRender into prepare and upload
Diffstat (limited to 'src/mbgl/gl/context.hpp')
-rw-r--r-- | src/mbgl/gl/context.hpp | 17 |
1 files changed, 6 insertions, 11 deletions
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 <mbgl/gl/framebuffer.hpp> #include <mbgl/gl/vertex_array.hpp> #include <mbgl/gl/types.hpp> +#include <mbgl/gfx/texture.hpp> #include <mbgl/gfx/draw_mode.hpp> #include <mbgl/gfx/depth_mode.hpp> #include <mbgl/gfx/stencil_mode.hpp> @@ -42,6 +43,8 @@ public: Context(const Context&) = delete; Context& operator=(const Context& other) = delete; + std::unique_ptr<gfx::CommandEncoder> createCommandEncoder() override; + void initializeExtensions(const std::function<gl::ProcAddress(const char*)>&); void enableDebugging(); @@ -189,15 +192,6 @@ private: State<value::PointSize> pointSize; #endif // MBGL_USE_GLES2 - std::unique_ptr<gfx::VertexBufferResource> 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<gfx::IndexBufferResource> 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<gfx::TextureResource> 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<gfx::OffscreenTexture> createOffscreenTexture( Size, gfx::TextureChannelDataType = gfx::TextureChannelDataType::UnsignedByte) override; std::unique_ptr<gfx::OffscreenTexture> createOffscreenTexture( @@ -205,6 +199,9 @@ private: gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>&, gfx::TextureChannelDataType = gfx::TextureChannelDataType::UnsignedByte) override; + std::unique_ptr<gfx::TextureResource> + createTextureResource(Size, gfx::TexturePixelType, gfx::TextureChannelDataType) override; + std::unique_ptr<gfx::RenderbufferResource> createRenderbufferResource(gfx::RenderbufferPixelType, Size size) override; std::unique_ptr<gfx::DrawScopeResource> createDrawScopeResource() override; @@ -218,8 +215,6 @@ private: VertexArray createVertexArray(); bool supportsVertexArrays() const; - std::unique_ptr<gfx::CommandEncoder> createCommandEncoder() override; - friend detail::ProgramDeleter; friend detail::ShaderDeleter; friend detail::BufferDeleter; |