summaryrefslogtreecommitdiff
path: root/test/gl
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-09-27 17:52:14 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-27 11:03:29 -0700
commit44c7e9d05edbe6fee9e8f98b91380b6c07e57ac7 (patch)
treecb2ee7fed51efe737543bb6f2444fac885571c41 /test/gl
parentce42d22984d19fa020e6fba77e2585c0fd9dacf4 (diff)
downloadqtlocation-mapboxgl-44c7e9d05edbe6fee9e8f98b91380b6c07e57ac7.tar.gz
[core] merge gl::ObjectStore into gl::Context
Diffstat (limited to 'test/gl')
-rw-r--r--test/gl/object.cpp53
1 files changed, 26 insertions, 27 deletions
diff --git a/test/gl/object.cpp b/test/gl/object.cpp
index c70f3ad489..2722669e84 100644
--- a/test/gl/object.cpp
+++ b/test/gl/object.cpp
@@ -5,7 +5,6 @@
#include <mbgl/gl/gl.hpp>
#include <mbgl/gl/context.hpp>
-#include <mbgl/gl/object_store.hpp>
#include <memory>
@@ -71,48 +70,48 @@ TEST(GLObject, Store) {
mbgl::HeadlessView view(std::make_shared<mbgl::HeadlessDisplay>(), 1);
view.activate();
- mbgl::gl::ObjectStore store;
- EXPECT_TRUE(store.empty());
+ mbgl::gl::Context context;
+ EXPECT_TRUE(context.empty());
- mbgl::gl::UniqueProgram program = store.createProgram();
+ mbgl::gl::UniqueProgram program = context.createProgram();
EXPECT_NE(program.get(), 0u);
program.reset();
- EXPECT_FALSE(store.empty());
- store.performCleanup();
- EXPECT_TRUE(store.empty());
+ EXPECT_FALSE(context.empty());
+ context.performCleanup();
+ EXPECT_TRUE(context.empty());
- mbgl::gl::UniqueShader shader = store.createShader(GL_VERTEX_SHADER);
+ mbgl::gl::UniqueShader shader = context.createShader(GL_VERTEX_SHADER);
EXPECT_NE(shader.get(), 0u);
shader.reset();
- EXPECT_FALSE(store.empty());
- store.performCleanup();
- EXPECT_TRUE(store.empty());
+ EXPECT_FALSE(context.empty());
+ context.performCleanup();
+ EXPECT_TRUE(context.empty());
- mbgl::gl::UniqueBuffer buffer = store.createBuffer();
+ mbgl::gl::UniqueBuffer buffer = context.createBuffer();
EXPECT_NE(buffer.get(), 0u);
buffer.reset();
- EXPECT_FALSE(store.empty());
- store.performCleanup();
- EXPECT_TRUE(store.empty());
+ EXPECT_FALSE(context.empty());
+ context.performCleanup();
+ EXPECT_TRUE(context.empty());
- mbgl::gl::UniqueTexture texture = store.createTexture();
+ mbgl::gl::UniqueTexture texture = context.createTexture();
EXPECT_NE(texture.get(), 0u);
texture.reset();
- EXPECT_FALSE(store.empty());
- store.performCleanup();
- EXPECT_FALSE(store.empty());
- store.reset();
- EXPECT_TRUE(store.empty());
+ EXPECT_FALSE(context.empty());
+ context.performCleanup();
+ EXPECT_FALSE(context.empty());
+ context.reset();
+ EXPECT_TRUE(context.empty());
- mbgl::gl::UniqueVAO vao = store.createVAO();
+ mbgl::gl::UniqueVAO vao = context.createVAO();
EXPECT_NE(vao.get(), 0u);
vao.reset();
- EXPECT_FALSE(store.empty());
- store.performCleanup();
- EXPECT_TRUE(store.empty());
+ EXPECT_FALSE(context.empty());
+ context.performCleanup();
+ EXPECT_TRUE(context.empty());
- store.reset();
- EXPECT_TRUE(store.empty());
+ context.reset();
+ EXPECT_TRUE(context.empty());
view.deactivate();
}