summaryrefslogtreecommitdiff
path: root/cubedbus.h
blob: 8fa9adf35ff7042af92d705a402231e7cbd6234b (plain)
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
#include <stdbool.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

#include "cubedbus-types.h"

#include <compiz-core.h>

typedef struct _CubedbusObject CubedbusObject;
typedef struct _CubedbusColourObject CubedbusColourObject;
typedef struct _CubedbusTextureObject CubedbusTextureObject;

static bool cubedbusDrawColourObject (CubedbusObject *obj);
static bool cubedbusDrawTextureObject (CubedbusObject *obj);


/* Struct containing pointer to data struct and pointer to function to draw */

struct _CubedbusObject
{
	int type;
	char *name;
	
	bool (*func) (CubedbusObject *obj);
	void *data;

	CubedbusObject *next;
	CubedbusObject *prev;
};


/* Structs for data for each type */

struct _CubedbusColourObject
{
GLuint dList;
bool order;
float rotate[4], translate[3], scale[3];
};

struct _CubedbusTextureObject
{
GLuint dList;
};