Exemplo n.º 1
0
func DrawArrays(mode Enum, first, count int) {
	defer func() {
		errstr := errDrain()
		log.Printf("gl.DrawArrays(%v, %v, %v) %v", mode, first, count, errstr)
	}()
	C.glDrawArrays(mode.c(), C.GLint(first), C.GLsizei(count))
}
Exemplo n.º 2
0
func DrawArrays(
	mode Enum, first int32, count Sizei) {
	C.glDrawArrays(
		C.GLenum(mode),
		C.GLint(first),
		C.GLsizei(count))

}
Exemplo n.º 3
0
func (game *game) drawFrame() {
	time += .05
	color := (C.GLclampf(math.Sin(time)) + 1) * .5

	C.glUniform2f(C.GLint(game.offsetUni), C.GLfloat(game.offsetX), C.GLfloat(game.offsetY))
	C.glUniform3f(C.GLint(game.colorUni), 1.0, C.GLfloat(color), 0)
	C.glClear(C.GL_COLOR_BUFFER_BIT | C.GL_DEPTH_BUFFER_BIT)

	C.glUseProgram(game.prog)
	C.glDrawArrays(C.GL_TRIANGLES, 0, 3)
}
Exemplo n.º 4
0
func DrawArrays(mode Enum, first, count int) {
	C.glDrawArrays(mode.c(), C.GLint(first), C.GLsizei(count))
}
Exemplo n.º 5
0
Arquivo: gl.go Projeto: extrame/gl
// DrawArrays calls glDrawArrays
func DrawArrays(mode, first, count int) {
	C.glDrawArrays(C.GLenum(mode), C.GLint(first), C.GLsizei(count))
}