This commit is contained in:
Jérôme Leclercq
2018-04-16 12:56:15 +02:00
30 changed files with 1352 additions and 128 deletions

View File

@@ -88,6 +88,7 @@
#include <Nazara/Core/StringStream.hpp>
#include <Nazara/Core/TaskScheduler.hpp>
#include <Nazara/Core/Thread.hpp>
#include <Nazara/Core/TypeTag.hpp>
#include <Nazara/Core/Unicode.hpp>
#include <Nazara/Core/Updatable.hpp>

View File

@@ -56,7 +56,7 @@ namespace Nz
Buffer m_vertexBuffer;
RenderStates m_clearStates;
ShaderRef m_clearShader;
Texture m_whiteTexture;
TextureRef m_whiteTexture;
VertexBuffer m_billboardPointBuffer;
VertexBuffer m_spriteBuffer;

View File

@@ -66,7 +66,7 @@ namespace Nz
Buffer m_vertexBuffer;
RenderStates m_clearStates;
ShaderRef m_clearShader;
Texture m_whiteTexture;
TextureRef m_whiteTexture;
VertexBuffer m_billboardPointBuffer;
VertexBuffer m_spriteBuffer;
mutable DepthRenderQueue m_renderQueue;

View File

@@ -88,13 +88,13 @@ namespace Nz
mutable std::vector<std::pair<const VertexStruct_XYZ_Color_UV*, std::size_t>> m_spriteChains;
Buffer m_vertexBuffer;
mutable BasicRenderQueue m_renderQueue;
Texture m_whiteTexture;
TextureRef m_whiteCubemap;
TextureRef m_whiteTexture;
VertexBuffer m_billboardPointBuffer;
VertexBuffer m_spriteBuffer;
unsigned int m_maxLightPassPerObject;
static IndexBuffer s_quadIndexBuffer;
static Texture s_dummyReflection;
static TextureSampler s_reflectionSampler;
static TextureSampler s_shadowSampler;
static VertexBuffer s_quadVertexBuffer;

View File

@@ -34,6 +34,7 @@ namespace Nz
virtual std::size_t GetGlyphCount() const = 0;
virtual const Line& GetLine(std::size_t index) const = 0;
virtual std::size_t GetLineCount() const = 0;
inline std::size_t GetLineGlyphCount(std::size_t index) const;
struct Glyph
{
@@ -53,4 +54,6 @@ namespace Nz
};
}
#include <Nazara/Utility/AbstractTextDrawer.inl>
#endif // NAZARA_ABSTRACTTEXTDRAWER_HPP

View File

@@ -0,0 +1,23 @@
// Copyright (C) 2017 Jérôme Leclercq
// 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/AbstractTextDrawer.hpp>
#include <Nazara/Utility/Debug.hpp>
namespace Nz
{
inline std::size_t AbstractTextDrawer::GetLineGlyphCount(std::size_t index) const
{
std::size_t lineCount = GetLineCount();
const auto& lineInfo = GetLine(index);
if (index == lineCount - 1)
return GetGlyphCount() - lineInfo.glyphIndex;
const auto& nextLineInfo = GetLine(index + 1);
return nextLineInfo.glyphIndex - lineInfo.glyphIndex;
}
}
#include <Nazara/Utility/DebugOff.hpp>