explicitly remove textures during resetSimulation

move glViewport to Win32Window
This commit is contained in:
erwincoumans
2018-02-21 23:22:16 -08:00
parent 15c46a0237
commit 73a4334e30
16 changed files with 102 additions and 5 deletions

View File

@@ -413,10 +413,13 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
sData->m_fullWindowHeight = wr.bottom-wr.top;//LOWORD (lParam) HIWORD (lParam);
sData->m_openglViewportWidth = clientRect.right;
sData->m_openglViewportHeight = clientRect.bottom;
//glViewport(0, 0, sData->m_openglViewportWidth, sData->m_openglViewportHeight);
if (sData->m_resizeCallback)
(*sData->m_resizeCallback)(sData->m_openglViewportWidth,sData->m_openglViewportHeight);
{
glViewport(0, 0, sData->m_openglViewportWidth, sData->m_openglViewportHeight);
(*sData->m_resizeCallback)(sData->m_openglViewportWidth, sData->m_openglViewportHeight);
}
//if (sOpenGLInitialized)
//{
// //gDemoApplication->reshape(sWidth,sHeight);