summaryrefslogtreecommitdiff
path: root/win/Print.cpp
diff options
context:
space:
mode:
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;