Merge branch 'master' into NDK

Conflicts:
	include/Nazara/Core/Algorithm.inl
	include/Nazara/Core/ByteArray.hpp
	include/Nazara/Math/Algorithm.inl
	src/Nazara/Graphics/SkyboxBackground.cpp

Former-commit-id: 42f52f71989fa805f69527fd07edb8405df06566
This commit is contained in:
Lynix
2015-08-21 18:55:58 +02:00
76 changed files with 2358 additions and 833 deletions

View File

@@ -367,6 +367,25 @@ void NzDebugDrawer::Draw(const NzVector3f& position, float size)
Draw(NzBoxf(position.x - size*0.5f, position.y - size*0.5f, position.z - size*0.5f, size, size, size));
}
void NzDebugDrawer::DrawAxes(const NzVector3f& position, float size)
{
NzColor oldPrimaryColor = s_primaryColor;
s_primaryColor = NzColor::Red;
DrawLine(position, position + NzVector3f::UnitX() * 3.f * size / 4.f);
s_primaryColor = NzColor::Green;
DrawLine(position, position + NzVector3f::UnitY() * 3.f * size / 4.f);
s_primaryColor = NzColor::Blue;
DrawLine(position, position + NzVector3f::UnitZ() * 3.f * size / 4.f);
s_primaryColor = NzColor::Red;
DrawCone(position + NzVector3f::UnitX() * size, NzEulerAnglesf(0.f, 90.f, 0.f), 15, size / 4.f);
s_primaryColor = NzColor::Green;
DrawCone(position + NzVector3f::UnitY() * size, NzEulerAnglesf(-90.f, 0.f, 0.f), 15, size / 4.f);
s_primaryColor = NzColor::Blue;
DrawCone(position + NzVector3f::UnitZ() * size, NzEulerAnglesf(0.f, 0.f, 0.f), 15, size / 4.f);
s_primaryColor = oldPrimaryColor;
}
void NzDebugDrawer::DrawBinormals(const NzStaticMesh* subMesh)
{
if (!Initialize())

View File

@@ -1994,7 +1994,8 @@ void NzRenderer::UpdateMatrix(nzMatrixType type)
// Matrices combinées
case nzMatrixType_ViewProj:
s_matrices[nzMatrixType_ViewProj].matrix = s_matrices[nzMatrixType_View].matrix * s_matrices[nzMatrixType_Projection].matrix;
s_matrices[nzMatrixType_ViewProj].matrix = s_matrices[nzMatrixType_View].matrix;
s_matrices[nzMatrixType_ViewProj].matrix.Concatenate(s_matrices[nzMatrixType_Projection].matrix);
s_matrices[nzMatrixType_ViewProj].updated = true;
break;

View File

@@ -199,7 +199,7 @@ NzByteArray NzShader::GetBinary() const
if (binaryLength > 0)
{
byteArray.Resize(sizeof(nzUInt64) + binaryLength);
byteArray.Reserve(sizeof(nzUInt64) + binaryLength);
nzUInt8* buffer = byteArray.GetBuffer();

View File

@@ -174,7 +174,7 @@ bool NzShaderStage::SetSourceFromFile(const NzString& filePath)
#endif
NzFile file(filePath);
if (!file.Open(NzFile::ReadOnly | NzFile::Text))
if (!file.Open(nzOpenMode_ReadOnly | nzOpenMode_Text))
{
NazaraError("Failed to open \"" + filePath + '"');
return false;

View File

@@ -156,7 +156,7 @@ void NzUberShaderPreprocessor::SetShader(nzShaderStage stage, const NzString& so
bool NzUberShaderPreprocessor::SetShaderFromFile(nzShaderStage stage, const NzString& filePath, const NzString& shaderFlags, const NzString& requiredFlags)
{
NzFile file(filePath);
if (!file.Open(NzFile::ReadOnly | NzFile::Text))
if (!file.Open(nzOpenMode_ReadOnly | nzOpenMode_Text))
{
NazaraError("Failed to open \"" + filePath + '"');
return false;