Permalink
Browse files

Require OpenGL 2.1 + FBOs.

Remove all workarounds for OpenGL implementations that do not meet these
minimum requirements.
  • Loading branch information...
1 parent cb4b4dc commit 9321ce8fae6f5ad778b067f8d1c0d3a8522c6038 @marlam marlam committed Dec 10, 2010
Showing with 152 additions and 357 deletions.
  1. +10 −13 src/player_equalizer.cpp
  2. +120 −331 src/video_output_opengl.cpp
  3. +15 −8 src/video_output_opengl.h
  4. +7 −5 src/video_output_opengl_qt.cpp
View
@@ -162,12 +162,11 @@ class video_output_opengl_eq_window : public video_output_opengl
}
void eq_initialize(int src_width, int src_height, float src_aspect_ratio,
- enum decoder::video_frame_format src_preferred_frame_format,
- bool have_pixel_buffer_object, bool have_texture_non_power_of_two, bool have_fragment_shader)
+ enum decoder::video_frame_format src_preferred_frame_format)
{
set_mode(stereo); // just to ensure that prepare() handles both left and right view
set_source_info(src_width, src_height, src_aspect_ratio, src_preferred_frame_format);
- initialize(have_pixel_buffer_object, have_texture_non_power_of_two, have_fragment_shader);
+ initialize();
}
void eq_deinitialize()
@@ -823,21 +822,19 @@ class eq_window : public eq::Window
{
return false;
}
- eq_node *node = static_cast<eq_node *>(getNode());
+ if (!glewContextIsSupported(const_cast<GLEWContext *>(glewGetContext()),
+ "GL_VERSION_2_1 GL_EXT_framebuffer_object"))
+ {
+ msg::err("This OpenGL implementation does not support OpenGL 2.1 and framebuffer objects");
+ abort();
+ }
// Disable some things that Equalizer seems to enable for some reason.
glDisable(GL_LIGHTING);
- bool have_pixel_buffer_object = glewContextIsSupported(
- const_cast<GLEWContext *>(glewGetContext()), "GL_ARB_pixel_buffer_object");
- bool have_texture_non_power_of_two = glewContextIsSupported(
- const_cast<GLEWContext *>(glewGetContext()), "GL_ARB_texture_non_power_of_two");
- bool have_fragment_shader = glewContextIsSupported(
- const_cast<GLEWContext *>(glewGetContext()), "GL_ARB_fragment_shader");
-
+ eq_node *node = static_cast<eq_node *>(getNode());
_video_output.eq_initialize(node->src_width, node->src_height,
- node->src_aspect_ratio, node->src_preferred_frame_format,
- have_pixel_buffer_object, have_texture_non_power_of_two, have_fragment_shader);
+ node->src_aspect_ratio, node->src_preferred_frame_format);
msg::dbg(HERE);
return true;
Oops, something went wrong.

0 comments on commit 9321ce8

Please sign in to comment.