added multisampling (anti-aliasing) support to wxGLCanvas (#9145)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-06-08 00:12:12 +00:00
parent abbcf16d06
commit c39d2e0a38
10 changed files with 445 additions and 11 deletions

View File

@@ -115,5 +115,29 @@ void wxGLCanvasBase::OnSize(wxSizeEvent& WXUNUSED(event))
#endif // WXWIN_COMPATIBILITY_2_8
/* static */
bool wxGLCanvasBase::IsExtensionInList(const char *list, const char *extension)
{
for ( const char *p = list; *p; p++ )
{
// advance up to the next possible match
p = wxStrstr(p, extension);
if ( !p )
break;
// check that the extension appears at the beginning/ending of the list
// or is preceded/followed by a space to avoid mistakenly finding
// "glExtension" in a list containing some "glFunkyglExtension"
if ( (p == list || p[-1] == ' ') )
{
char c = p[strlen(extension)];
if ( c == '\0' || c == ' ' )
return true;
}
}
return false;
}
#endif // wxUSE_GLCANVAS