Added Meshes and Animations (And many more)

Added NzTexture::IsMipmappingSupported
Color::(FromTo)HSV now takes hue and saturation in degrees
Fixed Context::EnsureContext
Fixed COW thread-safety (String, Image, Matrix4)
Fixed Quatenion<T>::operator*(const Vector3<T>&)
Fixed ResourceLoader
Fixed String::Resize with a size of 0
Fixed Texture mipmapping crash
Fixed per-class thread-safety
IndexBuffer and VertexBuffer are now resources
It is now possible to use more than 8 texcoords per shader
Moved all enumerations into separate files (Core/Enums.hpp,
Utility/Enums.hpp, ..)
Removed NzContextParameters::defaultWindow
VertexDeclaration has been rewritten (New interface/COW)
This commit is contained in:
Lynix
2012-07-13 15:22:14 +02:00
parent 5f95f0b677
commit 06eda4eba9
75 changed files with 3385 additions and 861 deletions

View File

@@ -4,6 +4,7 @@
#include <Nazara/Utility/VertexBuffer.hpp>
#include <Nazara/Core/Error.hpp>
#include <stdexcept>
#include <Nazara/Utility/Debug.hpp>
NzVertexBuffer::NzVertexBuffer(NzBuffer* buffer, unsigned int startVertex, unsigned int vertexCount) :
@@ -15,8 +16,8 @@ m_vertexCount(vertexCount)
#ifdef NAZARA_DEBUG
if (!m_buffer)
{
NazaraError("Passed buffer is null");
return;
NazaraError("Buffer is null");
throw std::invalid_argument("Buffer must be valid");
}
#endif
@@ -34,6 +35,7 @@ m_vertexCount(length)
}
NzVertexBuffer::NzVertexBuffer(const NzVertexBuffer& vertexBuffer) :
NzResource(true),
m_ownsBuffer(vertexBuffer.m_ownsBuffer),
m_startVertex(vertexBuffer.m_startVertex),
m_vertexCount(vertexBuffer.m_vertexCount)