add back the 'swapBuffers' in VR demo (slightly lower performance, but easier to use demo.
fix issue related to TinyRenderer shadowbuffer API change
This commit is contained in:
@@ -855,7 +855,7 @@ void CMainApplication::RenderFrame()
|
|||||||
// SwapWindow
|
// SwapWindow
|
||||||
{
|
{
|
||||||
B3_PROFILE("m_app->swapBuffer");
|
B3_PROFILE("m_app->swapBuffer");
|
||||||
// m_app->swapBuffer();
|
m_app->swapBuffer();
|
||||||
//SDL_GL_SwapWindow( m_pWindow );
|
//SDL_GL_SwapWindow( m_pWindow );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ struct TinyRenderObjectData
|
|||||||
|
|
||||||
TGAImage& m_rgbColorBuffer;
|
TGAImage& m_rgbColorBuffer;
|
||||||
b3AlignedObjectArray<float>& m_depthBuffer;//required, hence a reference
|
b3AlignedObjectArray<float>& m_depthBuffer;//required, hence a reference
|
||||||
b3AlignedObjectArray<float>* m_shadowBuffer;
|
b3AlignedObjectArray<float>* m_shadowBuffer;//optional, hence a pointer
|
||||||
b3AlignedObjectArray<int>* m_segmentationMaskBufferPtr;//optional, hence a pointer
|
b3AlignedObjectArray<int>* m_segmentationMaskBufferPtr;//optional, hence a pointer
|
||||||
|
|
||||||
TinyRenderObjectData(TGAImage& rgbColorBuffer,b3AlignedObjectArray<float>&depthBuffer);
|
TinyRenderObjectData(TGAImage& rgbColorBuffer,b3AlignedObjectArray<float>&depthBuffer);
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
renderData.m_rgbColorBuffer.set(x,y,color);
|
renderData.m_rgbColorBuffer.set(x,y,color);
|
||||||
renderData.m_depthBuffer[x+y*textureWidth] = -1e30f;
|
renderData.m_depthBuffer[x+y*textureWidth] = -1e30f;
|
||||||
renderData.m_shadowBuffer[x+y*textureWidth] = -1e30f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user