diff --git a/examples/SharedMemory/PhysicsServerExample.cpp b/examples/SharedMemory/PhysicsServerExample.cpp index ec420cb14..36f193541 100644 --- a/examples/SharedMemory/PhysicsServerExample.cpp +++ b/examples/SharedMemory/PhysicsServerExample.cpp @@ -684,7 +684,7 @@ public: GUIHelperInterface* m_childGuiHelper; - btHashMap m_cachedTextureIds; + int m_uidGenerator; const unsigned char* m_texels; int m_textureWidth; @@ -910,11 +910,7 @@ public: } virtual int registerTexture(const unsigned char* texels, int width, int height) { - int* cachedTexture = m_cachedTextureIds[texels]; - if (cachedTexture) - { - return *cachedTexture; - } + m_texels = texels; m_textureWidth = width; m_textureHeight = height; @@ -923,7 +919,7 @@ public: m_cs->setSharedParam(1, eGUIHelperRegisterTexture); workerThreadWait(); - m_cachedTextureIds.insert(texels, m_textureId); + return m_textureId; } virtual int registerGraphicsShape(const float* vertices, int numvertices, const int* indices, int numIndices, int primitiveType, int textureId) @@ -977,7 +973,6 @@ public: virtual void removeAllGraphicsInstances() { - m_cachedTextureIds.clear(); m_cs->lock(); m_cs->setSharedParam(1, eGUIHelperRemoveAllGraphicsInstances); workerThreadWait();