mirror of
https://github.com/bloeys/physx-go.git
synced 2025-12-29 07:58:20 +00:00
Add flag to say if pvd is supported
This commit is contained in:
6
main.go
6
main.go
@ -21,13 +21,11 @@ func contactHandler(cph pgo.ContactPairHeader) {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
const enablePvd = true
|
|
||||||
|
|
||||||
f := pgo.CreateFoundation()
|
f := pgo.CreateFoundation()
|
||||||
println("foundation:", f)
|
println("foundation:", f)
|
||||||
|
|
||||||
var pvd *pgo.Pvd
|
var pvd *pgo.Pvd
|
||||||
if enablePvd {
|
if pgo.PvdSupported {
|
||||||
pvdTr := pgo.DefaultPvdSocketTransportCreate("127.0.0.1", 5425, 100000)
|
pvdTr := pgo.DefaultPvdSocketTransportCreate("127.0.0.1", 5425, 100000)
|
||||||
println("Pvd transport:", pvdTr)
|
println("Pvd transport:", pvdTr)
|
||||||
|
|
||||||
@ -48,7 +46,7 @@ func main() {
|
|||||||
scene := p.CreateScene(sd)
|
scene := p.CreateScene(sd)
|
||||||
println("Scene:", scene)
|
println("Scene:", scene)
|
||||||
|
|
||||||
if enablePvd {
|
if pgo.PvdSupported {
|
||||||
scenePvdClient := scene.GetScenePvdClient()
|
scenePvdClient := scene.GetScenePvdClient()
|
||||||
println("ScenePvdClient:", scenePvdClient)
|
println("ScenePvdClient:", scenePvdClient)
|
||||||
|
|
||||||
|
|||||||
5
pgo/consts_checked.go
Executable file
5
pgo/consts_checked.go
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
//go:build !physx_release
|
||||||
|
|
||||||
|
package pgo
|
||||||
|
|
||||||
|
const PvdSupported = true
|
||||||
5
pgo/consts_release.go
Executable file
5
pgo/consts_release.go
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
//go:build physx_release
|
||||||
|
|
||||||
|
package pgo
|
||||||
|
|
||||||
|
const PvdSupported = false
|
||||||
Reference in New Issue
Block a user