@@ -61,6 +61,13 @@ func (a *ArrayF32) AppendColor(v ...*Color) {
}
+func (a *ArrayF32) AppendColor4(v ...*Color4) {
+
+ for i := 0; i < len(v); i++ {
+ *a = append(*a, v[i].R, v[i].G, v[i].B, v[i].A)
+ }
+}
func (a ArrayF32) GetVector2(pos int, v *Vector2) {
v.X = a[pos]
@@ -54,6 +54,15 @@ func (c *Color4) SetName(name string) *Color4 {
return c.SetHex(colorKeywords[name])
+func (c *Color4) Add(other *Color4) *Color4 {
+ c.R += other.R
+ c.G += other.G
+ c.B += other.B
+ c.A += other.A
+ return c
func (c *Color4) MultiplyScalar(v float32) *Color4 {
c.R *= v