fixes in pybullet.loadTexture, changeVisualShape replacing texture.
(also works for OpenGL3 renderer now)
This commit is contained in:
@@ -318,6 +318,18 @@ void OpenGLGuiHelper::removeGraphicsInstance(int graphicsUid)
|
||||
};
|
||||
}
|
||||
|
||||
int OpenGLGuiHelper::getShapeIndexFromInstance(int instanceUid)
|
||||
{
|
||||
return m_data->m_glApp->m_renderer->getShapeIndexFromInstance(instanceUid);
|
||||
}
|
||||
|
||||
void OpenGLGuiHelper::replaceTexture(int shapeIndex, int textureUid)
|
||||
{
|
||||
if (shapeIndex>=0)
|
||||
{
|
||||
m_data->m_glApp->m_renderer->replaceTexture(shapeIndex, textureUid);
|
||||
};
|
||||
}
|
||||
void OpenGLGuiHelper::changeRGBAColor(int instanceUid, const double rgbaColor[4])
|
||||
{
|
||||
if (instanceUid>=0)
|
||||
|
||||
@@ -29,6 +29,9 @@ struct OpenGLGuiHelper : public GUIHelperInterface
|
||||
virtual void changeRGBAColor(int instanceUid, const double rgbaColor[4]);
|
||||
virtual void changeSpecularColor(int instanceUid, const double specularColor[3]);
|
||||
|
||||
virtual int getShapeIndexFromInstance(int instanceUid);
|
||||
virtual void replaceTexture(int shapeIndex, int textureUid);
|
||||
|
||||
virtual void createCollisionShapeGraphicsObject(btCollisionShape* collisionShape);
|
||||
|
||||
virtual void syncPhysicsToGraphics(const btDiscreteDynamicsWorld* rbWorld);
|
||||
|
||||
Reference in New Issue
Block a user