summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_gl_buffer_base.eo
blob: 36562aeb8da1509aa44905d4d86e3dd7a61fc009 (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
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 use to map this image with no rotation]]
         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]]
         }
      }
   }
   implements {
   }
}