expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer.

This commit is contained in:
Erwin Coumans
2017-05-13 09:18:36 -07:00
parent 7cb763e4c8
commit f80838e989
14 changed files with 149 additions and 33 deletions

View File

@@ -2320,9 +2320,30 @@ b3SharedMemoryCommandHandle b3InitUpdateVisualShape(b3PhysicsClientHandle physCl
command->m_updateVisualShapeDataArguments.m_shapeIndex = shapeIndex;
command->m_updateVisualShapeDataArguments.m_textureUniqueId = textureUniqueId;
command->m_updateFlags = 0;
if (textureUniqueId>=0)
{
command->m_updateFlags |= CMD_UPDATE_VISUAL_SHAPE_TEXTURE;
}
return (b3SharedMemoryCommandHandle) command;
}
void b3UpdateVisualShapeRGBAColor(b3SharedMemoryCommandHandle commandHandle, double rgbaColor[4])
{
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*) commandHandle;
b3Assert(command);
b3Assert(command->m_type == CMD_UPDATE_VISUAL_SHAPE);
if (command->m_type == CMD_UPDATE_VISUAL_SHAPE)
{
command->m_updateVisualShapeDataArguments.m_rgbaColor[0] = rgbaColor[0];
command->m_updateVisualShapeDataArguments.m_rgbaColor[1] = rgbaColor[1];
command->m_updateVisualShapeDataArguments.m_rgbaColor[2] = rgbaColor[2];
command->m_updateVisualShapeDataArguments.m_rgbaColor[3] = rgbaColor[3];
command->m_updateFlags |= CMD_UPDATE_VISUAL_SHAPE_RGBA_COLOR;
}
}
b3SharedMemoryCommandHandle b3ApplyExternalForceCommandInit(b3PhysicsClientHandle physClient)
{
PhysicsClient* cl = (PhysicsClient* ) physClient;