summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_gl_buffer_base.eo
blob: df5376365eb1ecd89a9cdfcea847dc39593507f1 (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
47
48
49
50
51
52
53
54
55
56
57
mixin Ector.GL.Buffer.Base (Ector.Buffer)
{
   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 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;
         }
      }
   }
}