More VS fixes

Former-commit-id: 356effb816b9527ff9e89ee3b99074c468455b08
This commit is contained in:
Lynix
2015-06-13 19:42:07 +02:00
parent 009d860d6c
commit 251e21f006
35 changed files with 121 additions and 79 deletions

View File

@@ -151,7 +151,7 @@ bool NzRenderTexture::AttachBuffer(nzAttachmentPoint attachmentPoint, nzUInt8 in
Attachment& attachment = m_impl->attachments[attachIndex];
attachment.attachmentPoint = attachmentPoint;
attachment.buffer = buffer;
attachment.renderBufferDestroySlot.Connect(buffer->OnRenderBufferDestroy, std::bind(OnRenderBufferDestroy, this, std::placeholders::_1, attachIndex));
attachment.renderBufferDestroySlot.Connect(buffer->OnRenderBufferDestroy, std::bind(&NzRenderTexture::OnRenderBufferDestroy, this, std::placeholders::_1, attachIndex));
attachment.isBuffer = true;
attachment.isUsed = true;
attachment.height = buffer->GetHeight();
@@ -292,7 +292,7 @@ bool NzRenderTexture::AttachTexture(nzAttachmentPoint attachmentPoint, nzUInt8 i
attachment.isUsed = true;
attachment.height = texture->GetHeight();
attachment.texture = texture;
attachment.textureDestroySlot.Connect(texture->OnTextureDestroy, std::bind(OnTextureDestroy, this, std::placeholders::_1, attachIndex));
attachment.textureDestroySlot.Connect(texture->OnTextureDestroy, std::bind(&NzRenderTexture::OnTextureDestroy, this, std::placeholders::_1, attachIndex));
attachment.width = texture->GetWidth();
m_impl->checked = false;
@@ -339,7 +339,7 @@ bool NzRenderTexture::Create(bool lock)
m_impl = impl.release();
m_impl->context = NzContext::GetCurrent();
m_impl->contextDestroySlot.Connect(m_impl->context->OnContextDestroy, this, OnContextDestroy);
m_impl->contextDestroySlot.Connect(m_impl->context->OnContextDestroy, this, &NzRenderTexture::OnContextDestroy);
if (lock)
{
@@ -882,7 +882,7 @@ void NzRenderTexture::OnContextDestroy(const NzContext* context)
Destroy();
}
void NzRenderTexture::OnRenderBufferDestroy(const NzRenderBuffer* renderBuffer, int attachmentIndex)
void NzRenderTexture::OnRenderBufferDestroy(const NzRenderBuffer* renderBuffer, unsigned int attachmentIndex)
{
NazaraAssert(m_impl, "Invalid internal state");
NazaraAssert(attachmentIndex < m_impl->attachments.size(), "Invalid attachment index");
@@ -898,7 +898,7 @@ void NzRenderTexture::OnRenderBufferDestroy(const NzRenderBuffer* renderBuffer,
m_impl->targetsUpdated = false;
}
void NzRenderTexture::OnTextureDestroy(const NzTexture* texture, int attachmentIndex)
void NzRenderTexture::OnTextureDestroy(const NzTexture* texture, unsigned int attachmentIndex)
{
NazaraAssert(m_impl, "Invalid internal state");
NazaraAssert(attachmentIndex < m_impl->attachments.size(), "Invalid attachment index");

View File

@@ -1676,7 +1676,7 @@ bool NzRenderer::EnsureStateUpdate()
if (update)
{
// Pour éviter la duplication de code, on va utiliser une astuce via une boucle for
for (unsigned int i = 0; i < (s_instancing ? 2 : 1); ++i)
for (unsigned int i = 0; i < (s_instancing ? 2U : 1U); ++i)
{
// Selon l'itération nous choisissons un buffer différent
const NzVertexBuffer* vertexBuffer = (i == 0) ? s_vertexBuffer : &s_instanceBuffer;

View File

@@ -7,6 +7,7 @@
#ifndef NAZARA_CONTEXTIMPL_HPP
#define NAZARA_CONTEXTIMPL_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Renderer/ContextParameters.hpp>
#include <windows.h>