drawClippedTriangles
Render a triangle list using the idx indexes into the vtx vertexes
clipped to to clipr (if given). Vertex positions and clipr are in
physical pixels. If texture is given, the vertexes uv coords are
normalized (0-1). clipr (if given) has whole pixel values.
Parameters
- self:Backend
- Backend
- texture:?dvui.Texture
- ?dvui.Texture
- vtx:[]const dvui.Vertex
- []const dvui.Vertex
- idx:[]const dvui.Vertex.Index
- []const dvui.Vertex.Index
- clipr:?dvui.Rect.Physical
- ?dvui.Rect.Physical
Source
Implementation
pub fn drawClippedTriangles(self: Backend, texture: ?dvui.Texture, vtx: []const dvui.Vertex, idx: []const dvui.Vertex.Index, clipr: ?dvui.Rect.Physical) GenericError!void {
if (dvui.render_backend.kind == .default) {
try self.impl.drawClippedTriangles(texture, vtx, idx, clipr);
} else {
try self.renderer().drawClippedTriangles(self.impl.pixelSize(), texture, vtx, idx, clipr);
}
}