Compare commits
6 Commits
cadba71330
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 45e3bc83a9 | |||
| 40b5bb1634 | |||
| 054a3bbdd7 | |||
|
|
f8b859b4e8 | ||
|
|
d94c7f8c63 | ||
|
|
cdb02bd209 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@ raylib-build
|
|||||||
*.data
|
*.data
|
||||||
*.ods
|
*.ods
|
||||||
*.dSYM
|
*.dSYM
|
||||||
|
*.out
|
||||||
|
|||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
|||||||
[submodule "wapp"]
|
[submodule "wapp"]
|
||||||
path = wapp
|
path = wapp
|
||||||
url = git@git.thewizardapprentice.com:abdelrahman/wizapp-stdlib
|
url = https://git.thewizardapprentice.com/abdelrahman/wizapp-stdlib
|
||||||
[submodule "raylib-src"]
|
[submodule "raylib-src"]
|
||||||
path = raylib-src
|
path = raylib-src
|
||||||
url = git@github.com:raysan5/raylib
|
url = https://github.com/raysan5/raylib
|
||||||
|
|||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Data-Oriented Design Test
|
||||||
|
|
||||||
|
Playing around with [DOD](https://en.wikipedia.org/wiki/Data-oriented_design) concepts and comparing performance of resulting applications.
|
||||||
4
dod.c
4
dod.c
@@ -92,7 +92,7 @@ int main(void) {
|
|||||||
|
|
||||||
SetTraceLogLevel(LOG_NONE);
|
SetTraceLogLevel(LOG_NONE);
|
||||||
InitWindow(WIDTH, HEIGHT, "DOD test");
|
InitWindow(WIDTH, HEIGHT, "DOD test");
|
||||||
// SetTargetFPS(target_fps);
|
SetTargetFPS(target_fps);
|
||||||
|
|
||||||
Allocator arena = wapp_mem_arena_allocator_init(MB(20));
|
Allocator arena = wapp_mem_arena_allocator_init(MB(20));
|
||||||
assert(!wapp_mem_allocator_invalid(&arena));
|
assert(!wapp_mem_allocator_invalid(&arena));
|
||||||
@@ -134,7 +134,7 @@ int main(void) {
|
|||||||
|
|
||||||
ClearBackground(BG_COLOR);
|
ClearBackground(BG_COLOR);
|
||||||
|
|
||||||
// render_entities(manager.tags, manager.rects, manager.count);
|
render_entities(manager.tags, manager.rects, manager.count);
|
||||||
|
|
||||||
DrawFPS(10, 10);
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
|
|||||||
16
no_dod.c
16
no_dod.c
@@ -50,7 +50,7 @@ f32 get_random_float(XOR256State *state);
|
|||||||
int main(void) {
|
int main(void) {
|
||||||
SetTraceLogLevel(LOG_NONE);
|
SetTraceLogLevel(LOG_NONE);
|
||||||
InitWindow(WIDTH, HEIGHT, "No-DOD test");
|
InitWindow(WIDTH, HEIGHT, "No-DOD test");
|
||||||
// SetTargetFPS(120);
|
SetTargetFPS(120);
|
||||||
|
|
||||||
Allocator arena = wapp_mem_arena_allocator_init(MB(20));
|
Allocator arena = wapp_mem_arena_allocator_init(MB(20));
|
||||||
XOR256State state = wapp_prng_xorshift_init_state();
|
XOR256State state = wapp_prng_xorshift_init_state();
|
||||||
@@ -84,13 +84,13 @@ int main(void) {
|
|||||||
|
|
||||||
ClearBackground(BG_COLOR);
|
ClearBackground(BG_COLOR);
|
||||||
|
|
||||||
// for (u64 i = 0; i < ZONE_COUNT; ++i) {
|
for (u64 i = 0; i < ZONE_COUNT; ++i) {
|
||||||
// render_slow_zone(&(zones[i]));
|
render_slow_zone(&(zones[i]));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// for (u64 i = 0; i < WANDERER_COUNT; ++i) {
|
for (u64 i = 0; i < WANDERER_COUNT; ++i) {
|
||||||
// render_wanderer(&(wanderers[i]));
|
render_wanderer(&(wanderers[i]));
|
||||||
// }
|
}
|
||||||
|
|
||||||
DrawFPS(10, 10);
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user