From 9f945b3fe2361205ba6a58f92dc976ded7bccb60 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 18 Dec 2000 12:42:31 +0000 Subject: Fixes for win2k crash git-svn-id: http://svn.leocad.org/trunk@183 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- win/Pieceprv.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'win/Pieceprv.cpp') diff --git a/win/Pieceprv.cpp b/win/Pieceprv.cpp index ea39638..90fd6e8 100644 --- a/win/Pieceprv.cpp +++ b/win/Pieceprv.cpp @@ -96,7 +96,7 @@ void CPiecePreview::OnPaint() m_pPieceInfo->RenderPiece(project->GetCurrentColor()); glFinish(); - pfnwglSwapBuffers (m_pDC->m_hDC); + OpenGLSwapBuffers (m_pDC->m_hDC); pfnwglMakeCurrent (oldDC, oldRC); } @@ -111,7 +111,7 @@ void CPiecePreview::OnSize(UINT nType, int cx, int cy) int CPiecePreview::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CWnd::OnCreate(lpCreateStruct) == -1) + if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; m_pDC = new CClientDC(this); @@ -129,11 +129,11 @@ int CPiecePreview::OnCreate(LPCREATESTRUCT lpCreateStruct) pfd.cDepthBits = 32; pfd.iLayerType = PFD_MAIN_PLANE; - int nPixelFormat = pfnwglChoosePixelFormat(m_pDC->m_hDC, &pfd); + int nPixelFormat = OpenGLChoosePixelFormat(m_pDC->m_hDC, &pfd); if (nPixelFormat == 0) return 0; - if (!pfnwglSetPixelFormat(m_pDC->m_hDC, nPixelFormat, &pfd)) + if (!OpenGLSetPixelFormat(m_pDC->m_hDC, nPixelFormat, &pfd)) return 0; m_pPalette = new CPalette; @@ -175,7 +175,7 @@ int CPiecePreview::OnCreate(LPCREATESTRUCT lpCreateStruct) pfnwglMakeCurrent (oldDC, oldRC); pfnwglShareLists (oldRC, m_hglRC); - return 0; + return 0; } void CPiecePreview::OnDestroy() -- cgit v1.2.3