blob: 6b1e964b30f4da04776144f8cd0e412fa4ade647 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#pragma once
#include <cetris.h>
typedef struct {
GLuint vao;
GLuint vbo;
GLuint ebo;
GLuint texture;
GLfloat w;
GLfloat h;
GLfloat *vertices;
} drawable_t;
void new_rectangle(drawable_t* drawable);
void update_rect(drawable_t *drawable, GLfloat x, GLfloat y, GLfloat w, GLfloat h, GLfloat window_width, GLfloat window_height);
void set_block_texture(drawable_t *drawable, uint8_t mino);
bool load_image(char* file_name, drawable_t *drawable);
void crop_texture(drawable_t *drawable, int h, int w);
|