polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

ui.h (507B)


      1 
      2 #ifndef POLYADVENT_UI_H
      3 #define POLYADVENT_UI_H
      4 
      5 #include "common.h"
      6 #include "shader.h"
      7 #include "geometry.h"
      8 
      9 struct ui {
     10 	struct gpu_program *shader;
     11 	struct geometry_id quad_geom_id;
     12 
     13 	GLint texture;
     14 	float uipos[2];
     15 	float uisize[2];
     16 
     17 	float *mvp;
     18 	float ortho[MAT4_ELEMS];
     19 };
     20 
     21 void create_ui(struct ui *ui, int width, int height,
     22                struct gpu_program *);
     23 
     24 void resize_ui(struct ui *ui, int width, int height);
     25 void render_ui(struct ui *ui, float *camera);
     26 
     27 
     28 #endif /* POLYADVENT_UI_H */