Fixed VBO support.

This commit is contained in:
leo 2012-07-03 18:09:27 +00:00
parent 97a0a73cda
commit d6b26e1a63
2 changed files with 4 additions and 0 deletions

View file

@ -1136,6 +1136,7 @@ void GL_InitializeExtensions()
glGetBufferParameterivARB = (GLGETBUFFERPARAMETERIVARBPROC)Sys_GLGetExtension("glGetBufferParameterivARB");
glGetBufferPointervARB = (GLGETBUFFERPOINTERVARBPROC)Sys_GLGetExtension("glGetBufferPointervARB");
GL_UseVertexBufferObject = true;
GL_SupportsVertexBufferObject = true;
}
}

View file

@ -223,6 +223,8 @@ void CCADView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
HBITMAP hBm = CreateDIBSection(hMemDC, &bi, DIB_RGB_COLORS, (void **)&lpbi, NULL, (DWORD)0);
HBITMAP hBmOld = (HBITMAP)SelectObject(hMemDC, hBm);
GL_DisableVertexBufferObject();
View view(project, project->m_ActiveView);
view.m_Camera = project->m_ActiveView->m_Camera;
view.CreateFromBitmap(hMemDC);
@ -356,6 +358,7 @@ void CCADView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
SelectObject(hMemDC, hBmOld);
DeleteObject(hBm);
DeleteDC(hMemDC);
GL_EnableVertexBufferObject();
SelectObject(pDC->m_hDC, hpOld);
SelectObject(pDC->m_hDC, OldFont);