diff options
| -rw-r--r-- | .vimrc | 2 | ||||
| m--------- | external/RodeoEngine | 0 | ||||
| -rw-r--r-- | src/compile_flags.txt | 2 | ||||
| -rw-r--r-- | src/main.c | 39 |
4 files changed, 38 insertions, 5 deletions
@@ -1,2 +1,2 @@ " press F5 to compile and execute the project code -map <f5> :AsyncRun -save=1 -cwd=<root> ./build ; ./run <CR> +map <f5> :AsyncRun -save=1 -cwd=<root> ./build && ./run <CR> diff --git a/external/RodeoEngine b/external/RodeoEngine -Subproject b1f855a82b40f1caeaf4d672638f2cfc933c804 +Subproject 729a6b3b9cb0315106c87079a0eba9b294f0215 diff --git a/src/compile_flags.txt b/src/compile_flags.txt index f138ece..671824b 100644 --- a/src/compile_flags.txt +++ b/src/compile_flags.txt @@ -1,2 +1,4 @@ -I./ -I../external/RodeoEngine/include +-I../external/RodeoEngine/external/bgfx/include +-I../external/RodeoEngine/external/bx/include @@ -1,24 +1,55 @@ #include <stdio.h> #include <stdbool.h> -//#include "SDL2/SDL.h" -//#include "SDL2/SDL_syswm.h" -//#include "bgfx/c99/bgfx.h" #include "rodeo.h" Rodeo__data_t _state = {0}; Rodeo__data_t *state = &_state; +const struct Rodeo__color_rgba_t red = +{ + 1.0f, 0.0f, 0.0f, + 1.0f +}; +const struct Rodeo__color_rgba_t green = +{ + 0.0f, 1.0f, 0.0f, + 1.0f +}; +const struct Rodeo__color_rgba_t blue = +{ + 0.0f, 0.0f, 1.0f, + 1.0f +}; +const struct Rodeo__color_rgba_t pink = +{ + 1.0f, 0.0f, 1.0f, + 1.0f +}; + int main() { Rodeo__init_window(state, 480, 640, "Rodeo Window"); + while(!state->quit) { Rodeo__begin(state); + Rodeo__draw_rectangle(state, -1, 0, 1, 1, pink); + + Rodeo__draw_rectangle(state, 100, 100, 50, 50, red); + Rodeo__draw_rectangle(state, 100, 160, 50, 50, green); + Rodeo__draw_rectangle(state, 160, 100, 50, 50, blue); + Rodeo__draw_rectangle(state, 160, 160, 50, 50, pink); + - Rodeo__draw_debug_text(1, 1, "Debug %s Test", "Text"); + Rodeo__draw_debug_text( + 1, + 1, + " using %s renderer ", + Rodeo__get_renderer_name_as_string() + ); Rodeo__end(state); } |
