summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_gl_buffer_base.eo
blob: b78388057ea082b3a95d48f37cbc5dba0ad1a3e9 (plain) (blame)
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
64
65
66
67
68
69
70
71
mixin Ector.GL.Buffer.Base (Ector.Generic.Buffer)
{
   legacy_prefix: null;
   methods {
      @property texture {
         get {}
         values {
            texid: int; [[GL texture ID]]
         }
      }
      @property fbo {
         get {}
         values {
            fboid: int; [[GL framebuffer ID, 0 if there is no FBO]]
         }
      }
      @property whole {
         [[If $true, the image is covering the entire GL texture, ie. it's not
           part of an atlas.
         ]]
         get {}
         values {
            is_whole: bool;
         }
      }
      @property size {
         [[The size in pixels of this image.

           If the image is whole, then this is equal to the atlas size.
         ]]
         get {}
         values {
            w: int;
            h: int;
         }
      }
      @property vertices {
         [[Returns the texture vertices to draw this image with no rotation

           The 4 points are then defined as (x,y), (x+w,y), (x,y+h), (x+w,y+h).
         ]]
         get {}
         values {
            x: double; [[X position of this image inside the texture atlas, from 0 to 1]]
            y: double; [[Y position of this image inside the texture atlas, from 0 to 1]]
            w: double; [[Width of this image inside the texture atlas, from 0 to 1]]
            h: double; [[Height of this image inside the texture atlas, from 0 to 1]]
         }
      }
      attach @protected {
         [[Attach to an existing texture (or FBO). Used from child classes.]]
         params {
            texid: int;
            fboid: int;
            cspace: Efl.Gfx.Colorspace;
            imw: int;
            imh: int;
            tx: int;
            ty: int;
            tw: int;
            th: int;
            l: int;
            r: int;
            t: int;
            b: int;
         }
      }
   }
   implements {
   }
}