mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 05:40:05 +00:00
disable memmove in btDbvt
forgot to reset clock
This commit is contained in:
parent
633ea613ab
commit
3da8dbce1c
@ -12,7 +12,7 @@
|
|||||||
#include "../Utils/b3Clock.h"
|
#include "../Utils/b3Clock.h"
|
||||||
|
|
||||||
#include "ExampleEntries.h"
|
#include "ExampleEntries.h"
|
||||||
|
#include "Bullet3Common/b3Logging.h"
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
b3CommandLineArgs args(argc,argv);
|
b3CommandLineArgs args(argc,argv);
|
||||||
@ -24,11 +24,13 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
ExampleBrowserInterface* exampleBrowser = new DefaultBrowser(&examples);
|
ExampleBrowserInterface* exampleBrowser = new DefaultBrowser(&examples);
|
||||||
bool init = exampleBrowser->init(argc,argv);
|
bool init = exampleBrowser->init(argc,argv);
|
||||||
|
clock.reset();
|
||||||
if (init)
|
if (init)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
float deltaTimeInSeconds = clock.getTimeMicroseconds()/1000000.f;
|
float deltaTimeInSeconds = clock.getTimeMicroseconds()/1000000.f;
|
||||||
|
clock.reset();
|
||||||
exampleBrowser->update(deltaTimeInSeconds);
|
exampleBrowser->update(deltaTimeInSeconds);
|
||||||
|
|
||||||
} while (!exampleBrowser->requestedExit());
|
} while (!exampleBrowser->requestedExit());
|
||||||
|
@ -1196,23 +1196,23 @@ inline void btDbvt::collideOCL( const btDbvtNode* root,
|
|||||||
|
|
||||||
//void * memmove ( void * destination, const void * source, size_t num );
|
//void * memmove ( void * destination, const void * source, size_t num );
|
||||||
|
|
||||||
#if DBVT_USE_MEMMOVE
|
//#if DBVT_USE_MEMMOVE
|
||||||
memmove(&stack[j],&stack[j-1],sizeof(int)*(stack.size()-j-1));
|
// memmove(&stack[j],&stack[j-1],sizeof(int)*(stack.size()-j-1));
|
||||||
#else
|
//#else
|
||||||
for(int k=stack.size()-1;k>j;--k)
|
for(int k=stack.size()-1;k>j;--k)
|
||||||
{
|
{
|
||||||
stack[k]=stack[k-1];
|
stack[k]=stack[k-1];
|
||||||
}
|
}
|
||||||
#endif
|
//#endif
|
||||||
stack[j]=allocate(ifree,stock,nes[q]);
|
stack[j]=allocate(ifree,stock,nes[q]);
|
||||||
/* Insert 1 */
|
/* Insert 1 */
|
||||||
j=nearest(&stack[0],&stock[0],nes[1-q].value,j,stack.size());
|
j=nearest(&stack[0],&stock[0],nes[1-q].value,j,stack.size());
|
||||||
stack.push_back(0);
|
stack.push_back(0);
|
||||||
#if DBVT_USE_MEMMOVE
|
//#if DBVT_USE_MEMMOVE
|
||||||
memmove(&stack[j],&stack[j-1],sizeof(int)*(stack.size()-j-1));
|
// memmove(&stack[j],&stack[j-1],sizeof(int)*(stack.size()-j-1));
|
||||||
#else
|
//#else
|
||||||
for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1];
|
for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1];
|
||||||
#endif
|
//#endif
|
||||||
stack[j]=allocate(ifree,stock,nes[1-q]);
|
stack[j]=allocate(ifree,stock,nes[1-q]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user