~melchizedek6809/WolkenWelten

ref: e910bd82e598d6f560b8899dd1d88fb3ed554cd3 WolkenWelten/common/src/gfx_structs.h -rw-r--r-- 989 bytes
e910bd82Ben (X13/Arch) Updated contact info 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#include "stdint.h"
#include <time.h>
#include "../nujel/lib/vec.h"

typedef struct {
	uint ID,w,h,d;
	const char *filename;
} texture;

#pragma pack(push, 1)
typedef struct vertex {
	float x,y,z;
	float u,v;
	float c;
} vertex;

typedef struct vertexFlat {
	float x,y,z;
	u32 rgba;
} vertexFlat;

typedef struct vertex2D {
	i16 x,y;
	i16 u,v;
	u32 rgba;
} vertex2D;
#pragma pack(pop)

typedef struct {
	vertex2D *dataBuffer;
	int sx,sy,mx,my,wrap,size,font;
	u32 fgc, bgc;
	uint vao,vbo,usage,dataCount,bufferSize,vboSize;
	texture *tex;
	int finished;
} textMesh;

typedef struct {
	texture *tex;
	const vertex *roData;
	uint dataCount,vboSize;
	uint vbo,vao;
	void *nextFree;
} mesh;

typedef struct {
	uint pID;
	uint vsID,fsID;
	char *vss,*fss;
	uint attrMask;
  int lMVP,lAlpha,lColor,lTransform,lSideTint,lSizeMul;
} shader;

#pragma pack(push, 1)
typedef struct {
	float x,y,z,size;
} glRainDrop;
#pragma pack(pop)

typedef struct {
	float vx,vy,vz,vsize;
} rainDrop;