summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorleo2000-12-18 12:42:31 +0000
committerleo2000-12-18 12:42:31 +0000
commit9f945b3fe2361205ba6a58f92dc976ded7bccb60 (patch)
tree54db9efd1c083ac06128e4f9d8f1f4e2044d832c /win
parente679694a7bcb61ffee8351bad0396944716b81d4 (diff)
Fixes for win2k crash
git-svn-id: http://svn.leocad.org/trunk@183 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win')
-rw-r--r--win/Cadview.cpp26
-rw-r--r--win/LeoCAD.dsp9
-rw-r--r--win/Leocad.cpp4
-rw-r--r--win/Mfwnd.cpp7
-rw-r--r--win/Pieceprv.cpp10
-rw-r--r--win/Print.cpp12
-rw-r--r--win/System.cpp8
-rw-r--r--win/Terrwnd.cpp6
-rw-r--r--win/Tools.cpp4
-rw-r--r--win/aboutdlg.cpp2
-rwxr-xr-xwin/win_gl.cpp66
-rwxr-xr-xwin/win_gl.h27
12 files changed, 122 insertions, 59 deletions
diff --git a/win/Cadview.cpp b/win/Cadview.cpp
index 8bc2e29..b162e8d 100644
--- a/win/Cadview.cpp
+++ b/win/Cadview.cpp
@@ -292,9 +292,9 @@ void CCADView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
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 = pfnwglChoosePixelFormat(hMemDC, &pfd);
- pfnwglDescribePixelFormat (hMemDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
- pfnwglSetPixelFormat (hMemDC, pixelformat, &pfd);
+ int pixelformat = OpenGLChoosePixelFormat(hMemDC, &pfd);
+ OpenGLDescribePixelFormat (hMemDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ OpenGLSetPixelFormat (hMemDC, pixelformat, &pfd);
// Creating OpenGL context
HGLRC hmemrc = pfnwglCreateContext(hMemDC);
@@ -584,7 +584,7 @@ void CCADView::OnEndPrintPreview(CDC* pDC, CPrintInfo* pInfo, POINT point, CPrev
pfnwglMakeCurrent(NULL, NULL);
- if (pfnwglGetPixelFormat(m_pDC->GetSafeHdc()) == 0)
+ if (OpenGLGetPixelFormat(m_pDC->GetSafeHdc()) == 0)
{
delete m_pDC;
m_pDC = new CClientDC(this);
@@ -594,13 +594,13 @@ void CCADView::OnEndPrintPreview(CDC* pDC, CPrintInfo* pInfo, POINT point, CPrev
PFD_TYPE_RGBA, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0 };
- int pixelformat = pfnwglChoosePixelFormat(m_pDC->GetSafeHdc(), &pfd);
+ int pixelformat = OpenGLChoosePixelFormat(m_pDC->GetSafeHdc(), &pfd);
if (pixelformat == 0)
{
AfxMessageBox("ChoosePixelFormat failed");
}
- if (pfnwglSetPixelFormat(m_pDC->m_hDC, pixelformat, &pfd) == FALSE)
+ if (OpenGLSetPixelFormat(m_pDC->m_hDC, pixelformat, &pfd) == FALSE)
{
AfxMessageBox("SetPixelFormat failed");
}
@@ -753,7 +753,7 @@ BOOL CCADView::OnEraseBkgnd(CDC* /*pDC*/)
int CCADView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
- if (CView::OnCreate(lpCreateStruct) == -1)
+ if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
m_pDC = new CClientDC(this);
@@ -771,15 +771,15 @@ int CCADView::OnCreate(LPCREATESTRUCT lpCreateStruct)
32, // 16(32)-bit z-buffer
0, 0, // no stencil & auxiliary buffer
PFD_MAIN_PLANE, 0, 0, 0, 0 }; // layer masks ignored
-
- int pixelformat = pfnwglChoosePixelFormat(m_pDC->GetSafeHdc(), &pfd);
+
+ int pixelformat = OpenGLChoosePixelFormat(m_pDC->GetSafeHdc(), &pfd);
if (pixelformat == 0)
{
AfxMessageBox("ChoosePixelFormat failed");
return -1;
}
- if (pfnwglSetPixelFormat(m_pDC->m_hDC, pixelformat, &pfd) == FALSE)
+ if (OpenGLSetPixelFormat(m_pDC->m_hDC, pixelformat, &pfd) == FALSE)
{
AfxMessageBox("SetPixelFormat failed");
return -1;
@@ -797,13 +797,13 @@ int CCADView::OnCreate(LPCREATESTRUCT lpCreateStruct)
m_pPalette = NULL;
}
- m_hglRC = pfnwglCreateContext(m_pDC->m_hDC);
+ m_hglRC = pfnwglCreateContext(m_pDC->m_hDC);
pfnwglMakeCurrent(m_pDC->m_hDC, m_hglRC);
GL_InitializeExtensions ();
- SetTimer (IDT_LC_SAVETIMER, 5000, NULL);
+ SetTimer (IDT_LC_SAVETIMER, 5000, NULL);
- return 0;
+ return 0;
}
void CCADView::OnPaletteChanged(CWnd* pFocusWnd)
diff --git a/win/LeoCAD.dsp b/win/LeoCAD.dsp
index 95cf5c5..0691e50 100644
--- a/win/LeoCAD.dsp
+++ b/win/LeoCAD.dsp
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 vfw32.lib jpeglib.lib 3dsftk.lib libpng.lib zlib.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /libpath:"./jpeglib/debug" /libpath:"./3dsftk/debug" /libpath:"./libpng/debug" /libpath:"./zlib/debug"
+# ADD LINK32 vfw32.lib jpeglib.lib 3dsftk.lib libpng.lib zlib.lib gdi32.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libcd.lib" /libpath:"./jpeglib/debug" /libpath:"./3dsftk/debug" /libpath:"./libpng/debug" /libpath:"./zlib/debug"
# SUBTRACT LINK32 /pdb:none
!ENDIF
@@ -178,6 +178,13 @@ USERDEP__LEOCA="$(ProjDir)\hlp\AfxCore.rtf" "$(ProjDir)\hlp\AfxPrint.rtf"
# Begin Source File
SOURCE=.\Leocad.rc
+
+!IF "$(CFG)" == "LeoCAD - Win32 Release"
+
+!ELSEIF "$(CFG)" == "LeoCAD - Win32 Debug"
+
+!ENDIF
+
# End Source File
# Begin Source File
diff --git a/win/Leocad.cpp b/win/Leocad.cpp
index 66c45e1..657fc62 100644
--- a/win/Leocad.cpp
+++ b/win/Leocad.cpp
@@ -97,7 +97,6 @@ BOOL CCADApp::InitInstance()
return FALSE;
-
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
@@ -108,7 +107,7 @@ BOOL CCADApp::InitInstance()
RUNTIME_CLASS(CCADView));
AddDocTemplate(pDocTemplate);
- EnableShellOpen();
+ EnableShellOpen();
RegisterShellFileTypes(TRUE);
project = new Project;
@@ -126,7 +125,6 @@ BOOL CCADApp::InitInstance()
if (!project->Initialize(__argc, __targv, app, NULL))
return false;
-
// TODO: move this to the project.
CString cfg = GetProfileString("Settings","Groups","");
if (!cfg.IsEmpty())
diff --git a/win/Mfwnd.cpp b/win/Mfwnd.cpp
index 753fc4b..83ee3b3 100644
--- a/win/Mfwnd.cpp
+++ b/win/Mfwnd.cpp
@@ -54,11 +54,11 @@ int CMinifigWnd::InitGL()
pfd.cDepthBits = 24;
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 -1 ;
- if (!pfnwglSetPixelFormat(m_pDC->m_hDC, nPixelFormat, &pfd))
+ if (!OpenGLSetPixelFormat(m_pDC->m_hDC, nPixelFormat, &pfd))
return -1 ;
m_pPal = new CPalette;
@@ -133,10 +133,9 @@ void CMinifigWnd::DrawScene()
RECT rc;
GetClientRect (&rc);
-
m_pFig->Resize (rc.right, rc.bottom);
m_pFig->Redraw ();
- pfnwglSwapBuffers (m_pDC->m_hDC);
+ OpenGLSwapBuffers (m_pDC->m_hDC);
pfnwglMakeCurrent (oldDC, oldRC);
}
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()
diff --git a/win/Print.cpp b/win/Print.cpp
index 2c62f80..03a3753 100644
--- a/win/Print.cpp
+++ b/win/Print.cpp
@@ -179,9 +179,9 @@ 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 = pfnwglChoosePixelFormat(pMemDC->m_hDC, &pfd);
- pfnwglDescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
- pfnwglSetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
+ int pixelformat = OpenGLChoosePixelFormat(pMemDC->m_hDC, &pfd);
+ OpenGLDescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ OpenGLSetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
// Creating a OpenGL context
HGLRC hmemrc = pfnwglCreateContext(pMemDC->GetSafeHdc());
@@ -563,9 +563,9 @@ 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 = pfnwglChoosePixelFormat(pMemDC->m_hDC, &pfd);
- pfnwglDescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
- pfnwglSetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
+ int pixelformat = OpenGLChoosePixelFormat(pMemDC->m_hDC, &pfd);
+ OpenGLDescribePixelFormat(pMemDC->m_hDC, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ OpenGLSetPixelFormat(pMemDC->m_hDC, pixelformat, &pfd);
HGLRC hmemrc = pfnwglCreateContext(pMemDC->GetSafeHdc());
pfnwglMakeCurrent(pMemDC->GetSafeHdc(), hmemrc);
double aspect = (float)picw/(float)h;
diff --git a/win/System.cpp b/win/System.cpp
index 3dbd7fc..7fcf8d6 100644
--- a/win/System.cpp
+++ b/win/System.cpp
@@ -1444,9 +1444,9 @@ void* Sys_StartMemoryRender(int width, int height)
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 = pfnwglChoosePixelFormat(render->hdc, &pfd);
- pfnwglDescribePixelFormat(render->hdc, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
- pfnwglSetPixelFormat(render->hdc, pixelformat, &pfd);
+ int pixelformat = OpenGLChoosePixelFormat(render->hdc, &pfd);
+ OpenGLDescribePixelFormat(render->hdc, pixelformat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ OpenGLSetPixelFormat(render->hdc, pixelformat, &pfd);
render->hrc = pfnwglCreateContext(render->hdc);
pfnwglMakeCurrent(render->hdc, render->hrc);
@@ -1565,7 +1565,7 @@ long SystemGetTicks()
void SystemSwapBuffers()
{
- pfnwglSwapBuffers (pfnwglGetCurrentDC());
+ OpenGLSwapBuffers (pfnwglGetCurrentDC());
}
void SystemSetGroup(int group)
diff --git a/win/Terrwnd.cpp b/win/Terrwnd.cpp
index 2708cc7..e6f1a7a 100644
--- a/win/Terrwnd.cpp
+++ b/win/Terrwnd.cpp
@@ -84,7 +84,7 @@ void CTerrainWnd::OnPaint()
m_pTerrain->Render(m_pCamera, aspect);
glFlush();
- pfnwglSwapBuffers (dc.m_hDC);
+ OpenGLSwapBuffers (dc.m_hDC);
pfnwglMakeCurrent (oldDC, oldRC);
}
@@ -136,11 +136,11 @@ int CTerrainWnd::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 -1;
- if (!pfnwglSetPixelFormat(m_pDC->m_hDC, nPixelFormat, &pfd))
+ if (!OpenGLSetPixelFormat(m_pDC->m_hDC, nPixelFormat, &pfd))
return -1;
m_pPalette = new CPalette;
diff --git a/win/Tools.cpp b/win/Tools.cpp
index 1a78639..1e3a33e 100644
--- a/win/Tools.cpp
+++ b/win/Tools.cpp
@@ -117,8 +117,8 @@ BOOL CreateRGBPalette(HDC hDC, CPalette **ppCPalette)
LOGPALETTE *pPal;
WORD n, i;
- n = pfnwglGetPixelFormat(hDC);
- pfnwglDescribePixelFormat(hDC, n, sizeof(pfd), &pfd);
+ n = OpenGLGetPixelFormat(hDC);
+ OpenGLDescribePixelFormat(hDC, n, sizeof(pfd), &pfd);
if (!(pfd.dwFlags & PFD_NEED_PALETTE)) return FALSE;
diff --git a/win/aboutdlg.cpp b/win/aboutdlg.cpp
index bb60f72..c3b1459 100644
--- a/win/aboutdlg.cpp
+++ b/win/aboutdlg.cpp
@@ -41,7 +41,7 @@ BOOL CAboutDlg::OnInitDialog()
CString info, tmp;
PIXELFORMATDESCRIPTOR pfd;
- pfnwglDescribePixelFormat(m_hViewDC, pfnwglGetPixelFormat(m_hViewDC), sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ OpenGLDescribePixelFormat(m_hViewDC, OpenGLGetPixelFormat(m_hViewDC), sizeof(PIXELFORMATDESCRIPTOR), &pfd);
info = ("Pixel Format: ");
if (pfd.iPixelType == PFD_TYPE_RGBA)
diff --git a/win/win_gl.cpp b/win/win_gl.cpp
index 4310c55..58af6cd 100755
--- a/win/win_gl.cpp
+++ b/win/win_gl.cpp
@@ -6,15 +6,16 @@
#include "opengl.h"
static HMODULE gl_module;
+static bool gl_ignore_GDI = false;
// ============================================================================
// Function pointers
-WGLCHOOSEPIXELFORMAT pfnwglChoosePixelFormat;
-WGLDESCRIBEPIXELFORMAT pfnwglDescribePixelFormat;
-WGLGETPIXELFORMAT pfnwglGetPixelFormat;
-WGLSETPIXELFORMAT pfnwglSetPixelFormat;
-WGLSWAPBUFFERS pfnwglSwapBuffers;
+static WGLCHOOSEPIXELFORMAT pfnwglChoosePixelFormat;
+static WGLDESCRIBEPIXELFORMAT pfnwglDescribePixelFormat;
+static WGLGETPIXELFORMAT pfnwglGetPixelFormat;
+static WGLSETPIXELFORMAT pfnwglSetPixelFormat;
+static WGLSWAPBUFFERS pfnwglSwapBuffers;
WGLCOPYCONTEXT pfnwglCopyContext;
WGLCREATECONTEXT pfnwglCreateContext;
WGLCREATELAYERCONTEXT pfnwglCreateLayerContext;
@@ -38,6 +39,46 @@ WGLSETDEVICEGAMMARAMPEXT pfnwglSetDeviceGammaRampEXT;
// ============================================================================
// Global functions
+BOOL OpenGLSwapBuffers (HDC hdc)
+{
+ if (!gl_ignore_GDI)
+ return SwapBuffers (hdc);
+ else
+ return pfnwglSwapBuffers (hdc);
+}
+
+int OpenGLChoosePixelFormat(HDC hdc, CONST PIXELFORMATDESCRIPTOR * ppfd)
+{
+ if (!gl_ignore_GDI)
+ return ChoosePixelFormat (hdc, ppfd);
+ else
+ return pfnwglChoosePixelFormat (hdc, ppfd);
+}
+
+int OpenGLDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd)
+{
+ if (!gl_ignore_GDI)
+ return DescribePixelFormat (hdc, iPixelFormat, nBytes, ppfd);
+ else
+ return pfnwglDescribePixelFormat (hdc, iPixelFormat, nBytes, ppfd);
+}
+
+BOOL OpenGLSetPixelFormat(HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR * ppfd)
+{
+ if (!gl_ignore_GDI)
+ return SetPixelFormat (hdc, iPixelFormat, ppfd);
+ else
+ return pfnwglSetPixelFormat (hdc, iPixelFormat, ppfd);
+}
+
+int OpenGLGetPixelFormat(HDC hdc)
+{
+ if (!gl_ignore_GDI)
+ return GetPixelFormat (hdc);
+ else
+ return pfnwglGetPixelFormat (hdc);
+}
+
void* Sys_GLGetProc (const char *symbol)
{
return GetProcAddress (gl_module, symbol);
@@ -51,13 +92,24 @@ void* Sys_GLGetExtension (const char *symbol)
bool Sys_GLOpenLibrary (const char* libname)
{
if (libname)
- gl_module = LoadLibrary (libname);
+ {
+ gl_module = LoadLibrary (libname);
+
+ if (strcmp(libname, "opengl32.dll"))
+ gl_ignore_GDI = true;
+ }
if (gl_module == NULL)
+ {
gl_module = LoadLibrary ("opengl32.dll");
+ gl_ignore_GDI = false;
+ }
if (gl_module == NULL)
- gl_module = LoadLibrary ("opengl.dll");
+ {
+ gl_module = LoadLibrary ("opengl.dll");
+ gl_ignore_GDI = true;
+ }
if (gl_module == NULL)
return false;
diff --git a/win/win_gl.h b/win/win_gl.h
index 891361c..8a707d2 100755
--- a/win/win_gl.h
+++ b/win/win_gl.h
@@ -4,6 +4,13 @@
// ============================================================================
// WGL functions typedefs
+// these functions depend on the driver loaded
+BOOL OpenGLSwapBuffers (HDC hdc);
+int OpenGLChoosePixelFormat(HDC hdc, CONST PIXELFORMATDESCRIPTOR * ppfd);
+int OpenGLDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd);
+BOOL OpenGLSetPixelFormat(HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR * ppfd);
+int OpenGLGetPixelFormat(HDC hdc);
+
typedef int (WINAPI* WGLCHOOSEPIXELFORMAT) (HDC, CONST PIXELFORMATDESCRIPTOR *);
typedef int (WINAPI* WGLDESCRIBEPIXELFORMAT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
typedef int (WINAPI* WGLGETPIXELFORMAT)(HDC);
@@ -33,11 +40,11 @@ typedef BOOL (WINAPI* WGLSETDEVICEGAMMARAMPEXT) (const unsigned char *pRed, con
// ============================================================================
// WGL extern declarations
-extern WGLCHOOSEPIXELFORMAT pfnwglChoosePixelFormat;
-extern WGLDESCRIBEPIXELFORMAT pfnwglDescribePixelFormat;
-extern WGLGETPIXELFORMAT pfnwglGetPixelFormat;
-extern WGLSETPIXELFORMAT pfnwglSetPixelFormat;
-extern WGLSWAPBUFFERS pfnwglSwapBuffers;
+//extern WGLCHOOSEPIXELFORMAT pfnwglChoosePixelFormat;
+//extern WGLDESCRIBEPIXELFORMAT pfnwglDescribePixelFormat;
+//extern WGLGETPIXELFORMAT pfnwglGetPixelFormat;
+//extern WGLSETPIXELFORMAT pfnwglSetPixelFormat;
+//extern WGLSWAPBUFFERS pfnwglSwapBuffers;
extern WGLCOPYCONTEXT pfnwglCopyContext;
extern WGLCREATECONTEXT pfnwglCreateContext;
extern WGLCREATELAYERCONTEXT pfnwglCreateLayerContext;
@@ -65,11 +72,11 @@ extern WGLSETDEVICEGAMMARAMPEXT pfnwglSetDeviceGammaRampEXT;
#undef wglUseFontBitmaps
#undef wglUseFontOutlines
-#define wglChoosePixelFormat pfnwglChoosePixelFormat;
-#define wglDescribePixelFormat pfnwglDescribePixelFormat;
-#define wglGetPixelFormat pfnwglGetPixelFormat;
-#define wglSetPixelFormat pfnwglSetPixelFormat;
-#define wglSwapBuffers pfnwglSwapBuffers;
+//#define wglChoosePixelFormat pfnwglChoosePixelFormat;
+//#define wglDescribePixelFormat pfnwglDescribePixelFormat;
+//#define wglGetPixelFormat pfnwglGetPixelFormat;
+//#define wglSetPixelFormat pfnwglSetPixelFormat;
+//#define wglSwapBuffers pfnwglSwapBuffers;
#define wglCopyContext pfnwglCopyContext;
#define wglCreateContext pfnwglCreateContext;
#define wglCreateLayerContext pfnwglCreateLayerContext;