Added proper debug line renderer!
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "EngineNetAPI.h"
|
||||
#include <Coral/String.hpp>
|
||||
#include <src/Core/Maths.h>
|
||||
#include <Engine.h>
|
||||
#include "src/Rendering/SceneRenderer.h"
|
||||
|
||||
namespace Nuake {
|
||||
|
||||
@@ -8,9 +11,19 @@ namespace Nuake {
|
||||
Logger::Log(string, ".net", VERBOSE);
|
||||
}
|
||||
|
||||
void DrawLine(float startX, float startY, float startZ, float endX, float endY, float endZ, float r, float g, float b, float a, float life)
|
||||
{
|
||||
const Vector3 start = { startX, startY, startZ };
|
||||
const Vector3 end = { endX, endY, endZ };
|
||||
const Vector4 color = { r, g, b, a };
|
||||
|
||||
Engine::GetCurrentScene()->m_SceneRenderer->DrawDebugLine(start, end, color, life);
|
||||
}
|
||||
|
||||
void EngineNetAPI::RegisterMethods()
|
||||
{
|
||||
RegisterMethod("Engine.LoggerLogIcall", (void*)(&Log));
|
||||
RegisterMethod("Debug.DrawLineIcall", &DrawLine);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user