rlgl: rlSetClipPlanes, rlGetCullDistanceNear and rlGetCullDistanceFar added
This commit is contained in:
parent
692079f471
commit
5d9fdd5313
2 changed files with 38 additions and 0 deletions
|
@ -127,6 +127,23 @@ func Viewport(x int32, y int32, width int32, height int32) {
|
||||||
C.rlViewport(cx, cy, cwidth, cheight)
|
C.rlViewport(cx, cy, cwidth, cheight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetClipPlanes - Set clip planes distances
|
||||||
|
func SetClipPlanes(nearPlane, farPlane float64) {
|
||||||
|
C.rlSetClipPlanes(C.double(nearPlane), C.double(farPlane))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCullDistanceNear - Get cull plane distance near
|
||||||
|
func GetCullDistanceNear() float64 {
|
||||||
|
ret := C.rlGetCullDistanceNear()
|
||||||
|
return float64(ret)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCullDistanceFar - Get cull plane distance far
|
||||||
|
func GetCullDistanceFar() float64 {
|
||||||
|
ret := C.rlGetCullDistanceFar()
|
||||||
|
return float64(ret)
|
||||||
|
}
|
||||||
|
|
||||||
// Begin - Initialize drawing mode (how to organize vertex)
|
// Begin - Initialize drawing mode (how to organize vertex)
|
||||||
func Begin(mode int32) {
|
func Begin(mode int32) {
|
||||||
cmode := C.int(mode)
|
cmode := C.int(mode)
|
||||||
|
|
|
@ -20,6 +20,9 @@ var rlMultMatrixf func(matf *float32)
|
||||||
var rlFrustum func(left float64, right float64, bottom float64, top float64, znear float64, zfar float64)
|
var rlFrustum func(left float64, right float64, bottom float64, top float64, znear float64, zfar float64)
|
||||||
var rlOrtho func(left float64, right float64, bottom float64, top float64, znear float64, zfar float64)
|
var rlOrtho func(left float64, right float64, bottom float64, top float64, znear float64, zfar float64)
|
||||||
var rlViewport func(x int32, y int32, width int32, height int32)
|
var rlViewport func(x int32, y int32, width int32, height int32)
|
||||||
|
var rlSetClipPlanes func(float64, float64)
|
||||||
|
var rlGetCullDistanceNear func() float64
|
||||||
|
var rlGetCullDistanceFar func() float64
|
||||||
var rlBegin func(mode int32)
|
var rlBegin func(mode int32)
|
||||||
var rlEnd func()
|
var rlEnd func()
|
||||||
var rlVertex2i func(x int32, y int32)
|
var rlVertex2i func(x int32, y int32)
|
||||||
|
@ -143,6 +146,9 @@ func initRlglPurego() {
|
||||||
purego.RegisterLibFunc(&rlFrustum, raylibDll, "rlFrustum")
|
purego.RegisterLibFunc(&rlFrustum, raylibDll, "rlFrustum")
|
||||||
purego.RegisterLibFunc(&rlOrtho, raylibDll, "rlOrtho")
|
purego.RegisterLibFunc(&rlOrtho, raylibDll, "rlOrtho")
|
||||||
purego.RegisterLibFunc(&rlViewport, raylibDll, "rlViewport")
|
purego.RegisterLibFunc(&rlViewport, raylibDll, "rlViewport")
|
||||||
|
purego.RegisterLibFunc(&rlSetClipPlanes, raylibDll, "rlSetClipPlanes")
|
||||||
|
purego.RegisterLibFunc(&rlGetCullDistanceNear, raylibDll, "rlGetCullDistanceNear")
|
||||||
|
purego.RegisterLibFunc(&rlGetCullDistanceFar, raylibDll, "rlGetCullDistanceFar")
|
||||||
purego.RegisterLibFunc(&rlBegin, raylibDll, "rlBegin")
|
purego.RegisterLibFunc(&rlBegin, raylibDll, "rlBegin")
|
||||||
purego.RegisterLibFunc(&rlEnd, raylibDll, "rlEnd")
|
purego.RegisterLibFunc(&rlEnd, raylibDll, "rlEnd")
|
||||||
purego.RegisterLibFunc(&rlVertex2i, raylibDll, "rlVertex2i")
|
purego.RegisterLibFunc(&rlVertex2i, raylibDll, "rlVertex2i")
|
||||||
|
@ -321,6 +327,21 @@ func Viewport(x int32, y int32, width int32, height int32) {
|
||||||
rlViewport(x, y, width, height)
|
rlViewport(x, y, width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetClipPlanes - Set clip planes distances
|
||||||
|
func SetClipPlanes(nearPlane, farPlane float64) {
|
||||||
|
rlSetClipPlanes(nearPlane, farPlane)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCullDistanceNear - Get cull plane distance near
|
||||||
|
func GetCullDistanceNear() float64 {
|
||||||
|
return rlGetCullDistanceNear()
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCullDistanceFar - Get cull plane distance far
|
||||||
|
func GetCullDistanceFar() float64 {
|
||||||
|
return rlGetCullDistanceFar()
|
||||||
|
}
|
||||||
|
|
||||||
// Begin - Initialize drawing mode (how to organize vertex)
|
// Begin - Initialize drawing mode (how to organize vertex)
|
||||||
func Begin(mode int32) {
|
func Begin(mode int32) {
|
||||||
rlBegin(mode)
|
rlBegin(mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue