DebugDrawer will now auto-initialize

Former-commit-id: 62756d6aa2e4cc25be93cb27c4698cfb3fc0e6d8
This commit is contained in:
Lynix 2013-09-20 16:21:50 +02:00
parent 197bddb6ba
commit 8073e70090
1 changed files with 14 additions and 14 deletions

View File

@ -50,9 +50,9 @@ void NzDebugDrawer::Draw(const NzBoxi& box)
void NzDebugDrawer::Draw(const NzBoxf& box)
{
if (!s_initialized)
if (!s_initialized && !Initialize())
{
NazaraError("Debug drawer is not initialized");
NazaraError("Failed to initialize Debug Drawer");
return;
}
@ -141,9 +141,9 @@ void NzDebugDrawer::Draw(const NzBoxui& box)
void NzDebugDrawer::Draw(const NzFrustumf& frustum)
{
if (!s_initialized)
if (!s_initialized && !Initialize())
{
NazaraError("Debug drawer is not initialized");
NazaraError("Failed to initialize Debug Drawer");
return;
}
@ -223,9 +223,9 @@ void NzDebugDrawer::Draw(const NzFrustumf& frustum)
void NzDebugDrawer::Draw(const NzOrientedBoxf& orientedBox)
{
if (!s_initialized)
if (!s_initialized && !Initialize())
{
NazaraError("Debug drawer is not initialized");
NazaraError("Failed to initialize Debug Drawer");
return;
}
@ -305,9 +305,9 @@ void NzDebugDrawer::Draw(const NzOrientedBoxf& orientedBox)
void NzDebugDrawer::Draw(const NzSkeleton* skeleton)
{
if (!s_initialized)
if (!s_initialized && !Initialize())
{
NazaraError("Debug drawer is not initialized");
NazaraError("Failed to initialize Debug Drawer");
return;
}
@ -356,9 +356,9 @@ void NzDebugDrawer::Draw(const NzSkeleton* skeleton)
void NzDebugDrawer::DrawBinormals(const NzStaticMesh* subMesh)
{
if (!s_initialized)
if (!s_initialized && !Initialize())
{
NazaraError("Debug drawer is not initialized");
NazaraError("Failed to initialize Debug Drawer");
return;
}
@ -403,9 +403,9 @@ void NzDebugDrawer::DrawBinormals(const NzStaticMesh* subMesh)
void NzDebugDrawer::DrawNormals(const NzStaticMesh* subMesh)
{
if (!s_initialized)
if (!s_initialized && !Initialize())
{
NazaraError("Debug drawer is not initialized");
NazaraError("Failed to initialize Debug Drawer");
return;
}
@ -450,9 +450,9 @@ void NzDebugDrawer::DrawNormals(const NzStaticMesh* subMesh)
void NzDebugDrawer::DrawTangents(const NzStaticMesh* subMesh)
{
if (!s_initialized)
if (!s_initialized && !Initialize())
{
NazaraError("Debug drawer is not initialized");
NazaraError("Failed to initialize Debug Drawer");
return;
}