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

@@ -11,7 +11,7 @@
#include <Nazara/Core/String.hpp>
#include <Nazara/Math/Vector3.hpp>
class NzColor
class NAZARA_API NzColor
{
public:
NzColor();
@@ -47,15 +47,15 @@ class NzColor
nzUInt8 r, g, b, a;
static NAZARA_API const NzColor Black;
static NAZARA_API const NzColor Blue;
static NAZARA_API const NzColor Cyan;
static NAZARA_API const NzColor Green;
static NAZARA_API const NzColor Magenta;
static NAZARA_API const NzColor Orange;
static NAZARA_API const NzColor Red;
static NAZARA_API const NzColor Yellow;
static NAZARA_API const NzColor White;
static const NzColor Black;
static const NzColor Blue;
static const NzColor Cyan;
static const NzColor Green;
static const NzColor Magenta;
static const NzColor Orange;
static const NzColor Red;
static const NzColor Yellow;
static const NzColor White;
private:
static float Hue2RGB(float v1, float v2, float vH);

View File

@@ -2,6 +2,7 @@
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <iterator>
#include <Nazara/Core/Debug.hpp>
template<typename T>
@@ -244,4 +245,17 @@ bool NzSparsePtr<T>::operator>=(const NzSparsePtr& ptr) const
return m_ptr >= ptr.m_ptr;
}
namespace std
{
template<typename T>
struct iterator_traits<NzSparsePtr<T>>
{
using difference_type = ptrdiff_t;
using iterator_category = random_access_iterator_tag;
using reference = const T&;
using pointer = const T*;
using value_type = T;
};
}
#include <Nazara/Core/DebugOff.hpp>

View File

@@ -11,6 +11,7 @@
#include <Nazara/Graphics/DeferredRenderPass.hpp>
#include <Nazara/Renderer/RenderStates.hpp>
#include <Nazara/Renderer/Shader.hpp>
#include <unordered_map>
class NAZARA_API NzDeferredGeometryPass : public NzDeferredRenderPass
{

View File

@@ -35,7 +35,7 @@ class NAZARA_API NzForwardRenderTechnique : public NzAbstractRenderTechnique
private:
struct ShaderUniforms;
bool ChooseLights(const NzSpheref& object, bool includeDirectionalLights = true) const;
void ChooseLights(const NzSpheref& object, bool includeDirectionalLights = true) const;
void DrawBasicSprites(const NzSceneData& sceneData) const;
void DrawBillboards(const NzSceneData& sceneData) const;
void DrawOpaqueModels(const NzSceneData& sceneData) const;

View File

@@ -11,6 +11,7 @@
#include <Nazara/Graphics/Material.hpp>
#include <Nazara/Graphics/SceneNode.hpp>
#include <Nazara/Utility/VertexStruct.hpp>
#include <array>
class NAZARA_API NzSprite : public NzSceneNode
{
@@ -55,7 +56,7 @@ class NAZARA_API NzSprite : public NzSceneNode
NzMaterialRef m_material;
NzRectf m_textureCoords;
NzVector2f m_size;
mutable NzVertexStruct_XYZ_Color_UV m_vertices[4];
mutable std::array<NzVertexStruct_XYZ_Color_UV, 4> m_vertices;
mutable bool m_verticesUpdated;
};

View File

@@ -96,7 +96,7 @@ class NAZARA_API NzLuaInstance : NzNonCopyable
bool IsOfType(int index, const NzString& tname) const;
bool IsValid(int index) const;
unsigned int Length(int index) const;
long long Length(int index) const;
void MoveTo(NzLuaInstance* instance, int n);

View File

@@ -70,8 +70,8 @@ class NAZARA_API NzRenderTexture : public NzRenderTarget, NzNonCopyable
private:
void OnContextDestroy(const NzContext* context);
void OnRenderBufferDestroy(const NzRenderBuffer* renderBuffer, int attachmentIndex);
void OnTextureDestroy(const NzTexture* texture, int attachmentIndex);
void OnRenderBufferDestroy(const NzRenderBuffer* renderBuffer, unsigned int attachmentIndex);
void OnTextureDestroy(const NzTexture* texture, unsigned int attachmentIndex);
void UpdateDrawBuffers() const;
void UpdateSize() const;
void UpdateTargets() const;

View File

@@ -3,6 +3,7 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Utility/IndexMapper.hpp>
#include <iterator>
#include <Nazara/Utility/Debug.hpp>
inline NzIndexIterator::NzIndexIterator() :
@@ -155,4 +156,17 @@ inline NzIndexIterator::Reference::operator nzUInt32() const
return m_mapper->Get(m_index);
}
namespace std
{
template<>
struct iterator_traits<NzIndexIterator>
{
using difference_type = ptrdiff_t;
using iterator_category = random_access_iterator_tag;
using reference = const NzIndexIterator::Reference&;
using pointer = const NzIndexIterator::Reference*;
using value_type = NzIndexIterator::Reference;
};
}
#include <Nazara/Core/DebugOff.hpp>