Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/drape
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2018-08-02 16:04:59 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2018-08-02 20:32:49 +0300
commitc43305029839d5c7c9ab2eeed370e56bd777cc41 (patch)
treee9fc909e179efa3e838dfd5b44378f3a750b857a /drape
parent926cd384a1f6c34b6ea62d9b078d6fad38b92758 (diff)
Renamed GLState
Diffstat (limited to 'drape')
-rw-r--r--drape/CMakeLists.txt4
-rw-r--r--drape/batcher.cpp38
-rw-r--r--drape/batcher.hpp36
-rw-r--r--drape/drape_tests/batcher_tests.cpp24
-rw-r--r--drape/gpu_program.cpp2
-rw-r--r--drape/render_state.cpp (renamed from drape/glstate.cpp)40
-rw-r--r--drape/render_state.hpp (renamed from drape/glstate.hpp)38
7 files changed, 91 insertions, 91 deletions
diff --git a/drape/CMakeLists.txt b/drape/CMakeLists.txt
index efa16b2c14..476bfd8ed3 100644
--- a/drape/CMakeLists.txt
+++ b/drape/CMakeLists.txt
@@ -53,8 +53,6 @@ set(
${DRAPE_ROOT}/glIncludes.hpp
${DRAPE_ROOT}/glsl_func.hpp
${DRAPE_ROOT}/glsl_types.hpp
- ${DRAPE_ROOT}/glstate.cpp
- ${DRAPE_ROOT}/glstate.hpp
${DRAPE_ROOT}/glyph_generator.cpp
${DRAPE_ROOT}/glyph_generator.hpp
${DRAPE_ROOT}/glyph_manager.cpp
@@ -85,6 +83,8 @@ set(
${DRAPE_ROOT}/pointers.hpp
${DRAPE_ROOT}/render_bucket.cpp
${DRAPE_ROOT}/render_bucket.hpp
+ ${DRAPE_ROOT}/render_state.cpp
+ ${DRAPE_ROOT}/render_state.hpp
${DRAPE_ROOT}/shader.cpp
${DRAPE_ROOT}/shader.hpp
${DRAPE_ROOT}/static_texture.cpp
diff --git a/drape/batcher.cpp b/drape/batcher.cpp
index f5e75ed1f8..4b7b6b8b76 100644
--- a/drape/batcher.cpp
+++ b/drape/batcher.cpp
@@ -16,7 +16,7 @@ namespace dp
class Batcher::CallbacksWrapper : public BatchCallbacks
{
public:
- CallbacksWrapper(GLState const & state, ref_ptr<OverlayHandle> overlay, ref_ptr<Batcher> batcher)
+ CallbacksWrapper(RenderState const & state, ref_ptr<OverlayHandle> overlay, ref_ptr<Batcher> batcher)
: m_state(state)
, m_overlay(overlay)
, m_batcher(batcher)
@@ -79,7 +79,7 @@ public:
m_batcher->ChangeBuffer(make_ref(this));
}
- GLState const & GetState() const
+ RenderState const & GetState() const
{
return m_state;
}
@@ -95,7 +95,7 @@ public:
}
private:
- GLState const & m_state;
+ RenderState const & m_state;
ref_ptr<OverlayHandle> m_overlay;
ref_ptr<Batcher> m_batcher;
ref_ptr<VertexArrayBuffer> m_buffer;
@@ -114,69 +114,69 @@ Batcher::~Batcher()
m_buckets.clear();
}
-void Batcher::InsertTriangleList(GLState const & state, ref_ptr<AttributeProvider> params)
+void Batcher::InsertTriangleList(RenderState const & state, ref_ptr<AttributeProvider> params)
{
InsertTriangleList(state, params, nullptr);
}
-IndicesRange Batcher::InsertTriangleList(GLState const & state, ref_ptr<AttributeProvider> params,
+IndicesRange Batcher::InsertTriangleList(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle)
{
return InsertPrimitives<TriangleListBatch>(state, params, move(handle), 0 /* vertexStride */);
}
-void Batcher::InsertTriangleStrip(GLState const & state, ref_ptr<AttributeProvider> params)
+void Batcher::InsertTriangleStrip(RenderState const & state, ref_ptr<AttributeProvider> params)
{
InsertTriangleStrip(state, params, nullptr);
}
-IndicesRange Batcher::InsertTriangleStrip(GLState const & state, ref_ptr<AttributeProvider> params,
+IndicesRange Batcher::InsertTriangleStrip(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle)
{
return InsertPrimitives<TriangleStripBatch>(state, params, move(handle), 0 /* vertexStride */);
}
-void Batcher::InsertTriangleFan(GLState const & state, ref_ptr<AttributeProvider> params)
+void Batcher::InsertTriangleFan(RenderState const & state, ref_ptr<AttributeProvider> params)
{
InsertTriangleFan(state, params, nullptr);
}
-IndicesRange Batcher::InsertTriangleFan(GLState const & state, ref_ptr<AttributeProvider> params,
+IndicesRange Batcher::InsertTriangleFan(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle)
{
return InsertPrimitives<TriangleFanBatch>(state, params, move(handle), 0 /* vertexStride */);
}
-void Batcher::InsertListOfStrip(GLState const & state, ref_ptr<AttributeProvider> params,
+void Batcher::InsertListOfStrip(RenderState const & state, ref_ptr<AttributeProvider> params,
uint8_t vertexStride)
{
InsertListOfStrip(state, params, nullptr, vertexStride);
}
-IndicesRange Batcher::InsertListOfStrip(GLState const & state, ref_ptr<AttributeProvider> params,
+IndicesRange Batcher::InsertListOfStrip(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle, uint8_t vertexStride)
{
return InsertPrimitives<TriangleListOfStripBatch>(state, params, move(handle), vertexStride);
}
-void Batcher::InsertLineStrip(GLState const & state, ref_ptr<AttributeProvider> params)
+void Batcher::InsertLineStrip(RenderState const & state, ref_ptr<AttributeProvider> params)
{
InsertLineStrip(state, params, nullptr);
}
-IndicesRange Batcher::InsertLineStrip(GLState const & state, ref_ptr<AttributeProvider> params,
+IndicesRange Batcher::InsertLineStrip(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle)
{
return InsertPrimitives<LineStripBatch>(state, params, move(handle), 0 /* vertexStride */);
}
-void Batcher::InsertLineRaw(GLState const & state, ref_ptr<AttributeProvider> params,
+void Batcher::InsertLineRaw(RenderState const & state, ref_ptr<AttributeProvider> params,
vector<int> const & indices)
{
InsertLineRaw(state, params, indices, nullptr);
}
-IndicesRange Batcher::InsertLineRaw(GLState const & state, ref_ptr<AttributeProvider> params,
+IndicesRange Batcher::InsertLineRaw(RenderState const & state, ref_ptr<AttributeProvider> params,
vector<int> const & indices, drape_ptr<OverlayHandle> && handle)
{
return InsertPrimitives<LineRawBatch>(state, params, move(handle), 0 /* vertexStride */, indices);
@@ -209,14 +209,14 @@ void Batcher::SetFeatureMinZoom(int minZoom)
void Batcher::ChangeBuffer(ref_ptr<CallbacksWrapper> wrapper)
{
- GLState const & state = wrapper->GetState();
+ RenderState const & state = wrapper->GetState();
FinalizeBucket(state);
ref_ptr<RenderBucket> bucket = GetBucket(state);
wrapper->SetVAO(bucket->GetBuffer());
}
-ref_ptr<RenderBucket> Batcher::GetBucket(GLState const & state)
+ref_ptr<RenderBucket> Batcher::GetBucket(RenderState const & state)
{
TBuckets::iterator it = m_buckets.find(state);
if (it != m_buckets.end())
@@ -232,7 +232,7 @@ ref_ptr<RenderBucket> Batcher::GetBucket(GLState const & state)
return result;
}
-void Batcher::FinalizeBucket(GLState const & state)
+void Batcher::FinalizeBucket(RenderState const & state)
{
TBuckets::iterator it = m_buckets.find(state);
ASSERT(it != m_buckets.end(), ("Have no bucket for finalize with given state"));
@@ -257,7 +257,7 @@ void Batcher::Flush()
}
template <typename TBatcher, typename ... TArgs>
-IndicesRange Batcher::InsertPrimitives(GLState const & state, ref_ptr<AttributeProvider> params,
+IndicesRange Batcher::InsertPrimitives(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && transferHandle, uint8_t vertexStride,
TArgs ... batcherArgs)
{
diff --git a/drape/batcher.hpp b/drape/batcher.hpp
index e3db046245..3f4ecf714b 100644
--- a/drape/batcher.hpp
+++ b/drape/batcher.hpp
@@ -1,10 +1,10 @@
#pragma once
#include "drape/attribute_provider.hpp"
-#include "drape/glstate.hpp"
#include "drape/overlay_handle.hpp"
#include "drape/pointers.hpp"
#include "drape/render_bucket.hpp"
+#include "drape/render_state.hpp"
#include "drape/vertex_array_buffer.hpp"
#include "base/macros.hpp"
@@ -28,32 +28,32 @@ public:
Batcher(uint32_t indexBufferSize, uint32_t vertexBufferSize);
~Batcher();
- void InsertTriangleList(GLState const & state, ref_ptr<AttributeProvider> params);
- IndicesRange InsertTriangleList(GLState const & state, ref_ptr<AttributeProvider> params,
+ void InsertTriangleList(RenderState const & state, ref_ptr<AttributeProvider> params);
+ IndicesRange InsertTriangleList(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle);
- void InsertTriangleStrip(GLState const & state, ref_ptr<AttributeProvider> params);
- IndicesRange InsertTriangleStrip(GLState const & state, ref_ptr<AttributeProvider> params,
+ void InsertTriangleStrip(RenderState const & state, ref_ptr<AttributeProvider> params);
+ IndicesRange InsertTriangleStrip(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle);
- void InsertTriangleFan(GLState const & state, ref_ptr<AttributeProvider> params);
- IndicesRange InsertTriangleFan(GLState const & state, ref_ptr<AttributeProvider> params,
+ void InsertTriangleFan(RenderState const & state, ref_ptr<AttributeProvider> params);
+ IndicesRange InsertTriangleFan(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle);
- void InsertListOfStrip(GLState const & state, ref_ptr<AttributeProvider> params, uint8_t vertexStride);
- IndicesRange InsertListOfStrip(GLState const & state, ref_ptr<AttributeProvider> params,
+ void InsertListOfStrip(RenderState const & state, ref_ptr<AttributeProvider> params, uint8_t vertexStride);
+ IndicesRange InsertListOfStrip(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle, uint8_t vertexStride);
- void InsertLineStrip(GLState const & state, ref_ptr<AttributeProvider> params);
- IndicesRange InsertLineStrip(GLState const & state, ref_ptr<AttributeProvider> params,
+ void InsertLineStrip(RenderState const & state, ref_ptr<AttributeProvider> params);
+ IndicesRange InsertLineStrip(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && handle);
- void InsertLineRaw(GLState const & state, ref_ptr<AttributeProvider> params,
+ void InsertLineRaw(RenderState const & state, ref_ptr<AttributeProvider> params,
vector<int> const & indices);
- IndicesRange InsertLineRaw(GLState const & state, ref_ptr<AttributeProvider> params,
+ IndicesRange InsertLineRaw(RenderState const & state, ref_ptr<AttributeProvider> params,
vector<int> const & indices, drape_ptr<OverlayHandle> && handle);
- typedef function<void (GLState const &, drape_ptr<RenderBucket> &&)> TFlushFn;
+ typedef function<void (RenderState const &, drape_ptr<RenderBucket> &&)> TFlushFn;
void StartSession(TFlushFn const & flusher);
void EndSession();
void ResetSession();
@@ -62,20 +62,20 @@ public:
private:
template<typename TBatcher, typename ... TArgs>
- IndicesRange InsertPrimitives(GLState const & state, ref_ptr<AttributeProvider> params,
+ IndicesRange InsertPrimitives(RenderState const & state, ref_ptr<AttributeProvider> params,
drape_ptr<OverlayHandle> && transferHandle, uint8_t vertexStride,
TArgs ... batcherArgs);
class CallbacksWrapper;
void ChangeBuffer(ref_ptr<CallbacksWrapper> wrapper);
- ref_ptr<RenderBucket> GetBucket(GLState const & state);
+ ref_ptr<RenderBucket> GetBucket(RenderState const & state);
- void FinalizeBucket(GLState const & state);
+ void FinalizeBucket(RenderState const & state);
void Flush();
TFlushFn m_flushInterface;
- using TBuckets = map<GLState, drape_ptr<RenderBucket>>;
+ using TBuckets = map<RenderState, drape_ptr<RenderBucket>>;
TBuckets m_buckets;
uint32_t m_indexBufferSize;
diff --git a/drape/drape_tests/batcher_tests.cpp b/drape/drape_tests/batcher_tests.cpp
index dac7ea49b7..8b4ae0f489 100644
--- a/drape/drape_tests/batcher_tests.cpp
+++ b/drape/drape_tests/batcher_tests.cpp
@@ -28,7 +28,7 @@ namespace
{
struct VAOAcceptor
{
- virtual void FlushFullBucket(GLState const & /*state*/, drape_ptr<RenderBucket> && bucket)
+ virtual void FlushFullBucket(RenderState const & /*state*/, drape_ptr<RenderBucket> && bucket)
{
m_vao.push_back(move(bucket));
}
@@ -36,11 +36,11 @@ struct VAOAcceptor
std::vector<drape_ptr<RenderBucket>> m_vao;
};
-class TestRenderState : public dp::BaseRenderState
+class TestExtension : public dp::BaseRenderStateExtension
{
public:
- bool Less(ref_ptr<dp::BaseRenderState> other) const override { return false; }
- bool Equal(ref_ptr<dp::BaseRenderState> other) const override { return true; }
+ bool Less(ref_ptr<dp::BaseRenderStateExtension> other) const override { return false; }
+ bool Equal(ref_ptr<dp::BaseRenderStateExtension> other) const override { return true; }
};
class BatcherExpectations
@@ -62,8 +62,8 @@ public:
ExpectBufferCreation(vertexSize, indexCount, indexCmp, dataCmp);
- auto renderState = make_unique_dp<TestRenderState>();
- auto state = GLState(0, make_ref(renderState));
+ auto renderState = make_unique_dp<TestExtension>();
+ auto state = RenderState(0, make_ref(renderState));
BindingInfo binding(1);
BindingDecl & decl = binding.GetBindingDecl(0);
@@ -141,7 +141,7 @@ UNIT_TEST(BatchLists_Test)
dp::IndexStorage indexes(std::move(indexesRaw));
BatcherExpectations expectations;
- auto fn = [](Batcher * batcher, GLState const & state, ref_ptr<AttributeProvider> p)
+ auto fn = [](Batcher * batcher, RenderState const & state, ref_ptr<AttributeProvider> p)
{
batcher->InsertTriangleList(state, p);
};
@@ -161,7 +161,7 @@ UNIT_TEST(BatchListOfStript_4stride)
dp::IndexStorage indexes(std::move(indexesRaw));
BatcherExpectations expectations;
- auto fn = [](Batcher * batcher, GLState const & state, ref_ptr<AttributeProvider> p)
+ auto fn = [](Batcher * batcher, RenderState const & state, ref_ptr<AttributeProvider> p)
{
batcher->InsertListOfStrip(state, p, dp::Batcher::VertexPerQuad);
};
@@ -192,7 +192,7 @@ UNIT_TEST(BatchListOfStript_5stride)
dp::IndexStorage indexes(std::move(indexesRaw));
BatcherExpectations expectations;
- auto fn = [](Batcher * batcher, GLState const & state, ref_ptr<AttributeProvider> p)
+ auto fn = [](Batcher * batcher, RenderState const & state, ref_ptr<AttributeProvider> p)
{
batcher->InsertListOfStrip(state, p, 5);
};
@@ -226,7 +226,7 @@ UNIT_TEST(BatchListOfStript_6stride)
dp::IndexStorage indexes(std::move(indexesRaw));
BatcherExpectations expectations;
- auto fn = [](Batcher * batcher, GLState const & state, ref_ptr<AttributeProvider> p)
+ auto fn = [](Batcher * batcher, RenderState const & state, ref_ptr<AttributeProvider> p)
{
batcher->InsertListOfStrip(state, p, 6);
};
@@ -371,8 +371,8 @@ UNIT_TEST(BatchListOfStript_partial)
test.AddBufferNode(node2);
test.CloseExpection();
- auto renderState = make_unique_dp<TestRenderState>();
- auto state = GLState(0, make_ref(renderState));
+ auto renderState = make_unique_dp<TestExtension>();
+ auto state = RenderState(0, make_ref(renderState));
BindingInfo binding(1);
BindingDecl & decl = binding.GetBindingDecl(0);
diff --git a/drape/gpu_program.cpp b/drape/gpu_program.cpp
index 0b3b949a5a..2ce44807d7 100644
--- a/drape/gpu_program.cpp
+++ b/drape/gpu_program.cpp
@@ -1,6 +1,6 @@
#include "drape/gpu_program.hpp"
#include "drape/glfunctions.hpp"
-#include "drape/glstate.hpp"
+#include "drape/render_state.hpp"
#include "drape/support_manager.hpp"
#include "base/logging.hpp"
diff --git a/drape/glstate.cpp b/drape/render_state.cpp
index 6f52e0bfc8..90e4cd987b 100644
--- a/drape/glstate.cpp
+++ b/drape/render_state.cpp
@@ -1,4 +1,4 @@
-#include "drape/glstate.hpp"
+#include "drape/render_state.hpp"
#include "drape/glfunctions.hpp"
#include "base/buffer_vector.hpp"
@@ -33,60 +33,60 @@ bool Blending::operator<(Blending const & other) const { return m_isEnabled < ot
bool Blending::operator==(Blending const & other) const { return m_isEnabled == other.m_isEnabled; }
-glConst GLState::GetDepthFunction() const
+glConst RenderState::GetDepthFunction() const
{
return m_depthFunction;
}
-void GLState::SetDepthFunction(glConst functionName)
+void RenderState::SetDepthFunction(glConst functionName)
{
m_depthFunction = functionName;
}
-bool GLState::GetDepthTestEnabled() const
+bool RenderState::GetDepthTestEnabled() const
{
return m_depthTestEnabled;
}
-void GLState::SetDepthTestEnabled(bool enabled)
+void RenderState::SetDepthTestEnabled(bool enabled)
{
m_depthTestEnabled = enabled;
}
-glConst GLState::GetTextureFilter() const
+glConst RenderState::GetTextureFilter() const
{
return m_textureFilter;
}
-void GLState::SetTextureFilter(glConst filter)
+void RenderState::SetTextureFilter(glConst filter)
{
m_textureFilter = filter;
}
-bool GLState::GetDrawAsLine() const
+bool RenderState::GetDrawAsLine() const
{
return m_drawAsLine;
}
-void GLState::SetDrawAsLine(bool drawAsLine)
+void RenderState::SetDrawAsLine(bool drawAsLine)
{
m_drawAsLine = drawAsLine;
}
-int GLState::GetLineWidth() const
+int RenderState::GetLineWidth() const
{
return m_lineWidth;
}
-void GLState::SetLineWidth(int width)
+void RenderState::SetLineWidth(int width)
{
m_lineWidth = width;
}
-bool GLState::operator<(GLState const & other) const
+bool RenderState::operator<(RenderState const & other) const
{
- if (!m_renderState->Equal(other.m_renderState))
- return m_renderState->Less(other.m_renderState);
+ if (!m_renderStateExtension->Equal(other.m_renderStateExtension))
+ return m_renderStateExtension->Less(other.m_renderStateExtension);
if (!(m_blending == other.m_blending))
return m_blending < other.m_blending;
if (m_gpuProgram != other.m_gpuProgram)
@@ -107,9 +107,9 @@ bool GLState::operator<(GLState const & other) const
return m_lineWidth < other.m_lineWidth;
}
-bool GLState::operator==(GLState const & other) const
+bool RenderState::operator==(RenderState const & other) const
{
- return m_renderState->Equal(other.m_renderState) &&
+ return m_renderStateExtension->Equal(other.m_renderStateExtension) &&
m_gpuProgram == other.m_gpuProgram &&
m_gpuProgram3d == other.m_gpuProgram3d &&
m_blending == other.m_blending &&
@@ -121,14 +121,14 @@ bool GLState::operator==(GLState const & other) const
m_lineWidth == other.m_lineWidth;
}
-bool GLState::operator!=(GLState const & other) const
+bool RenderState::operator!=(RenderState const & other) const
{
return !operator==(other);
}
uint8_t TextureState::m_usedSlots = 0;
-void TextureState::ApplyTextures(GLState const & state, ref_ptr<GpuProgram> program)
+void TextureState::ApplyTextures(RenderState const & state, ref_ptr<GpuProgram> program)
{
m_usedSlots = 0;
@@ -160,12 +160,12 @@ uint8_t TextureState::GetLastUsedSlots()
return m_usedSlots;
}
-void ApplyBlending(GLState const & state)
+void ApplyBlending(RenderState const & state)
{
state.GetBlending().Apply();
}
-void ApplyState(GLState const & state, ref_ptr<GpuProgram> program)
+void ApplyState(RenderState const & state, ref_ptr<GpuProgram> program)
{
TextureState::ApplyTextures(state, program);
ApplyBlending(state);
diff --git a/drape/glstate.hpp b/drape/render_state.hpp
index 9c3ca73b6a..333e4f696d 100644
--- a/drape/glstate.hpp
+++ b/drape/render_state.hpp
@@ -34,31 +34,31 @@ struct Blending
bool m_isEnabled;
};
-class BaseRenderState
+class BaseRenderStateExtension
{
public:
- virtual ~BaseRenderState() = default;
- virtual bool Less(ref_ptr<dp::BaseRenderState> other) const = 0;
- virtual bool Equal(ref_ptr<dp::BaseRenderState> other) const = 0;
+ virtual ~BaseRenderStateExtension() = default;
+ virtual bool Less(ref_ptr<dp::BaseRenderStateExtension> other) const = 0;
+ virtual bool Equal(ref_ptr<dp::BaseRenderStateExtension> other) const = 0;
};
-class GLState
+class RenderState
{
public:
template<typename ProgramType>
- GLState(ProgramType gpuProgram, ref_ptr<BaseRenderState> renderState)
- : m_renderState(std::move(renderState))
+ RenderState(ProgramType gpuProgram, ref_ptr<BaseRenderStateExtension> renderStateExtension)
+ : m_renderStateExtension(std::move(renderStateExtension))
, m_gpuProgram(static_cast<size_t>(gpuProgram))
, m_gpuProgram3d(static_cast<size_t>(gpuProgram))
{
- ASSERT(m_renderState != nullptr, ());
+ ASSERT(m_renderStateExtension != nullptr, ());
}
- template<typename RenderStateType>
- ref_ptr<RenderStateType> GetRenderState() const
+ template<typename RenderStateExtensionType>
+ ref_ptr<RenderStateExtensionType> GetRenderStateExtension() const
{
- ASSERT(dynamic_cast<RenderStateType *>(m_renderState.get()) != nullptr, ());
- return make_ref(static_cast<RenderStateType *>(m_renderState.get()));
+ ASSERT(dynamic_cast<RenderStateExtensionType *>(m_renderStateExtension.get()) != nullptr, ());
+ return make_ref(static_cast<RenderStateExtensionType *>(m_renderStateExtension.get()));
}
void SetColorTexture(ref_ptr<Texture> tex) { m_colorTexture = tex; }
@@ -93,12 +93,12 @@ public:
int GetLineWidth() const;
void SetLineWidth(int width);
- bool operator<(GLState const & other) const;
- bool operator==(GLState const & other) const;
- bool operator!=(GLState const & other) const;
+ bool operator<(RenderState const & other) const;
+ bool operator==(RenderState const & other) const;
+ bool operator!=(RenderState const & other) const;
private:
- ref_ptr<BaseRenderState> m_renderState;
+ ref_ptr<BaseRenderStateExtension> m_renderStateExtension;
size_t m_gpuProgram;
size_t m_gpuProgram3d;
Blending m_blending;
@@ -118,13 +118,13 @@ private:
class TextureState
{
public:
- static void ApplyTextures(GLState const & state, ref_ptr<GpuProgram> program);
+ static void ApplyTextures(RenderState const & state, ref_ptr<GpuProgram> program);
static uint8_t GetLastUsedSlots();
private:
static uint8_t m_usedSlots;
};
-void ApplyState(GLState const & state, ref_ptr<GpuProgram> program);
-void ApplyBlending(GLState const & state);
+void ApplyState(RenderState const & state, ref_ptr<GpuProgram> program);
+void ApplyBlending(RenderState const & state);
} // namespace dp