add background for F3 text, fix single-channel texture display
This commit is contained in:
@@ -15,11 +15,21 @@ func Color(r, g, b, a uint8) imgui.Vec4 {
|
||||
}
|
||||
}
|
||||
|
||||
// PackedColor converts RGBA to imgui.PackedColor.
|
||||
func PackedColor(color itype.Vec4f) imgui.PackedColor {
|
||||
return imgui.PackedColorFromVec4(Vec4(color))
|
||||
}
|
||||
|
||||
// Vec2 converts itype.Vec2f to imgui.Vec2.
|
||||
func Vec2(v itype.Vec2f) imgui.Vec2 {
|
||||
return imgui.Vec2{X: v[0], Y: v[1]}
|
||||
}
|
||||
|
||||
// Vec2f converts imgui.Vec2 to itype.Vec2f.
|
||||
func Vec2f(v imgui.Vec2) itype.Vec2f {
|
||||
return itype.Vec2f{v.X, v.Y}
|
||||
}
|
||||
|
||||
// Vec4 converts itype.Vec4f to imgui.Vec4.
|
||||
func Vec4(v itype.Vec4f) imgui.Vec4 {
|
||||
return imgui.Vec4{X: v[0], Y: v[1], Z: v[2], W: v[3]}
|
||||
|
||||
Reference in New Issue
Block a user