mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-06 07:50:00 +01:00
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:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user