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