mirror of
https://github.com/bloeys/physx-go.git
synced 2025-12-29 07:58:20 +00:00
Implement SetScratchBuffer
This commit is contained in:
@ -95,12 +95,10 @@ func (s *Scene) AddActor(a *Actor) {
|
||||
C.CPxScene_addActor(s.cS, a.cA)
|
||||
}
|
||||
|
||||
// void CPxScene_simulate(CSTRUCT CPxScene*, CPxReal elapsedTime);
|
||||
func (s *Scene) Simulate(elapsedTime float32) {
|
||||
C.CPxScene_simulate(s.cS, C.float(elapsedTime))
|
||||
}
|
||||
|
||||
// bool CPxScene_fetchResults(struct CPxScene*, bool block, CPxU32* errorState);
|
||||
func (s *Scene) FetchResults(block bool) (bool, uint32) {
|
||||
|
||||
var errState uint32
|
||||
@ -108,6 +106,10 @@ func (s *Scene) FetchResults(block bool) (bool, uint32) {
|
||||
return bool(b), errState
|
||||
}
|
||||
|
||||
func (s *Scene) SetScratchBuffer(multiplesOf16k uint32) {
|
||||
C.CPxScene_setScratchBuffer(s.cS, C.uint(multiplesOf16k))
|
||||
}
|
||||
|
||||
type Physics struct {
|
||||
cPhysics *C.struct_CPxPhysics
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user