textureUpdate
Update a dvui.Texture from premultiplied alpha pixels in RGBA. The
passed in texture must be created with textureCreate
Parameters
- self:Backend
- Backend
- texture:dvui.Texture
- dvui.Texture
- pixels:[*]const u8
- [*]const u8
Source
Implementation
pub fn textureUpdate(self: Backend, texture: dvui.Texture, pixels: [*]const u8) TextureError!void {
// we can handle backends that dont support textureUpdate by using destroy and create again!
if (comptime !@hasDecl(@TypeOf(self.renderer().*), "textureUpdate")) return TextureError.NotImplemented else {
return self.renderer().textureUpdate(texture, pixels);
}
}