Changed Resource::SetPersistent default argument

Former-commit-id: 803534a0216d85f96e6f6f7810e5e76ebcc8bb44
This commit is contained in:
Lynix 2013-03-24 01:07:01 +01:00
parent b5d73ce389
commit 5dd2d0d6a7
5 changed files with 11 additions and 9 deletions

View File

@ -52,7 +52,7 @@ class NAZARA_API NzResource
bool RemoveResourceListener(NzResourceListener* listener) const;
bool RemoveResourceReference() const;
void SetPersistent(bool persistent = true, bool checkReferenceCount = true);
void SetPersistent(bool persistent = true, bool checkReferenceCount = false);
protected:
void NotifyCreated();

View File

@ -24,7 +24,7 @@ namespace
NazaraUnused(parameters);
std::unique_ptr<NzMesh> mesh(new NzMesh);
mesh->SetPersistent(false, false);
mesh->SetPersistent(false);
if (!mesh->LoadFromStream(stream))
{
NazaraError("Failed to load model mesh");
@ -44,7 +44,7 @@ namespace
if (!animationPath.IsEmpty())
{
std::unique_ptr<NzAnimation> animation(new NzAnimation);
animation->SetPersistent(false, false);
animation->SetPersistent(false);
if (animation->LoadFromFile(animationPath, parameters.animation) && model->SetAnimation(animation.get()))
animation.release();
else
@ -62,7 +62,7 @@ namespace
if (!mat.IsEmpty())
{
std::unique_ptr<NzMaterial> material(new NzMaterial);
material->SetPersistent(false, false);
material->SetPersistent(false);
if (material->LoadFromFile(mat, parameters.material))
{
model->SetMaterial(i, material.get());

View File

@ -23,7 +23,7 @@ namespace
NazaraUnused(parameters);
std::unique_ptr<NzTexture> texture(new NzTexture);
texture->SetPersistent(false, false);
texture->SetPersistent(false);
if (!texture->LoadFromStream(stream))
{

View File

@ -23,6 +23,7 @@
#include <Nazara/Utility/VertexBuffer.hpp>
#include <Nazara/Utility/VertexDeclaration.hpp>
#include <map>
#include <memory>
#include <stdexcept>
#include <tuple>
#include <vector>
@ -746,7 +747,7 @@ bool NzRenderer::Initialize(bool initializeDebugDrawer)
elements[1].type = nzElementType_Float2;
elements[1].usage = nzElementUsage_TexCoord;
NzVertexDeclaration* declaration = new NzVertexDeclaration;
std::unique_ptr<NzVertexDeclaration> declaration(new NzVertexDeclaration);
if (!declaration->Create(elements, 2))
{
NazaraError("Failed to create quad declaration");
@ -755,9 +756,10 @@ bool NzRenderer::Initialize(bool initializeDebugDrawer)
return false;
}
declaration->SetPersistent(false, false);
declaration->SetPersistent(false);
s_quadBuffer = new NzVertexBuffer(declaration, 4, nzBufferStorage_Hardware, nzBufferUsage_Dynamic);
s_quadBuffer = new NzVertexBuffer(declaration.get(), 4, nzBufferStorage_Hardware, nzBufferUsage_Dynamic);
declaration.release();
if (initializeDebugDrawer && !NzDebugDrawer::Initialize())
NazaraWarning("Failed to initialize debug drawer"); // Non-critique

View File

@ -452,7 +452,7 @@ namespace
}
shader->SetFlags(flags);
shader->SetPersistent(false, false);
shader->SetPersistent(false);
return shader.release();
}