No need to test for Pixel Buffer Objects in extensions (is not

considered an extension, its a core OpenGL 4 feature).
This commit is contained in:
brunoherbelin
2020-06-24 11:03:12 +02:00
parent c7fb663cf5
commit 519b68d634
3 changed files with 4 additions and 16 deletions

View File

@@ -493,7 +493,7 @@ void MediaPlayer::init_texture()
0, GL_RGBA, GL_UNSIGNED_BYTE, v_frame_.data[0]);
if (!isimage_ && Rendering::supportsPBO()) {
if (!isimage_) {
// need to fill image size
pbo_size_ = height_ * width_ * 4;
@@ -539,7 +539,9 @@ void MediaPlayer::init_texture()
pbo_index_ = 0;
pbo_next_index_ = 1;
Log::Info("Using PBO");
#ifdef MEDIA_PLAYER_DEBUG
Log::Info("MediaPlayer %s Using Pixel Buffer Object texturing.", id_.c_str());
#endif
}
}

View File

@@ -692,19 +692,6 @@ void RenderingWindow::draw(FrameBuffer *fb)
}
bool Rendering::supportsPBO()
{
static int support_extension = -1;
if (support_extension < 0) {
if (GLAD_GL_ARB_pixel_buffer_object || GLAD_GL_EXT_pixel_buffer_object)
support_extension = 1;
else
support_extension = 0;
}
return support_extension == 1;
}
//
// Discarded because not working under OSX - kept in case it would become useful
//

View File

@@ -130,7 +130,6 @@ public:
// unproject from window coordinate
glm::vec3 unProject(glm::vec2 screen_coordinate, glm::mat4 modelview = glm::mat4(1.f));
static bool supportsPBO();
private: