diff --git a/raylib/core.go b/raylib/core.go index 731f674..7a9b4e3 100644 --- a/raylib/core.go +++ b/raylib/core.go @@ -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,15 @@ 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 +} + // GetCameraMatrix - Returns camera transform matrix (view matrix) func GetCameraMatrix(camera Camera) Matrix { ccamera := camera.cptr() @@ -294,6 +304,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)