]> icculus.org git repositories - dana/openbox.git/blob - render2/surface.h
add textures
[dana/openbox.git] / render2 / surface.h
1 #ifndef __render_surface_h
2 #define __render_surface_h
3
4 #include "render.h"
5 #include "texture.h"
6
7 struct RrPlanarSurface {
8     enum RrSurfaceColorType colortype;
9
10     struct RrColor primary;
11     struct RrColor secondary;
12 };
13
14 struct RrNonPlanarSurface {
15     int foo;
16 };
17
18 union RrSurfaceData {
19     struct RrPlanarSurface planar;
20     struct RrNonPlanarSurface nonplanar;
21 };
22
23 struct RrSurface {
24     struct RrInstance *inst;
25
26     enum RrSurfaceType type;
27     union RrSurfaceData data;
28
29     /* This member is created inside Render if parent != NULL, but is passed
30        in if parent == NULL and should not be destroyed!
31
32        Always check for this to be None before rendering it. Just skip by
33        (and assert) if it is None.
34     */
35     Window win; /* XXX this can optionally be None if parent != NULL ... */
36
37     int ntextures;
38     struct RrTexture *texture;
39
40     struct RrSurface *parent;
41     int parentx;
42     int parenty;
43 };
44
45 struct RrTexture *RrSurfaceTexture(struct RrSurface *sur, int texnum);
46
47 #endif