summaryrefslogtreecommitdiff
path: root/win/Print.cpp
diff options
context:
space:
mode:
authorleo2000-08-24 21:24:42 +0000
committerleo2000-08-24 21:24:42 +0000
commit31a1d493ed4ca5d263244a8a3231111a58bdc5c4 (patch)
tree9963c933eb4fe42f257db26c7938009c4a88b0f4 /win/Print.cpp
parente54d0ecfb00132cb4eeafb7d909f89c93a7b3ca6 (diff)
Updated the Windows version with the new Minifig Wizard.
Fixed some OpenGL problems on the Windows version. git-svn-id: http://svn.leocad.org/trunk@106 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win/Print.cpp')
-rw-r--r--win/Print.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/win/Print.cpp b/win/Print.cpp
index 158a0ab..2c62f80 100644
--- a/win/Print.cpp
+++ b/win/Print.cpp
@@ -179,15 +179,15 @@ static void PrintCatalogThread (CWnd* pParent, CFrameWnd* pMainFrame)
1,PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL | PFD_SUPPORT_GDI,
PFD_TYPE_RGBA, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0 };
- int pixelformat = ChoosePixelFormat(pMemDC->m_hDC, &pfd);
- DescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
- SetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
+ int pixelformat = pfnwglChoosePixelFormat(pMemDC->m_hDC, &pfd);
+ pfnwglDescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ pfnwglSetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
// Creating a OpenGL context
- HGLRC hmemrc = wglCreateContext(pMemDC->GetSafeHdc());
+ HGLRC hmemrc = pfnwglCreateContext(pMemDC->GetSafeHdc());
// Setting up the current OpenGL context
- wglMakeCurrent(pMemDC->GetSafeHdc(), hmemrc);
+ pfnwglMakeCurrent(pMemDC->GetSafeHdc(), hmemrc);
double aspect = (float)w/(float)h;
glMatrixMode(GL_MODELVIEW);
glViewport(0, 0, w, h);
@@ -372,8 +372,8 @@ static void PrintCatalogThread (CWnd* pParent, CFrameWnd* pMainFrame)
free(previous);
}
- wglMakeCurrent(NULL, NULL);
- wglDeleteContext(hmemrc);
+ pfnwglMakeCurrent(NULL, NULL);
+ pfnwglDeleteContext(hmemrc);
SelectObject(pMemDC->GetSafeHdc(), hBmOld);
DeleteObject(hBm);
delete pMemDC;
@@ -563,11 +563,11 @@ static void PrintPiecesThread(void* pv)
PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR),1,PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL | PFD_SUPPORT_GDI,
PFD_TYPE_RGBA, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0 };
- int pixelformat = ChoosePixelFormat(pMemDC->m_hDC, &pfd);
- DescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
- SetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
- HGLRC hmemrc = wglCreateContext(pMemDC->GetSafeHdc());
- wglMakeCurrent(pMemDC->GetSafeHdc(), hmemrc);
+ int pixelformat = pfnwglChoosePixelFormat(pMemDC->m_hDC, &pfd);
+ pfnwglDescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ pfnwglSetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
+ HGLRC hmemrc = pfnwglCreateContext(pMemDC->GetSafeHdc());
+ pfnwglMakeCurrent(pMemDC->GetSafeHdc(), hmemrc);
double aspect = (float)picw/(float)h;
glMatrixMode(GL_MODELVIEW);
glViewport(0, 0, picw, h);
@@ -770,8 +770,8 @@ static void PrintPiecesThread(void* pv)
free(previous);
}
- wglMakeCurrent(NULL, NULL);
- wglDeleteContext(hmemrc);
+ pfnwglMakeCurrent(NULL, NULL);
+ pfnwglDeleteContext(hmemrc);
SelectObject(pMemDC->GetSafeHdc(), hBmOld);
DeleteObject(hBm);
delete pMemDC;