Replaced std::map with std::unordered_map
Not possible yet with NzString-key map Former-commit-id: faa628a1c9c10e7bc009bf5a67e112ad5f873bd8
This commit is contained in:
parent
2e4c27188f
commit
857d2dd9ed
|
|
@ -192,7 +192,7 @@ NzString NzGLSLShader::GetSourceCode(nzShaderType type) const
|
|||
|
||||
int NzGLSLShader::GetUniformLocation(const NzString& name) const
|
||||
{
|
||||
std::map<NzString, GLint>::const_iterator it = m_idCache.find(name);
|
||||
auto it = m_idCache.find(name);
|
||||
GLint id;
|
||||
if (it == m_idCache.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ class NzGLSLShader : public NzShaderImpl, NzResourceListener
|
|||
const NzTexture* texture;
|
||||
};
|
||||
|
||||
mutable std::map<NzString, GLint> m_idCache;
|
||||
std::map<GLint, TextureSlot> m_textures;
|
||||
mutable std::map<NzString, GLint> m_idCache; ///FIXME: unordered_map
|
||||
std::map<GLint, TextureSlot> m_textures; ///FIXME: unordered_map
|
||||
GLuint m_program;
|
||||
GLuint m_shaders[nzShaderType_Max+1];
|
||||
NzShader* m_parent;
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
#include <Nazara/Core/Log.hpp>
|
||||
#include <Nazara/Renderer/Renderer.hpp>
|
||||
#include <Nazara/Renderer/Shader.hpp>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <Nazara/Renderer/Debug.hpp>
|
||||
|
||||
namespace
|
||||
{
|
||||
std::map<nzUInt32, NzShader*> s_shaders;
|
||||
std::unordered_map<nzUInt32, NzShader*> s_shaders;
|
||||
|
||||
NzString BuildFragmentShaderSource(nzUInt32 flags)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@
|
|||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/Renderer.hpp>
|
||||
#include <Nazara/Renderer/Texture.hpp>
|
||||
#include <unordered_map>
|
||||
#include <Nazara/Renderer/Debug.hpp>
|
||||
|
||||
namespace
|
||||
{
|
||||
std::map<nzUInt32, GLuint> s_samplers;
|
||||
std::unordered_map<nzUInt32, GLuint> s_samplers;
|
||||
nzUInt8 s_maxAnisotropyLevel;
|
||||
bool s_useAnisotropicFilter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <Nazara/Utility/PixelFormat.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Utility/Debug.hpp>
|
||||
|
||||
namespace
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
struct NzSkeletonImpl
|
||||
{
|
||||
std::map<NzString, unsigned int> jointMap;
|
||||
std::map<NzString, unsigned int> jointMap; ///FIXME: unordered_map
|
||||
std::vector<NzJoint> joints;
|
||||
NzAxisAlignedBox aabb;
|
||||
bool jointMapUpdated = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue