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

}
Beispiel #2
0
Datei: gl.go Projekt: 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)
}
Beispiel #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))

}
Beispiel #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))

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

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