]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/glcanvas.cpp
fixed spurious debug message about unexpected focus change when wx focus changed...
[wxWidgets.git] / src / msw / glcanvas.cpp
index 2c5406e2fda528c42daf3e15da63f49626543884..ce18ac742a25adde2cdde7212047a2f52f2b6979 100644 (file)
@@ -249,10 +249,6 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
 
 wxGLCanvas::~wxGLCanvas()
 {
-#if WXWIN_COMPATIBILITY_2_8
-    delete m_glContext;
-#endif
-
     ::ReleaseDC(GetHwnd(), m_hDC);
 }
 
@@ -450,6 +446,14 @@ wxGLCanvas::ChooseMatchingPixelFormat(HDC hdc,
     return ::ChoosePixelFormat(hdc, ppfd);
 }
 
+/* static */
+bool wxGLCanvasBase::IsDisplaySupported(const int *attribList)
+{
+    // We need a device context to test the pixel format, so get one
+    // for the root window.
+    return wxGLCanvas::ChooseMatchingPixelFormat(ScreenHDC(), attribList) > 0;
+}
+
 bool wxGLCanvas::DoSetup(const int *attribList)
 {
     PIXELFORMATDESCRIPTOR pfd;