Exemple #1
0
func DepthRangef(
	zNear Clampf, zFar Clampf) {
	C.glDepthRangef(
		C.GLclampf(zNear),
		C.GLclampf(zFar))

}
Exemple #2
0
Fichier : gl.go Projet : eaburns/gl
// 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)
}
Exemple #3
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))

}
Exemple #4
0
func BlendColor(
	red Clampf, green Clampf,
	blue Clampf, alpha Clampf) {
	C.glBlendColor(
		C.GLclampf(red),
		C.GLclampf(green),
		C.GLclampf(blue),
		C.GLclampf(alpha))

}
Exemple #5
0
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))
}
Exemple #6
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)
}
Exemple #7
0
func ClearDepthf(
	depth Clampf) {
	C.glClearDepthf(
		C.GLclampf(depth))

}
Exemple #8
0
Fichier : gl.go Projet : extrame/gl
// 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))
}
Exemple #9
0
func DepthRangef(zNear, zFar float32) {
	C.glDepthRangef(C.GLclampf(zNear), C.GLclampf(zFar))
}
Exemple #10
0
Fichier : gl.go Projet : lye/gl
// 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))
}
Exemple #11
0
func ClearDepthf(depth float32) {
	C.glClearDepthf(C.GLclampf(depth))
}
Exemple #12
0
func ClearColor(red, green, blue, alpha float32) {
	C.glClearColor(C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha))
}
Exemple #13
0
Fichier : gl.go Projet : james4k/gl
//void glAlphaFunc (GLenum func, GLclampf ref)
func AlphaFunc(func_ GLenum, ref GLclampf) {
	C.glAlphaFunc(C.GLenum(func_), C.GLclampf(ref))
}
Exemple #14
0
//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!")
}
Exemple #15
0
func BlendColor(red, green, blue, alpha float32) {
	C.glBlendColor(C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha))
}
Exemple #16
0
func SampleCoverage(
	value Clampf, invert bool) {
	C.glSampleCoverage(
		C.GLclampf(value),
		glBoolean(invert))
}
Exemple #17
0
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))
}