| 121 | } |
| 122 | |
| 123 | void Gui::triangle_3d(const Matrix4x4 &local_pose, const Vector3 &a, const Vector3 &b, const Vector3 &c, const Color4 &color, f32 depth) |
| 124 | { |
| 125 | VertexData *vd = (VertexData *)_buffer->vertex_buffer_end(); |
| 126 | vd[0].pos.x = a.x; |
| 127 | vd[0].pos.y = a.y; |
| 128 | vd[0].pos.z = a.z; |
| 129 | vd[0].uv.x = 0.0f; |
| 130 | vd[0].uv.y = 0.0f; |
| 131 | vd[0].col = to_abgr(color); |
| 132 | |
| 133 | vd[1].pos.x = b.x; |
| 134 | vd[1].pos.y = b.y; |
| 135 | vd[1].pos.z = b.z; |
| 136 | vd[1].uv.x = 1.0f; |
| 137 | vd[1].uv.y = 0.0f; |
| 138 | vd[1].col = to_abgr(color); |
| 139 | |
| 140 | vd[2].pos.x = c.x; |
| 141 | vd[2].pos.y = c.y; |
| 142 | vd[2].pos.z = c.z; |
| 143 | vd[2].uv.x = 1.0f; |
| 144 | vd[2].uv.y = 1.0f; |
| 145 | vd[2].col = to_abgr(color); |
| 146 | |
| 147 | u16 *inds = (u16 *)_buffer->index_buffer_end(); |
| 148 | inds[0] = 0; |
| 149 | inds[1] = 1; |
| 150 | inds[2] = 2; |
| 151 | |
| 152 | _buffer->submit(3, 3, local_pose*_world, *_gui_shader, _view, depth_u32(depth)); |
| 153 | } |
| 154 | |
| 155 | void Gui::triangle(const Vector2 &a, const Vector2 &b, const Vector2 &c, const Color4 &color, f32 depth) |
| 156 | { |
no test coverage detected