Renamed XImpl to AbstractX (More consistent)
Where * is Buffer, Hash and Shader Former-commit-id: a99681ab1d515c9b39e6ba5f447c9000ef1092b8
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/File.hpp>
|
||||
#include <Nazara/Core/AbstractHash.hpp>
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/Hash.hpp>
|
||||
#include <Nazara/Core/HashImpl.hpp>
|
||||
#include <Nazara/Core/StringStream.hpp>
|
||||
#include <cstring>
|
||||
#include <utility>
|
||||
@@ -631,7 +631,7 @@ NzHashDigest NzFile::GetHash(const NzString& filePath, nzHash hash)
|
||||
return h.Hash(file);
|
||||
}
|
||||
|
||||
NzHashDigest NzFile::GetHash(const NzString& filePath, NzHashImpl* hash)
|
||||
NzHashDigest NzFile::GetHash(const NzString& filePath, NzAbstractHash* hash)
|
||||
{
|
||||
NzFile file(filePath);
|
||||
|
||||
@@ -707,7 +707,7 @@ bool NzFile::Rename(const NzString& sourcePath, const NzString& targetPath)
|
||||
return NzFileImpl::Rename(NormalizePath(sourcePath), NormalizePath(targetPath));
|
||||
}
|
||||
|
||||
bool NzFile::FillHash(NzHashImpl* hash) const
|
||||
bool NzFile::FillHash(NzAbstractHash* hash) const
|
||||
{
|
||||
NzFile file(m_filePath);
|
||||
if (!file.Open(NzFile::ReadOnly))
|
||||
|
||||
@@ -56,7 +56,7 @@ NzHash::NzHash(nzHash hash)
|
||||
}
|
||||
}
|
||||
|
||||
NzHash::NzHash(NzHashImpl* hashImpl) :
|
||||
NzHash::NzHash(NzAbstractHash* hashImpl) :
|
||||
m_impl(hashImpl)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ NzHashDigest NzHashable::GetHash(nzHash hash) const
|
||||
return h.Hash(*this);
|
||||
}
|
||||
|
||||
NzHashDigest NzHashable::GetHash(NzHashImpl* impl) const
|
||||
NzHashDigest NzHashable::GetHash(NzAbstractHash* impl) const
|
||||
{
|
||||
NzHash h(impl);
|
||||
return h.Hash(*this);
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Core/AbstractHash.hpp>
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/HashImpl.hpp>
|
||||
#include <Nazara/Core/Unicode.hpp>
|
||||
#include <Nazara/Math/Basic.hpp>
|
||||
#include <algorithm>
|
||||
@@ -5094,7 +5094,7 @@ void NzString::EnsureOwnership()
|
||||
}
|
||||
}
|
||||
|
||||
bool NzString::FillHash(NzHashImpl* hazh) const
|
||||
bool NzString::FillHash(NzAbstractHash* hazh) const
|
||||
{
|
||||
hazh->Append(reinterpret_cast<const nzUInt8*>(m_sharedString->string), m_sharedString->size);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/ShaderImpl.hpp>
|
||||
#include <Nazara/Renderer/AbstractShader.hpp>
|
||||
#include <Nazara/Renderer/Debug.hpp>
|
||||
|
||||
NzShaderImpl::~NzShaderImpl() = default;
|
||||
NzAbstractShader::~NzAbstractShader() = default;
|
||||
@@ -4,18 +4,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SHADERIMPL_HPP
|
||||
#define NAZARA_SHADERIMPL_HPP
|
||||
#ifndef NAZARA_ABSTRACTSHADER_HPP
|
||||
#define NAZARA_ABSTRACTSHADER_HPP
|
||||
|
||||
#include <Nazara/Renderer/Shader.hpp>
|
||||
|
||||
class NzShaderImpl
|
||||
class NzAbstractShader
|
||||
{
|
||||
friend class NzRenderer;
|
||||
|
||||
public:
|
||||
NzShaderImpl() = default;
|
||||
virtual ~NzShaderImpl();
|
||||
NzAbstractShader() = default;
|
||||
virtual ~NzAbstractShader();
|
||||
|
||||
virtual bool Bind() = 0;
|
||||
virtual bool BindTextures() = 0;
|
||||
@@ -51,4 +51,4 @@ class NzShaderImpl
|
||||
virtual bool SendVector(int location, const NzVector4f& vector) = 0;
|
||||
};
|
||||
|
||||
#endif // NAZARA_SHADERIMPL_HPP
|
||||
#endif // NAZARA_ABSTRACTSHADER_HPP
|
||||
@@ -9,14 +9,14 @@
|
||||
|
||||
#include <Nazara/Core/ResourceListener.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Renderer/AbstractShader.hpp>
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
#include <Nazara/Renderer/Shader.hpp>
|
||||
#include <Nazara/Renderer/ShaderImpl.hpp>
|
||||
#include <map>
|
||||
|
||||
class NzResource;
|
||||
|
||||
class NzGLSLShader : public NzShaderImpl, NzResourceListener
|
||||
class NzGLSLShader : public NzAbstractShader, NzResourceListener
|
||||
{
|
||||
public:
|
||||
NzGLSLShader(NzShader* parent);
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
#include <Nazara/Utility/BufferImpl.hpp>
|
||||
#include <Nazara/Utility/AbstractBuffer.hpp>
|
||||
|
||||
class NzHardwareBuffer : public NzBufferImpl
|
||||
class NzHardwareBuffer : public NzAbstractBuffer
|
||||
{
|
||||
public:
|
||||
NzHardwareBuffer(NzBuffer* parent, nzBufferType type);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <Nazara/Core/Color.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/Log.hpp>
|
||||
#include <Nazara/Renderer/AbstractShader.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/Context.hpp>
|
||||
#include <Nazara/Renderer/DebugDrawer.hpp>
|
||||
@@ -15,9 +16,8 @@
|
||||
#include <Nazara/Renderer/RenderTarget.hpp>
|
||||
#include <Nazara/Renderer/Shader.hpp>
|
||||
#include <Nazara/Renderer/ShaderBuilder.hpp>
|
||||
#include <Nazara/Renderer/ShaderImpl.hpp>
|
||||
#include <Nazara/Renderer/Loaders/Texture.hpp>
|
||||
#include <Nazara/Utility/BufferImpl.hpp>
|
||||
#include <Nazara/Utility/AbstractBuffer.hpp>
|
||||
#include <Nazara/Utility/IndexBuffer.hpp>
|
||||
#include <Nazara/Utility/Utility.hpp>
|
||||
#include <Nazara/Utility/VertexBuffer.hpp>
|
||||
@@ -62,7 +62,7 @@ namespace
|
||||
bool textureUpdated = true;
|
||||
};
|
||||
|
||||
NzBufferImpl* HardwareBufferFunction(NzBuffer* parent, nzBufferType type)
|
||||
NzAbstractBuffer* HardwareBufferFunction(NzBuffer* parent, nzBufferType type)
|
||||
{
|
||||
return new NzHardwareBuffer(parent, type);
|
||||
}
|
||||
@@ -1433,7 +1433,7 @@ bool NzRenderer::EnsureStateUpdate()
|
||||
}
|
||||
#endif
|
||||
|
||||
NzShaderImpl* shaderImpl;
|
||||
NzAbstractShader* shaderImpl;
|
||||
|
||||
if (s_updateFlags & Update_Shader)
|
||||
{
|
||||
@@ -1664,7 +1664,10 @@ bool NzRenderer::EnsureStateUpdate()
|
||||
}
|
||||
}
|
||||
else
|
||||
glDisableVertexAttribArray(NzOpenGL::AttributeIndex[nzElementUsage_TexCoord]+8);
|
||||
{
|
||||
for (unsigned int i = 8; i < 8+4; ++i)
|
||||
glDisableVertexAttribArray(NzOpenGL::AttributeIndex[nzElementUsage_TexCoord]+i);
|
||||
}
|
||||
|
||||
if (s_indexBuffer)
|
||||
{
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/File.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Renderer/AbstractShader.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/GLSLShader.hpp>
|
||||
#include <Nazara/Renderer/Renderer.hpp>
|
||||
#include <Nazara/Renderer/ShaderImpl.hpp>
|
||||
#include <stdexcept>
|
||||
#include <Nazara/Renderer/Debug.hpp>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Utility/BufferImpl.hpp>
|
||||
#include <Nazara/Utility/AbstractBuffer.hpp>
|
||||
#include <Nazara/Utility/Debug.hpp>
|
||||
|
||||
NzBufferImpl::~NzBufferImpl() = default;
|
||||
NzAbstractBuffer::~NzAbstractBuffer() = default;
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <Nazara/Utility/Buffer.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Utility/BufferImpl.hpp>
|
||||
#include <Nazara/Utility/AbstractBuffer.hpp>
|
||||
#include <Nazara/Utility/BufferMapper.hpp>
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <Nazara/Utility/SoftwareBuffer.hpp>
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
NzBufferImpl* SoftwareBufferFunction(NzBuffer* parent, nzBufferType type)
|
||||
NzAbstractBuffer* SoftwareBufferFunction(NzBuffer* parent, nzBufferType type)
|
||||
{
|
||||
return new NzSoftwareBuffer(parent, type);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ bool NzBuffer::Create(unsigned int length, nzUInt8 typeSize, nzBufferStorage sto
|
||||
return false;
|
||||
}
|
||||
|
||||
NzBufferImpl* impl = s_bufferFunctions[storage](this, m_type);
|
||||
NzAbstractBuffer* impl = s_bufferFunctions[storage](this, m_type);
|
||||
if (!impl->Create(length*typeSize, usage))
|
||||
{
|
||||
NazaraError("Failed to create buffer");
|
||||
@@ -136,7 +136,7 @@ bool NzBuffer::Fill(const void* data, unsigned int offset, unsigned int length,
|
||||
return m_impl->Fill(data, offset*m_typeSize, ((length == 0) ? m_length-offset : length)*m_typeSize, forceDiscard);
|
||||
}
|
||||
|
||||
NzBufferImpl* NzBuffer::GetImpl() const
|
||||
NzAbstractBuffer* NzBuffer::GetImpl() const
|
||||
{
|
||||
return m_impl;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ bool NzBuffer::SetStorage(nzBufferStorage storage)
|
||||
return false;
|
||||
}
|
||||
|
||||
NzBufferImpl* impl = s_bufferFunctions[storage](this, m_type);
|
||||
NzAbstractBuffer* impl = s_bufferFunctions[storage](this, m_type);
|
||||
if (!impl->Create(m_length*m_typeSize, m_usage))
|
||||
{
|
||||
NazaraError("Failed to create buffer");
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#define NAZARA_SOFTWAREBUFFER_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Utility/BufferImpl.hpp>
|
||||
#include <Nazara/Utility/AbstractBuffer.hpp>
|
||||
|
||||
class NzSoftwareBuffer : public NzBufferImpl
|
||||
class NzSoftwareBuffer : public NzAbstractBuffer
|
||||
{
|
||||
public:
|
||||
NzSoftwareBuffer(NzBuffer* parent, nzBufferType type);
|
||||
|
||||
Reference in New Issue
Block a user