MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / flush

Method flush

physx/samples/samplebase/InputEventBuffer.cpp:123–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void InputEventBuffer::flush()
124{
125 if(mResetInputCacheReq==mResetInputCacheAck)
126 mResetInputCacheReq++;
127
128 PxU32 size = mRingBuffer.size();
129 Ps::memoryBarrier();
130 // do not work on more than size, else input cache might become overwritten
131 while(size-- && !mClearBuffer)
132 {
133 mRingBuffer.back().get<EventType>().report(mApp);
134 mRingBuffer.incBack(1);
135 }
136
137 if(mClearBuffer)
138 {
139 mRingBuffer.clear();
140 mClearBuffer = false;
141 }
142}
143
144void InputEventBuffer::KeyDownEx::report(PhysXSampleApplication& app) const
145{

Callers 1

updateEngineMethod · 0.45

Calls 6

backMethod · 0.80
incBackMethod · 0.80
memoryBarrierFunction · 0.50
sizeMethod · 0.45
reportMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected