]> icculus.org git repositories - dana/openbox.git/blob - render2/texture.h
obsolete
[dana/openbox.git] / render2 / texture.h
1 #ifndef __render_texture_h
2 #define __render_texture_h
3
4 #include "render.h"
5 #include <GL/gl.h>
6
7 enum RrTextureType {
8     RR_TEXTURE_NONE,
9     RR_TEXTURE_TEXT,
10     RR_TEXTURE_RGBA
11 };
12
13 struct RrTextureText {
14     struct RrFont *font;
15     enum RrLayout layout;
16     struct RrColor color;
17     char *string;
18 };
19
20 struct RrTextureRGBA {
21     GLuint texid;
22     int x;
23     int y;
24     int w;
25     int h;
26 };
27
28 struct RrTexture;
29
30 void RrTextureFreeContents(struct RrTexture *tex);
31
32 union RrTextureData {
33     struct RrTextureText text;
34     struct RrTextureRGBA rgba;
35 };
36
37 struct RrTexture {
38     enum RrTextureType type;
39     union RrTextureData data;
40 };
41
42 void RrTexturePaint(struct RrSurface *sur, struct RrTexture *tex);
43
44 #endif