summaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-01-06 15:54:41 -0500
committerrealtradam <[email protected]>2023-01-06 15:54:41 -0500
commitca0a1a771cae0d226776414b8d0f7700784922e5 (patch)
treed1a627a9a99d0d2b6ffeb8db8c5b7577848d7018 /src/main.c
parent730e2b54cd5542a07a55dc44a57ab3f12cd70337 (diff)
downloadrodeo_sample_game-ca0a1a771cae0d226776414b8d0f7700784922e5.tar.gz
rodeo_sample_game-ca0a1a771cae0d226776414b8d0f7700784922e5.zip
updated engine
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c39
1 files changed, 35 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 6a0f475..78e1484 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);
}