Demo update and start counting tests times

-Fixed performance issue with multithreading and rendering
-start making better shaders (by using many macros)
-speed up rendeing when maximum objects count was reached
-remove map rendering form Snake demo, and render entities by themself
-start adding depth and color rendering parameters
-added properly names to jobs (for debugging purpses)
-starts adding multithreaded rendering
-added some math to vectors
-changes execute() to willExecute(). Probably should have different name.
This commit is contained in:
Mergul 2020-05-07 14:07:07 +02:00
parent 46aba822d0
commit 4bd5a37b5d
13 changed files with 429 additions and 198 deletions

View file

@ -9,6 +9,8 @@ import bubel.ecs.vector;
import bubel.ecs.simple_vector;
import bubel.ecs.std;
import tests.time;
enum int ASSERTED = 123;
enum string OUT_FILE = "test_report.xml";
@ -95,6 +97,8 @@ struct TestRunner(Args...)
write(test.name);
write("\" classname=\"");
write(suite.name);
write("\" time=\"");
write(cast(double)test.time*0.000001);
write("\">");
if (test.msg)
{
@ -189,8 +193,10 @@ struct TestRunner(Args...)
}
else
{
long time = Time.getUSecTime();
unittest_();
test.passed = true;
test.time = cast(int)(Time.getUSecTime() - time);
}
}
else
@ -281,6 +287,14 @@ struct TestRunner(Args...)
junit.add(cast(ubyte[]) txt);
}
void write(double num)
{
ubyte[40] buffer;
int len;
len = sprintf(cast(char*) buffer.ptr, "%2.8lf", num);
junit.add(buffer[0 .. len]);
}
void write(uint num)
{
ubyte[20] buffer;