diff --git a/libc3/window/sdl2/demo/flies.c b/libc3/window/sdl2/demo/flies.c
index d78d908..d79b9bf 100644
--- a/libc3/window/sdl2/demo/flies.c
+++ b/libc3/window/sdl2/demo/flies.c
@@ -164,7 +164,6 @@ bool flies_render (s_sequence *seq)
s_map *map;
s_gl_matrix_4f matrix;
s_gl_matrix_4f matrix_1;
- s_gl_matrix_4f matrix_2;
uw r;
uw random_bits = 0;
f64 x;
@@ -209,7 +208,7 @@ bool flies_render (s_sequence *seq)
gl_font_set_size(&g_font_flies, board_item_h,
(f64) window->gl_h / window->h);
gl_text_update_1(&g_text_flies_in, a);
- gl_text_render(&g_text_flies_in);
+ gl_ortho_text_render(&g_ortho, &g_text_flies_in);
buf_init(&buf, false, sizeof(a), a);
buf_write_1(&buf, "Out ");
buf_inspect_uw(&buf, fly_out);
@@ -219,124 +218,123 @@ bool flies_render (s_sequence *seq)
gl_matrix_4f_translate(&g_ortho.model_matrix, x, 0.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
gl_text_update_1(&g_text_flies_out, a);
- gl_text_render(&g_text_flies_out);
- g_ortho.model_matrix = matrix;
- gl_matrix_4f_translate(&g_ortho.model_matrix, 0.0, board_item_h, 0.0);
- glBlendColor(0.6f, 0.7f, 0.9f, 1.0f);
- gl_ortho_rect(&g_ortho, 0, 0, board_w, board_h);
- address[1] = 0;
- while (address[1] < BOARD_SIZE) {
- y = board_item_h * address[1];
- address[0] = 0;
- while (address[0] < BOARD_SIZE) {
- x = board_item_w * address[0];
- matrix_1 = g_ortho.model_matrix; {
- gl_matrix_4f_translate(&g_ortho.model_matrix, x,
- board_h - board_item_h - y, 0.0);
- board_item = (u8 *) array_data(board, address);
- assert(board_item);
- switch (*board_item) {
- case BOARD_ITEM_SPACE:
- break;
- case BOARD_ITEM_BLOCK:
- glBindTexture(GL_TEXTURE_2D, 0);
- glBlendColor(0.0f, 0.0f, 1.0f, 1.0f);
- gl_ortho_rect(&g_ortho, 0, 0, board_item_w + 1.0, board_item_h + 1.0);
+ gl_ortho_text_render(&g_ortho, &g_text_flies_out);
+ } g_ortho.model_matrix = matrix;
+ gl_matrix_4f_translate(&g_ortho.model_matrix, 0.0, board_item_h, 0.0);
+ glBlendColor(0.6f, 0.7f, 0.9f, 1.0f);
+ gl_ortho_rect(&g_ortho, 0, 0, board_w, board_h);
+ address[1] = 0;
+ while (address[1] < BOARD_SIZE) {
+ y = board_item_h * address[1];
+ address[0] = 0;
+ while (address[0] < BOARD_SIZE) {
+ x = board_item_w * address[0];
+ matrix = g_ortho.model_matrix; {
+ gl_matrix_4f_translate(&g_ortho.model_matrix, x,
+ board_h - board_item_h - y, 0.0);
+ board_item = (u8 *) array_data(board, address);
+ assert(board_item);
+ switch (*board_item) {
+ case BOARD_ITEM_SPACE:
+ break;
+ case BOARD_ITEM_BLOCK:
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glBlendColor(0.0f, 0.0f, 1.0f, 1.0f);
+ gl_ortho_rect(&g_ortho, 0, 0, board_item_w + 1.0, board_item_h + 1.0);
+ break;
+ case BOARD_ITEM_FLY:
+ matrix_1 = g_ortho.model_matrix; {
+ gl_matrix_4f_translate(&g_ortho.model_matrix,
+ -board_item_w / 2.0,
+ -board_item_h / 2.0, 0.0);
+ gl_matrix_4f_scale(&g_ortho.model_matrix, fly_scale,
+ fly_scale, 1.0);
+ gl_ortho_update_model_matrix(&g_ortho);
+ gl_sprite_render(&g_sprite_fly, 0);
+ } g_ortho.model_matrix = matrix_1;
+ if (address[0] == BOARD_SIZE / 2 &&
+ address[1] == BOARD_SIZE - 1) {
+ array_data_set(board, address, &g_board_item_space);
+ (*fly_out)++;
+ fly_init(map);
break;
- case BOARD_ITEM_FLY:
- matrix_2 = g_ortho.model_matrix; {
- gl_matrix_4f_translate(&g_ortho.model_matrix,
- -board_item_w / 2.0,
- -board_item_h / 2.0, 0.0);
- gl_matrix_4f_scale(&g_ortho.model_matrix, fly_scale,
- fly_scale, 1.0);
- gl_ortho_update_model_matrix(&g_ortho);
- gl_sprite_render(&g_sprite_fly, 0);
- } g_ortho.model_matrix = matrix_2;
- if (address[0] == BOARD_SIZE / 2 &&
- address[1] == BOARD_SIZE - 1) {
- array_data_set(board, address, &g_board_item_space);
- (*fly_out)++;
- fly_init(map);
- break;
+ }
+ fly_address[0] = address[0];
+ fly_address[1] = address[1];
+ i = 0;
+ while (i < 3) {
+ j = 0;
+ while (j < 9) {
+ directions[j] = true;
+ j++;
}
- fly_address[0] = address[0];
- fly_address[1] = address[1];
- i = 0;
- while (i < 3) {
- j = 0;
- while (j < 9) {
- directions[j] = true;
- j++;
+ while (directions[0] | directions[1] | directions[2] |
+ directions[3] | directions[4] | directions[5] |
+ directions[6] | directions[7] | directions[8]) {
+ if (random_bits < 4) {
+ r = arc4random();
+ random_bits = 32;
}
- while (directions[0] | directions[1] | directions[2] |
- directions[3] | directions[4] | directions[5] |
- directions[6] | directions[7] | directions[8]) {
- if (random_bits < 4) {
- r = arc4random();
- random_bits = 32;
- }
- direction = r % 16;
- r >>= 4;
- random_bits -= 4;
- if (direction >= 12)
- direction = direction_prev;
- if (direction >= 9)
- direction = (direction - 6) % 3 + 6;
- fly_prev_address[0] = fly_address[0];
- fly_prev_address[1] = fly_address[1];
- switch (direction) {
- case 0: fly_address[0]--; fly_address[1]--; break;
- case 1: fly_address[1]--; break;
- case 2: fly_address[0]++; fly_address[1]--; break;
- case 3: fly_address[0]--; ; break;
- case 4: ; break;
- case 5: fly_address[0]++; ; break;
- case 6: fly_address[0]--; fly_address[1]++; break;
- case 7: fly_address[1]++; break;
- case 8: fly_address[0]++; fly_address[1]++; break;
- }
- if (fly_address[0] < BOARD_SIZE &&
- fly_address[1] < BOARD_SIZE &&
- (board_item = (u8 *) array_data(board,
- fly_address)) &&
- *board_item == g_board_item_space) {
- array_data_set(board, fly_prev_address,
- &g_board_item_space);
- array_data_set(board, fly_address, &g_board_item_fly);
- direction_prev = direction;
- break;
- }
- directions[direction] = false;
- fly_address[0] = fly_prev_address[0];
- fly_address[1] = fly_prev_address[1];
+ direction = r % 16;
+ r >>= 4;
+ random_bits -= 4;
+ if (direction >= 12)
+ direction = direction_prev;
+ if (direction >= 9)
+ direction = (direction - 6) % 3 + 6;
+ fly_prev_address[0] = fly_address[0];
+ fly_prev_address[1] = fly_address[1];
+ switch (direction) {
+ case 0: fly_address[0]--; fly_address[1]--; break;
+ case 1: fly_address[1]--; break;
+ case 2: fly_address[0]++; fly_address[1]--; break;
+ case 3: fly_address[0]--; ; break;
+ case 4: ; break;
+ case 5: fly_address[0]++; ; break;
+ case 6: fly_address[0]--; fly_address[1]++; break;
+ case 7: fly_address[1]++; break;
+ case 8: fly_address[0]++; fly_address[1]++; break;
}
- i++;
- }
- *fly_time += 1;
- if (*fly_time > FLY_TIME_MAX) {
- array_data_set(board, fly_address, &g_board_item_dead_fly);
- fly_init(map);
+ if (fly_address[0] < BOARD_SIZE &&
+ fly_address[1] < BOARD_SIZE &&
+ (board_item = (u8 *) array_data(board,
+ fly_address)) &&
+ *board_item == g_board_item_space) {
+ array_data_set(board, fly_prev_address,
+ &g_board_item_space);
+ array_data_set(board, fly_address, &g_board_item_fly);
+ direction_prev = direction;
+ break;
+ }
+ directions[direction] = false;
+ fly_address[0] = fly_prev_address[0];
+ fly_address[1] = fly_prev_address[1];
}
- break;
- case BOARD_ITEM_DEAD_FLY:
- matrix_2 = g_ortho.model_matrix; {
- gl_matrix_4f_translate(&g_ortho.model_matrix,
- -board_item_w / 2.0,
- -board_item_h / 2.0, 0.0);
- gl_matrix_4f_scale(&g_ortho.model_matrix, dead_fly_scale,
- dead_fly_scale, 1.0);
- gl_ortho_update_model_matrix(&g_ortho);
- gl_sprite_render(&g_sprite_dead_fly, 0);
- } g_ortho.model_matrix = matrix_2;
- break;
+ i++;
}
- } g_ortho.model_matrix = matrix_1;;
- address[0]++;
- }
- address[1]++;
+ *fly_time += 1;
+ if (*fly_time > FLY_TIME_MAX) {
+ array_data_set(board, fly_address, &g_board_item_dead_fly);
+ fly_init(map);
+ }
+ break;
+ case BOARD_ITEM_DEAD_FLY:
+ matrix_1 = g_ortho.model_matrix; {
+ gl_matrix_4f_translate(&g_ortho.model_matrix,
+ -board_item_w / 2.0,
+ -board_item_h / 2.0, 0.0);
+ gl_matrix_4f_scale(&g_ortho.model_matrix, dead_fly_scale,
+ dead_fly_scale, 1.0);
+ gl_ortho_update_model_matrix(&g_ortho);
+ gl_sprite_render(&g_sprite_dead_fly, 0);
+ } g_ortho.model_matrix = matrix_1;
+ break;
+ }
+ } g_ortho.model_matrix = matrix;
+ address[0]++;
}
- } g_ortho.model_matrix = matrix;
+ address[1]++;
+ }
return true;
}
diff --git a/libc3/window/sdl2/demo/window_sdl2_demo.c b/libc3/window/sdl2/demo/window_sdl2_demo.c
index d0a5a03..5934648 100644
--- a/libc3/window/sdl2/demo/window_sdl2_demo.c
+++ b/libc3/window/sdl2/demo/window_sdl2_demo.c
@@ -202,7 +202,6 @@ bool window_sdl2_demo_load (s_window_sdl2 *window)
return true;
}
-/*
static void render_text (s_gl_text *text, f64 x, f64 y)
{
assert(glGetError() == GL_NO_ERROR);
@@ -217,39 +216,39 @@ static void render_text (s_gl_text *text, f64 x, f64 y)
gl_ortho_update_model_matrix(&g_ortho);
glBlendColor(1.0f, 1.0f, 1.0f, 1.0f);
assert(glGetError() == GL_NO_ERROR);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
assert(glGetError() == GL_NO_ERROR);
gl_matrix_4f_translate(&g_ortho.model_matrix, 1.0, 0.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
gl_matrix_4f_translate(&g_ortho.model_matrix, 1.0, 0.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
gl_matrix_4f_translate(&g_ortho.model_matrix, 0.0, 1.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
gl_matrix_4f_translate(&g_ortho.model_matrix, -1.0, 0.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
gl_matrix_4f_translate(&g_ortho.model_matrix, -1.0, 0.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
gl_matrix_4f_translate(&g_ortho.model_matrix, 0.0, 1.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
gl_matrix_4f_translate(&g_ortho.model_matrix, 1.0, 0.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
gl_matrix_4f_translate(&g_ortho.model_matrix, 1.0, 0.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
glBlendColor(0.0f, 0.0f, 0.0f, 1.0f);
gl_matrix_4f_translate(&g_ortho.model_matrix, -1.0, -1.0, 0.0);
gl_ortho_update_model_matrix(&g_ortho);
- gl_text_render(text);
+ gl_ortho_text_render(&g_ortho, text);
assert(glGetError() == GL_NO_ERROR);
}
-*/
+
bool window_sdl2_demo_render (s_window_sdl2 *window)
{
s_sequence *seq;
@@ -274,56 +273,30 @@ bool window_sdl2_demo_render (s_window_sdl2 *window)
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
assert(glGetError() == GL_NO_ERROR);
- /*
gl_font_set_size(&g_font_courier_new, 20,
(f64) window->gl_h / window->h);
gl_text_update_1(&g_text_seq_title, seq->title);
render_text(&g_text_seq_title, 20.0f, 30.0f);
- */
/* progress bar */
- /*
+ gl_matrix_4f_init_identity(&g_ortho.model_matrix);
glDisable(GL_BLEND);
assert(glGetError() == GL_NO_ERROR);
- assert(glGetError() == GL_NO_ERROR);
- glBindTexture(GL_TEXTURE_2D, 0);
+ gl_ortho_bind_texture(&g_ortho, 0);
assert(glGetError() == GL_NO_ERROR);
glBlendColor(1.0f, 1.0f, 1.0f, 1.0f);
- gl_matrix_4f_init_identity(&g_ortho.model_matrix);
- gl_matrix_4f_translate(&g_ortho.model_matrix, 19.0, 11.0, 0);
- gl_matrix_4f_scale(&g_ortho.model_matrix,
- (window->w - 40.0) * seq->t / seq->duration + 2.0,
- 4.0, 0);
- gl_ortho_update_model_matrix(&g_ortho);
- gl_square_render(&g_square);
- */
- /*
- glRectd(19, 11,
- 19 + (window->w - 40.0) * seq->t / seq->duration + 2,
- 11 + 4);
- */
- /*
+ gl_ortho_rect(&g_ortho, 19, 11,
+ (window->w - 40.0) * seq->t / seq->duration + 2,
+ 4);
glBlendColor(0.0f, 0.0f, 0.0f, 1.0f);
- gl_matrix_4f_init_identity(&g_ortho.model_matrix);
- gl_matrix_4f_translate(&g_ortho.model_matrix, 20.0, 12.0, 0);
- gl_matrix_4f_scale(&g_ortho.model_matrix,
- (window->w - 40.0) * seq->t / seq->duration,
- 2.0, 0);
- gl_ortho_update_model_matrix(&g_ortho);
- gl_square_render(&g_square);
- */
- /*
- glRectd(20, 12,
- 20 + (window->w - 40.0) * seq->t / seq->duration,
- 12 + 2);
- */
+ gl_ortho_rect(&g_ortho, 20, 12,
+ (window->w - 40.0) * seq->t / seq->duration,
+ 2);
/* fps */
- /*
char fps[32];
snprintf(fps, sizeof(fps), "%.1f", (f64) seq->frame / seq->t);
gl_text_update_1(&g_text_fps, fps);
glEnable(GL_BLEND);
render_text(&g_text_fps, 20, window->h - 30);
- */
gl_ortho_render_end(&g_ortho);
return true;
}
diff --git a/libc3/window/sdl2/gl_ortho.c b/libc3/window/sdl2/gl_ortho.c
index db7aad7..ac5e2a7 100644
--- a/libc3/window/sdl2/gl_ortho.c
+++ b/libc3/window/sdl2/gl_ortho.c
@@ -13,8 +13,9 @@
#include <math.h>
#include <libc3/c3.h>
#include "gl_deprecated.h"
-#include "gl_ortho.h"
#include "gl_matrix_4f.h"
+#include "gl_ortho.h"
+#include "gl_square.h"
static const char * g_gl_ortho_vertex_shader_src =
"#version 330 core\n"
@@ -51,10 +52,26 @@ static const char * g_gl_ortho_fragment_shader_src =
" FragColor = vec4(1, 1, 1, 1);\n"
"}\n";
+void gl_ortho_bind_texture (s_gl_ortho *ortho, GLuint texture)
+{
+ assert(ortho);
+ assert(glGetError() == GL_NO_ERROR);
+ if (! texture) {
+ glUniform1i(ortho->gl_enable_texture_loc, 0);
+ assert(glGetError() == GL_NO_ERROR);
+ return;
+ }
+ glUniform1i(ortho->gl_enable_texture_loc, 1);
+ assert(glGetError() == GL_NO_ERROR);
+ glUniform1i(ortho->gl_texture_loc, texture);
+ assert(glGetError() == GL_NO_ERROR);
+}
+
void gl_ortho_clean (s_gl_ortho *ortho)
{
assert(ortho);
glDeleteProgram(ortho->gl_shader_program);
+ gl_square_clean(&ortho->square);
}
void gl_ortho_delete (s_gl_ortho *ortho)
@@ -69,6 +86,8 @@ s_gl_ortho * gl_ortho_init (s_gl_ortho *ortho)
GLint success;
GLuint vertex_shader;
assert(ortho);
+ if (! gl_square_init(&ortho->square, 2, 2))
+ return NULL;
gl_matrix_4f_init_identity(&ortho->projection_matrix);
gl_matrix_4f_ortho(&ortho->projection_matrix, -1, 1, -1, 1, 0, 1);
ortho->position.x = 0.0f;
@@ -149,6 +168,21 @@ s_gl_ortho * gl_ortho_new (void)
return ortho;
}
+void gl_ortho_rect (s_gl_ortho *ortho, f32 x, f32 y, f32 w, f32 h)
+{
+ s_gl_matrix_4f matrix;
+ assert(ortho);
+ assert(glGetError() == GL_NO_ERROR);
+ matrix = ortho->model_matrix;
+ gl_matrix_4f_translate(&ortho->model_matrix, x, y, 0.0f);
+ gl_matrix_4f_scale(&ortho->model_matrix, w, h, 1.0f);
+ gl_ortho_update_model_matrix(ortho);
+ assert(glGetError() == GL_NO_ERROR);
+ gl_square_render(&ortho->square);
+ assert(glGetError() == GL_NO_ERROR);
+ ortho->model_matrix = matrix;
+}
+
void gl_ortho_render (s_gl_ortho *ortho)
{
GLenum error;
@@ -203,6 +237,15 @@ void gl_ortho_resize (s_gl_ortho *ortho, f32 x1, f32 x2, f32 y1, f32 y2,
clip_z_near, clip_z_far);
}
+void gl_ortho_text_render (s_gl_ortho *ortho, const s_gl_text *text)
+{
+ assert(ortho);
+ assert(text);
+ gl_ortho_bind_texture(ortho, text->texture);
+ gl_ortho_rect(ortho, 0, 0, text->w, text->h);
+ gl_ortho_bind_texture(ortho, 0);
+}
+
void gl_ortho_update_model_matrix (s_gl_ortho *ortho)
{
assert(ortho);
diff --git a/libc3/window/sdl2/gl_ortho.h b/libc3/window/sdl2/gl_ortho.h
index a9f6fc5..8e06d15 100644
--- a/libc3/window/sdl2/gl_ortho.h
+++ b/libc3/window/sdl2/gl_ortho.h
@@ -25,10 +25,15 @@ void gl_ortho_delete (s_gl_ortho *ortho);
s_gl_ortho * gl_ortho_new (void);
/* Operators. */
+void gl_ortho_bind_texture (s_gl_ortho *ortho, GLuint texture);
+void gl_ortho_rect (s_gl_ortho *ortho, f32 x1, f32 x2, f32 y1,
+ f32 y2);
void gl_ortho_render (s_gl_ortho *ortho);
void gl_ortho_render_end (s_gl_ortho *ortho);
void gl_ortho_resize (s_gl_ortho *ortho, f32 x1, f32 x2, f32 y1,
f32 y2, f32 clip_z_near, f32 clip_z_far);
+void gl_ortho_text_render (s_gl_ortho *ortho,
+ const s_gl_text *text);
void gl_ortho_update_model_matrix (s_gl_ortho *ortho);
void gl_ortho_update_view_matrix (s_gl_ortho *ortho);
diff --git a/libc3/window/sdl2/gl_square.c b/libc3/window/sdl2/gl_square.c
index f56f6b2..8be5864 100644
--- a/libc3/window/sdl2/gl_square.c
+++ b/libc3/window/sdl2/gl_square.c
@@ -82,7 +82,7 @@ s_gl_square * gl_square_init (s_gl_square *square, uw seg_u, uw seg_v)
}
i++;
}
- gl_object_update(&square->object);
+ gl_object_update(&tmp.object);
*square = tmp;
return square;
}
diff --git a/libc3/window/sdl2/gl_text.h b/libc3/window/sdl2/gl_text.h
index af0f262..26b74cb 100644
--- a/libc3/window/sdl2/gl_text.h
+++ b/libc3/window/sdl2/gl_text.h
@@ -34,7 +34,4 @@ bool gl_text_update (s_gl_text *text);
bool gl_text_update_1 (s_gl_text *text, const char *p);
bool gl_text_update_buf (s_gl_text *text, s_buf *buf);
-/* Observers. */
-void gl_text_render (const s_gl_text *text);
-
#endif /* GL_TEXT_H */
diff --git a/libc3/window/sdl2/types.h b/libc3/window/sdl2/types.h
index 520cecd..918be94 100644
--- a/libc3/window/sdl2/types.h
+++ b/libc3/window/sdl2/types.h
@@ -83,6 +83,7 @@ typedef bool (*f_window_sdl2_sequence_render) (s_sequence *seq,
typedef void (*f_window_sdl2_unload) (s_window_sdl2 *window);
/* 1 */
+
struct gl_font {
FT_Face ft_face;
f32 point_size;
@@ -247,6 +248,7 @@ struct window_sdl2 {
};
/* 2 */
+
struct gl_camera {
f32 aspect_ratio;
f32 clip_z_far;
@@ -265,29 +267,6 @@ struct gl_cylinder {
uw segments_v;
};
-struct gl_ortho {
- f32 x1;
- f32 x2;
- f32 y1;
- f32 y2;
- f32 clip_z_near;
- f32 clip_z_far;
- s_gl_point_3f position;
- s_gl_point_3f rotation;
- s_gl_point_3f scale;
- s_gl_matrix_4f projection_matrix;
- u32 gl_projection_matrix_loc;
- s_gl_matrix_4f view_matrix;
- u32 gl_view_matrix_loc;
- s_gl_matrix_4f model_matrix;
- u32 gl_model_matrix_loc;
- u32 gl_color_loc;
- u32 gl_enable_texture_loc;
- u32 gl_texture_loc;
- u32 gl_shader_program;
- s_gl_square square;
-};
-
struct gl_sphere {
s_gl_object object;
uw segments_u;
@@ -340,4 +319,29 @@ struct sdl2_sprite {
GLuint *texture;
};
+/* 3 */
+
+struct gl_ortho {
+ f32 x1;
+ f32 x2;
+ f32 y1;
+ f32 y2;
+ f32 clip_z_near;
+ f32 clip_z_far;
+ s_gl_point_3f position;
+ s_gl_point_3f rotation;
+ s_gl_point_3f scale;
+ s_gl_matrix_4f projection_matrix;
+ u32 gl_projection_matrix_loc;
+ s_gl_matrix_4f view_matrix;
+ u32 gl_view_matrix_loc;
+ s_gl_matrix_4f model_matrix;
+ u32 gl_model_matrix_loc;
+ u32 gl_color_loc;
+ u32 gl_enable_texture_loc;
+ u32 gl_texture_loc;
+ u32 gl_shader_program;
+ s_gl_square square;
+};
+
#endif /* LIBC3_WINDOW_SDL2_TYPES_H */