func DepthRangef( zNear Clampf, zFar Clampf) { C.glDepthRangef( C.GLclampf(zNear), C.GLclampf(zFar)) }
// ClearColor specifies clear values for the color buffers. func ClearColor(col color.Color) { r, g, b, a := col.RGBA() C.glClearColor( C.GLclampf(r)/255.0, C.GLclampf(g)/255.0, C.GLclampf(b)/255.0, C.GLclampf(a)/255.0) }
func ClearColor( red Clampf, green Clampf, blue Clampf, alpha Clampf) { C.glClearColor( C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha)) }
func BlendColor( red Clampf, green Clampf, blue Clampf, alpha Clampf) { C.glBlendColor( C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha)) }
func SampleCoverage(value float32, invert bool) { b := C.GLboolean(C.GL_FALSE) if invert { b = C.GLboolean(C.GL_TRUE) } C.glSampleCoverage(C.GLclampf(value), C.GLboolean(b)) }
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) }
func ClearDepthf( depth Clampf) { C.glClearDepthf( C.GLclampf(depth)) }
// ClearColor calls glClearColor func ClearColor(r float64, g float64, b float64, a float64) { C.glClearColor(C.GLclampf(r), C.GLclampf(g), C.GLclampf(b), C.GLclampf(a)) }
func DepthRangef(zNear, zFar float32) { C.glDepthRangef(C.GLclampf(zNear), C.GLclampf(zFar)) }
// ClearColor calls glClearColor func ClearColor(r int, g int, b int, a int) { C.glClearColor(C.GLclampf(r), C.GLclampf(g), C.GLclampf(b), C.GLclampf(a)) }
func ClearDepthf(depth float32) { C.glClearDepthf(C.GLclampf(depth)) }
func ClearColor(red, green, blue, alpha float32) { C.glClearColor(C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha)) }
//void glAlphaFunc (GLenum func, GLclampf ref) func AlphaFunc(func_ GLenum, ref GLclampf) { C.glAlphaFunc(C.GLenum(func_), C.GLclampf(ref)) }
//void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) func ClearColor(red GLclampf, green GLclampf, blue GLclampf, alpha GLclampf) { C.goglClearColor(C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha)) log.Println("Colored!") }
func BlendColor(red, green, blue, alpha float32) { C.glBlendColor(C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha)) }
func SampleCoverage( value Clampf, invert bool) { C.glSampleCoverage( C.GLclampf(value), glBoolean(invert)) }
func Cls(c col.Colour) { // r, g, b := col.Float(c) // 0.0, 0.0, 0.0 C.glClearColor(C.GLclampf(r), C.GLclampf(g), C.GLclampf(b), C.GLclampf(0.0)) }