diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-03-15 18:43:58 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-03-22 15:59:10 +0100 |
commit | 3c91b6b7de487993e75de552ba44249740644e42 (patch) | |
tree | 69b8b2642b3d8496657db92459b0a23e130b501d /src/mbgl/gl/context.hpp | |
parent | d20327844cac88b6bf42b201eac35e816a189a8a (diff) | |
download | qtlocation-mapboxgl-3c91b6b7de487993e75de552ba44249740644e42.tar.gz |
[core] cache binary shaders on Android
Diffstat (limited to 'src/mbgl/gl/context.hpp')
-rw-r--r-- | src/mbgl/gl/context.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp index e4cc5a3af2..10ff4360d3 100644 --- a/src/mbgl/gl/context.hpp +++ b/src/mbgl/gl/context.hpp @@ -1,5 +1,6 @@ #pragma once +#include <mbgl/gl/features.hpp> #include <mbgl/gl/object.hpp> #include <mbgl/gl/state.hpp> #include <mbgl/gl/value.hpp> @@ -36,12 +37,21 @@ public: UniqueShader createShader(ShaderType type, const std::string& source); UniqueProgram createProgram(ShaderID vertexShader, ShaderID fragmentShader); + UniqueProgram createProgram(BinaryProgramFormat binaryFormat, const std::string& binaryProgram); + void verifyProgramLinkage(ProgramID); void linkProgram(ProgramID); UniqueTexture createTexture(); bool supportsVertexArrays() const; UniqueVertexArray createVertexArray(); +#if MBGL_HAS_BINARY_PROGRAMS + bool supportsProgramBinaries() const; +#else + constexpr bool supportsProgramBinaries() const { return false; } +#endif + optional<std::pair<BinaryProgramFormat, std::string>> getBinaryProgram(ProgramID) const; + template <class Vertex, class DrawMode> VertexBuffer<Vertex, DrawMode> createVertexBuffer(VertexVector<Vertex, DrawMode>&& v) { return VertexBuffer<Vertex, DrawMode> { |