summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-09-08 14:26:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-09-08 14:26:59 -0700
commita2397469b658dc64062f5477d563afc203ffb62c (patch)
tree21c0c33ddb2be54d97225c8c7435a7f26d260f4b
parentb168e6c687903c92f563c5c56a4a303aaf6e99a9 (diff)
downloadqtlocation-mapboxgl-upstream/abandon-texture-dirty.tar.gz
[core] Rename for clarity: ActiveTexture → ActiveTextureUnitupstream/abandon-texture-dirty
-rw-r--r--src/mbgl/gl/context.cpp8
-rw-r--r--src/mbgl/gl/context.hpp2
-rw-r--r--src/mbgl/gl/value.cpp6
-rw-r--r--src/mbgl/gl/value.hpp2
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp4
-rw-r--r--src/mbgl/util/offscreen_texture.cpp2
6 files changed, 12 insertions, 12 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index 87bdcc30aa..49bfe30e91 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -481,7 +481,7 @@ Context::createTexture(const Size size, const void* data, TextureFormat format,
void Context::updateTexture(
TextureID id, const Size size, const void* data, TextureFormat format, TextureUnit unit) {
- activeTexture = unit;
+ activeTextureUnit = unit;
texture[unit] = id;
MBGL_CHECK_ERROR(glTexImage2D(GL_TEXTURE_2D, 0, static_cast<GLenum>(format), size.width,
size.height, 0, static_cast<GLenum>(format), GL_UNSIGNED_BYTE,
@@ -495,7 +495,7 @@ void Context::bindTexture(Texture& obj,
TextureWrap wrapX,
TextureWrap wrapY) {
if (filter != obj.filter || mipmap != obj.mipmap || wrapX != obj.wrapX || wrapY != obj.wrapY) {
- activeTexture = unit;
+ activeTextureUnit = unit;
texture[unit] = obj.texture;
if (filter != obj.filter || mipmap != obj.mipmap) {
@@ -526,7 +526,7 @@ void Context::bindTexture(Texture& obj,
} else if (texture[unit] != obj.texture) {
// We are checking first to avoid setting the active texture without a subsequent
// texture bind.
- activeTexture = unit;
+ activeTextureUnit = unit;
texture[unit] = obj.texture;
}
}
@@ -558,7 +558,7 @@ void Context::setDirtyState() {
clearStencil.setDirty();
program.setDirty();
lineWidth.setDirty();
- activeTexture.setDirty();
+ activeTextureUnit.setDirty();
pixelStorePack.setDirty();
pixelStoreUnpack.setDirty();
#if not MBGL_USE_GLES2
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp
index 9923567276..228e6e55b7 100644
--- a/src/mbgl/gl/context.hpp
+++ b/src/mbgl/gl/context.hpp
@@ -198,7 +198,7 @@ private:
#endif
public:
- State<value::ActiveTexture> activeTexture;
+ State<value::ActiveTextureUnit> activeTextureUnit;
State<value::BindFramebuffer> bindFramebuffer;
State<value::Viewport> viewport;
State<value::ScissorTest> scissorTest;
diff --git a/src/mbgl/gl/value.cpp b/src/mbgl/gl/value.cpp
index 89014fe6bc..092403af0d 100644
--- a/src/mbgl/gl/value.cpp
+++ b/src/mbgl/gl/value.cpp
@@ -242,13 +242,13 @@ LineWidth::Type LineWidth::Get() {
return lineWidth;
}
-const constexpr ActiveTexture::Type ActiveTexture::Default;
+const constexpr ActiveTextureUnit::Type ActiveTextureUnit::Default;
-void ActiveTexture::Set(const Type& value) {
+void ActiveTextureUnit::Set(const Type& value) {
MBGL_CHECK_ERROR(glActiveTexture(GL_TEXTURE0 + value));
}
-ActiveTexture::Type ActiveTexture::Get() {
+ActiveTextureUnit::Type ActiveTextureUnit::Get() {
GLint activeTexture;
MBGL_CHECK_ERROR(glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture));
return static_cast<Type>(activeTexture - GL_TEXTURE0);
diff --git a/src/mbgl/gl/value.hpp b/src/mbgl/gl/value.hpp
index 19e9af194f..7b85a5ff4b 100644
--- a/src/mbgl/gl/value.hpp
+++ b/src/mbgl/gl/value.hpp
@@ -165,7 +165,7 @@ struct LineWidth {
static Type Get();
};
-struct ActiveTexture {
+struct ActiveTextureUnit {
using Type = TextureUnit;
static const constexpr Type Default = 0;
static void Set(const Type&);
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index 9894bdc12f..21d56feea9 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -539,9 +539,9 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
{
MBGL_DEBUG_GROUP(parameters.context, "cleanup");
- parameters.context.activeTexture = 1;
+ parameters.context.activeTextureUnit = 1;
parameters.context.texture[1] = 0;
- parameters.context.activeTexture = 0;
+ parameters.context.activeTextureUnit = 0;
parameters.context.texture[0] = 0;
parameters.context.bindVertexArray = 0;
diff --git a/src/mbgl/util/offscreen_texture.cpp b/src/mbgl/util/offscreen_texture.cpp
index 77a1416e48..d8a68b9a4a 100644
--- a/src/mbgl/util/offscreen_texture.cpp
+++ b/src/mbgl/util/offscreen_texture.cpp
@@ -32,7 +32,7 @@ public:
context.bindFramebuffer = framebuffer->framebuffer;
}
- context.activeTexture = 0;
+ context.activeTextureUnit = 0;
context.scissorTest = false;
context.viewport = { 0, 0, size };
}