Renamed XImpl to AbstractX (More consistent)

Where * is Buffer, Hash and Shader


Former-commit-id: a99681ab1d515c9b39e6ba5f447c9000ef1092b8
This commit is contained in:
Lynix
2013-05-21 13:54:10 +02:00
parent 4b68ff0118
commit 8f09eea340
31 changed files with 78 additions and 106 deletions

View File

@@ -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))

View File

@@ -56,7 +56,7 @@ NzHash::NzHash(nzHash hash)
}
}
NzHash::NzHash(NzHashImpl* hashImpl) :
NzHash::NzHash(NzAbstractHash* hashImpl) :
m_impl(hashImpl)
{
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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>

View File

@@ -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;

View File

@@ -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");

View File

@@ -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);