本文整理汇总了Golang中C.GLclampf函数的典型用法代码示例。如果您正苦于以下问题:Golang GLclampf函数的具体用法?Golang GLclampf怎么用?Golang GLclampf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GLclampf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: DepthRangef
func DepthRangef(
zNear Clampf, zFar Clampf) {
C.glDepthRangef(
C.GLclampf(zNear),
C.GLclampf(zFar))
}
示例2: ClearColor
// 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)
}
示例3: ClearColor
func ClearColor(
red Clampf, green Clampf,
blue Clampf, alpha Clampf) {
C.glClearColor(
C.GLclampf(red),
C.GLclampf(green),
C.GLclampf(blue),
C.GLclampf(alpha))
}
示例4: BlendColor
func BlendColor(
red Clampf, green Clampf,
blue Clampf, alpha Clampf) {
C.glBlendColor(
C.GLclampf(red),
C.GLclampf(green),
C.GLclampf(blue),
C.GLclampf(alpha))
}
示例5: SampleCoverage
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))
}
示例6: drawFrame
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)
}
示例7: ClearDepthf
func ClearDepthf(
depth Clampf) {
C.glClearDepthf(
C.GLclampf(depth))
}
示例8: ClearColor
// 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))
}
示例9: DepthRangef
func DepthRangef(zNear, zFar float32) {
C.glDepthRangef(C.GLclampf(zNear), C.GLclampf(zFar))
}
示例10: ClearColor
// 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))
}
示例11: ClearDepthf
func ClearDepthf(depth float32) {
C.glClearDepthf(C.GLclampf(depth))
}
示例12: ClearColor
func ClearColor(red, green, blue, alpha float32) {
C.glClearColor(C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha))
}
示例13: AlphaFunc
//void glAlphaFunc (GLenum func, GLclampf ref)
func AlphaFunc(func_ GLenum, ref GLclampf) {
C.glAlphaFunc(C.GLenum(func_), C.GLclampf(ref))
}
示例14: ClearColor
//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!")
}
示例15: BlendColor
func BlendColor(red, green, blue, alpha float32) {
C.glBlendColor(C.GLclampf(red), C.GLclampf(green), C.GLclampf(blue), C.GLclampf(alpha))
}