implement pybullet.changeTexture. For now, the width/height has to match the target texture unique id, otherwise crashes may happen (a check for width/height match will be added)
See also examples\pybullet\examples\changeTexture.py
This commit is contained in:
@@ -292,6 +292,12 @@ int OpenGLGuiHelper::registerTexture(const unsigned char* texels, int width, int
|
||||
return textureId;
|
||||
}
|
||||
|
||||
void OpenGLGuiHelper::changeTexture(int textureUniqueId, const unsigned char* texels, int width, int height)
|
||||
{
|
||||
bool flipPixelsY = true;
|
||||
m_data->m_glApp->m_renderer->updateTexture(textureUniqueId, texels,flipPixelsY);
|
||||
}
|
||||
|
||||
|
||||
int OpenGLGuiHelper::registerGraphicsShape(const float* vertices, int numvertices, const int* indices, int numIndices,int primitiveType, int textureId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user