mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-10-25 09:00:24 +08:00
Pass color values for each vertex on drawing rects
This commit is contained in:
@@ -206,9 +206,9 @@ func (c *Context) GetAttribLocation(p Program, location string) AttribLocation {
|
||||
return AttribLocation(gl.Program(p).GetAttribLocation(location))
|
||||
}
|
||||
|
||||
func (c *Context) VertexAttribPointer(p Program, location string, stride int, v uintptr) {
|
||||
func (c *Context) VertexAttribPointer(p Program, location string, stride int, size int, v uintptr) {
|
||||
l := gl.AttribLocation(GetAttribLocation(c, p, location))
|
||||
l.AttribPointer(2, gl.FLOAT, false, stride, v)
|
||||
l.AttribPointer(uint(size), gl.FLOAT, false, stride, v)
|
||||
}
|
||||
|
||||
func (c *Context) EnableVertexAttribArray(p Program, location string) {
|
||||
|
||||
Reference in New Issue
Block a user