Built basic UI Grid.

This commit is contained in:
2021-09-07 09:07:53 -07:00
parent 6c10429dfb
commit 6c3bf3eeb0
13 changed files with 315 additions and 49 deletions

View File

@ -12,6 +12,7 @@
#define SHADER_UNI_PROJ "u_Proj"
#define SHADER_UNI_TEXT "u_Text"
#define SHADER_UNI_MODL "u_Modl"
#define SHADER_UNI_COLR "u_Colr"
/** Representation of a shader uniform */
typedef GLuint shaderuniform_t;
@ -41,4 +42,7 @@ typedef struct {
/** Uniform for the current model world position */
shaderuniform_t uniModl;
/** Uniform for the color multiplier */
shaderuniform_t uniColr;
} shader_t;

View File

@ -25,3 +25,10 @@ typedef struct {
/** RGBA Color values */
uint8_t r, g, b, a;
} pixel_t;
#define PIXEL_COLOR_WHITE ((pixel_t){ .r = 255, .g = 255, .b = 255, .a = 255 })
#define PIXEL_COLOR_RED ((pixel_t){ .r = 255, .g = 0, .b = 0, .a = 255 })
#define PIXEL_COLOR_GREEN ((pixel_t){ .r = 0, .g = 255, .b = 0, .a = 255 })
#define PIXEL_COLOR_BLUE ((pixel_t){ .r = 0, .g = 0, .b = 255, .a = 255 })
#define PIXEL_COLOR_BLACK ((pixel_t){ .r = 0, .g = 0, .b = 0, .a = 255 })
#define PIXEL_COLOR_TRANSPARENT ((pixel_t){ .r = 0, .g = 0, .b = 0, .a = 0 })

View File

@ -17,6 +17,7 @@
#define POKER_PLAYER_UI_IMAGE_DIST 0.8f
#define POKER_PLAYER_UI_IMAGE_Y 0.1f
#define POKER_PLAYER_UI_PADDING 8
#define POKER_PLAYER_UI_CHIPS_ANIMATION_SPEED 0.5f
typedef struct {
label_t label;

View File

@ -12,13 +12,20 @@
#include "../../display/font.h"
#include "../../display/primitive.h"
#include "../../display/renderlist.h"
#include "../../display/texture.h"
#define GRID_BRUH_COUNT 1
typedef struct {
float x, y, width, height;
} gridbruh_t;
typedef struct {
camera_t camera;
renderlist_t list;
shader_t shader;
primitive_t primitive;
texture_t texture;
primitive_t cube;
shader_t shader;
gridbruh_t items[GRID_BRUH_COUNT];
} sandboxscene_t;