backward compatibility fix

This commit is contained in:
Erwin Coumans
2018-10-09 16:25:32 -07:00
parent 74fca2418b
commit 5f954e2496
3 changed files with 10 additions and 2 deletions

View File

@@ -14,6 +14,8 @@
#include "LinearMath/btVector3.h"
#include "Bullet3Common/b3Logging.h"
#include "../CommonInterfaces/CommonFileIOInterface.h"
#include "../Utils/b3BulletDefaultFileIO.h"
struct DepthShader : public IShader
{
Model* m_model;
@@ -370,6 +372,12 @@ void TinyRenderObjectData::registerMesh2(btAlignedObjectArray<btVector3>& vertic
void TinyRenderObjectData::createCube(float halfExtentsX, float halfExtentsY, float halfExtentsZ, CommonFileIOInterface* fileIO)
{
b3BulletDefaultFileIO defaultFileIO;
if (fileIO==0)
{
fileIO = &defaultFileIO;
}
m_model = new Model();
char relativeFileName[1024];

View File

@@ -42,7 +42,7 @@ struct TinyRenderObjectData
virtual ~TinyRenderObjectData();
void loadModel(const char* fileName, struct CommonFileIOInterface* fileIO);
void createCube(float HalfExtentsX, float HalfExtentsY, float HalfExtentsZ, struct CommonFileIOInterface* fileIO);
void createCube(float HalfExtentsX, float HalfExtentsY, float HalfExtentsZ, struct CommonFileIOInterface* fileIO=0);
void registerMeshShape(const float* vertices, int numVertices, const int* indices, int numIndices, const float rgbaColor[4],
unsigned char* textureImage = 0, int textureWidth = 0, int textureHeight = 0);