Merge branch 'NDK' into NDK-ShadowMapping

Conflicts:
	include/Nazara/Math/Matrix4.inl

Former-commit-id: e4b7d178a7acba17c03de2b585af86324b8d75a6
This commit is contained in:
Lynix
2015-09-13 12:10:30 +02:00
100 changed files with 3553 additions and 1359 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

@@ -2002,7 +2002,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;