Home | History | Annotate | Download | only in hwui

Lines Matching refs:vertex

26  * Simple structure to describe a vertex with a position and a texture.
28 struct Vertex {
40 static inline void set(Vertex* vertex, float x, float y) {
41 vertex[0].position[0] = x;
42 vertex[0].position[1] = y;
45 static inline void set(Vertex* vertex, vec2 val) {
46 set(vertex, val.x, val.y);
49 static inline void copyWithOffset(Vertex* vertex, const Vertex& src, float x, float y) {
50 set(vertex, src.position[0] + x, src.position[1] + y);
53 }; // struct Vertex
56 * Simple structure to describe a vertex with a position and texture UV.
62 static inline void set(TextureVertex* vertex, float x, float y, float u, float v) {
63 vertex[0].position[0] = x;
64 vertex[0].position[1] = y;
65 vertex[0].texture[0] = u;
66 vertex[0].texture[1] = v;
69 static inline void setUV(TextureVertex* vertex, float u, float v) {
70 vertex[0].texture[0] = u;
71 vertex[0].texture[1] = v;
76 * Simple structure to describe a vertex with a position, texture UV and ARGB color.
81 static inline void set(ColorTextureVertex* vertex, float x, float y,
83 TextureVertex::set(vertex, x, y, u, v);
86 vertex[0].color[0] = a * ((color >> 16) & 0xff) / 255.0f;
87 vertex[0].color[1] = a * ((color >> 8) & 0xff) / 255.0f;
88 vertex[0].color[2] = a * ((color ) & 0xff) / 255.0f;
89 vertex[0].color[3] = a;
94 * Simple structure to describe a vertex with a position and an alpha value.
96 struct AlphaVertex : Vertex {
99 static inline void set(AlphaVertex* vertex, float x, float y, float alpha) {
100 Vertex::set(vertex, x, y);
101 vertex[0].alpha = alpha;
104 static inline void copyWithOffset(AlphaVertex* vertex, const AlphaVertex& src,
106 Vertex::set(vertex, src.position[0] + x, src.position[1] + y);
107 vertex[0].alpha = src.alpha;
110 static inline void setColor(AlphaVertex* vertex, float alpha) {
111 vertex[0].alpha = alpha;