commit
3b86b956fa
2 changed files with 28 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.idea
|
|
@ -89,6 +89,7 @@ func IsWindowHidden() bool {
|
|||
v := bool(ret)
|
||||
return v
|
||||
}
|
||||
|
||||
// ToggleFullscreen - Fullscreen toggle (only PLATFORM_DESKTOP)
|
||||
func ToggleFullscreen() {
|
||||
C.ToggleFullscreen()
|
||||
|
@ -286,6 +287,24 @@ func GetWorldToScreen(position Vector3, camera Camera) Vector2 {
|
|||
return v
|
||||
}
|
||||
|
||||
// GetWorldToScreen2D - Returns the screen space position for a 2d camera world space position
|
||||
func GetWorldToScreen2D(position Vector2, camera Camera2D) Vector2 {
|
||||
cposition := position.cptr()
|
||||
ccamera := camera.cptr()
|
||||
ret := C.GetWorldToScreen2D(*cposition, *ccamera)
|
||||
v := newVector2FromPointer(unsafe.Pointer(&ret))
|
||||
return v
|
||||
}
|
||||
|
||||
// GetScreenToWorld2D - Returns the world space position for a 2d camera screen space position
|
||||
func GetScreenToWorld2D(position Vector2, camera Camera2D) Vector2 {
|
||||
cposition := position.cptr()
|
||||
ccamera := camera.cptr()
|
||||
ret := C.GetScreenToWorld2D(*cposition, *ccamera)
|
||||
v := newVector2FromPointer(unsafe.Pointer(&ret))
|
||||
return v
|
||||
}
|
||||
|
||||
// GetCameraMatrix - Returns camera transform matrix (view matrix)
|
||||
func GetCameraMatrix(camera Camera) Matrix {
|
||||
ccamera := camera.cptr()
|
||||
|
@ -294,6 +313,14 @@ func GetCameraMatrix(camera Camera) Matrix {
|
|||
return v
|
||||
}
|
||||
|
||||
// GetCameraMatrix2D - Returns camera 2d transform matrix
|
||||
func GetCameraMatrix2D(camera Camera2D) Matrix {
|
||||
ccamera := camera.cptr()
|
||||
ret := C.GetCameraMatrix2D(*ccamera)
|
||||
v := newMatrixFromPointer(unsafe.Pointer(&ret))
|
||||
return v
|
||||
}
|
||||
|
||||
// SetTargetFPS - Set target FPS (maximum)
|
||||
func SetTargetFPS(fps int32) {
|
||||
cfps := (C.int)(fps)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue