fix flipped tinyrenderer image

This commit is contained in:
Erwin Coumans
2016-06-09 12:12:46 -07:00
parent e0c3392cee
commit 98d2f91f3c
3 changed files with 13 additions and 9 deletions

View File

@@ -631,7 +631,7 @@ void PhysicsClientExample::stepSimulation(float deltaTime)
int bytesPerPixel = 4;
int pixelIndex = (xIndex+yIndex*imageData.m_pixelWidth)*bytesPerPixel;
m_canvas->setPixel(m_canvasIndex,i,camVisualizerHeight-1-j,
m_canvas->setPixel(m_canvasIndex,i,j,
imageData.m_rgbColorData[pixelIndex],
imageData.m_rgbColorData[pixelIndex+1],