GetMouseRay redirects to GetScreenToWorldRay
This commit is contained in:
parent
873552f31a
commit
77b59b8ebe
2 changed files with 2 additions and 10 deletions
|
@ -103,7 +103,6 @@ var setShaderValueV func(shader uintptr, locIndex int32, value []float32, unifor
|
||||||
var setShaderValueMatrix func(shader uintptr, locIndex int32, mat uintptr)
|
var setShaderValueMatrix func(shader uintptr, locIndex int32, mat uintptr)
|
||||||
var setShaderValueTexture func(shader uintptr, locIndex int32, texture uintptr)
|
var setShaderValueTexture func(shader uintptr, locIndex int32, texture uintptr)
|
||||||
var unloadShader func(shader uintptr)
|
var unloadShader func(shader uintptr)
|
||||||
var getMouseRay func(ray uintptr, mousePosition uintptr, camera uintptr)
|
|
||||||
var getScreenToWorldRay func(ray uintptr, position uintptr, camera uintptr)
|
var getScreenToWorldRay func(ray uintptr, position uintptr, camera uintptr)
|
||||||
var getScreenToWorldRayEx func(ray uintptr, position uintptr, camera uintptr, width, height int32)
|
var getScreenToWorldRayEx func(ray uintptr, position uintptr, camera uintptr, width, height int32)
|
||||||
var getCameraMatrix func(mat uintptr, camera uintptr)
|
var getCameraMatrix func(mat uintptr, camera uintptr)
|
||||||
|
@ -607,7 +606,6 @@ func init() {
|
||||||
purego.RegisterLibFunc(&setShaderValueMatrix, raylibDll, "SetShaderValueMatrix")
|
purego.RegisterLibFunc(&setShaderValueMatrix, raylibDll, "SetShaderValueMatrix")
|
||||||
purego.RegisterLibFunc(&setShaderValueTexture, raylibDll, "SetShaderValueTexture")
|
purego.RegisterLibFunc(&setShaderValueTexture, raylibDll, "SetShaderValueTexture")
|
||||||
purego.RegisterLibFunc(&unloadShader, raylibDll, "UnloadShader")
|
purego.RegisterLibFunc(&unloadShader, raylibDll, "UnloadShader")
|
||||||
purego.RegisterLibFunc(&getMouseRay, raylibDll, "GetMouseRay")
|
|
||||||
purego.RegisterLibFunc(&getScreenToWorldRay, raylibDll, "GetScreenToWorldRay")
|
purego.RegisterLibFunc(&getScreenToWorldRay, raylibDll, "GetScreenToWorldRay")
|
||||||
purego.RegisterLibFunc(&getScreenToWorldRayEx, raylibDll, "GetScreenToWorldRayEx")
|
purego.RegisterLibFunc(&getScreenToWorldRayEx, raylibDll, "GetScreenToWorldRayEx")
|
||||||
purego.RegisterLibFunc(&getCameraMatrix, raylibDll, "GetCameraMatrix")
|
purego.RegisterLibFunc(&getCameraMatrix, raylibDll, "GetCameraMatrix")
|
||||||
|
@ -1490,9 +1488,7 @@ func UnloadShader(shader Shader) {
|
||||||
//
|
//
|
||||||
// Deprecated: Use [GetScreenToWorldRay] instead.
|
// Deprecated: Use [GetScreenToWorldRay] instead.
|
||||||
func GetMouseRay(mousePosition Vector2, camera Camera) Ray {
|
func GetMouseRay(mousePosition Vector2, camera Camera) Ray {
|
||||||
var ray Ray
|
return GetScreenToWorldRay(mousePosition, camera)
|
||||||
getMouseRay(uintptr(unsafe.Pointer(&ray)), *(*uintptr)(unsafe.Pointer(&mousePosition)), uintptr(unsafe.Pointer(&camera)))
|
|
||||||
return ray
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetScreenToWorldRay - Get a ray trace from screen position (i.e mouse)
|
// GetScreenToWorldRay - Get a ray trace from screen position (i.e mouse)
|
||||||
|
|
|
@ -630,11 +630,7 @@ func UnloadShader(shader Shader) {
|
||||||
//
|
//
|
||||||
// Deprecated: Use [GetScreenToWorldRay] instead.
|
// Deprecated: Use [GetScreenToWorldRay] instead.
|
||||||
func GetMouseRay(mousePosition Vector2, camera Camera) Ray {
|
func GetMouseRay(mousePosition Vector2, camera Camera) Ray {
|
||||||
cmousePosition := mousePosition.cptr()
|
return GetScreenToWorldRay(mousePosition, camera)
|
||||||
ccamera := camera.cptr()
|
|
||||||
ret := C.GetMouseRay(*cmousePosition, *ccamera)
|
|
||||||
v := newRayFromPointer(unsafe.Pointer(&ret))
|
|
||||||
return v
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetScreenToWorldRay - Get a ray trace from screen position (i.e mouse)
|
// GetScreenToWorldRay - Get a ray trace from screen position (i.e mouse)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue