Permalink
Browse files

more detailed error messages

  • Loading branch information...
1 parent c576252 commit f4958b1a6d536af2ed7d91a0c8551415ca3787d5 @attilaolah committed Dec 22, 2010
Showing with 15 additions and 4 deletions.
  1. +8 −2 src/player_equalizer.cpp
  2. +7 −2 src/video_output_opengl_qt.cpp
View
@@ -826,9 +826,15 @@ class eq_window : public eq::Window
return false;
}
if (!glewContextIsSupported(const_cast<GLEWContext *>(glewGetContext()),
- "GL_VERSION_2_1 GL_EXT_framebuffer_object"))
+ "GL_VERSION_2_1"))
{
- msg::err("This OpenGL implementation does not support OpenGL 2.1 and framebuffer objects");
+ msg::err("This OpenGL implementation does not support OpenGL 2.1");
+ return false;
+ }
+ if (!glewContextIsSupported(const_cast<GLEWContext *>(glewGetContext()),
+ "GL_EXT_framebuffer_object"))
+ {
+ msg::err("This OpenGL implementation does not support framebuffer objects");
return false;
}
@@ -101,10 +101,15 @@ void video_output_opengl_qt_widget::initializeGL()
throw exc(std::string("Cannot initialize GLEW: ")
+ reinterpret_cast<const char *>(glewGetErrorString(err)));
}
- if (!glewIsSupported("GL_VERSION_2_1 GL_EXT_framebuffer_object"))
+ if (!glewIsSupported("GL_VERSION_2_1"))
{
throw exc(std::string("This OpenGL implementation does not support "
- "OpenGL 2.1 and framebuffer objects"));
+ "OpenGL 2.1"));
+ }
+ if (!glewIsSupported("GL_EXT_framebuffer_object"))
+ {
+ throw exc(std::string("This OpenGL implementation does not support "
+ "framebuffer objects"));
}
_vo->initialize();
}

0 comments on commit f4958b1

Please sign in to comment.