37#ifndef OPENGL_UTILS_HPP
38#define OPENGL_UTILS_HPP
45# include <OpenGL/OpenGL.h>
46# include <OpenGL/gl3.h>
47# include <OpenGL/glext.h>
48#elif defined __linux__
169 void allocate(
int w,
int h, GLint internal_fmt);
214 glGenFramebuffers(1, &
fbo);
218 glDeleteFramebuffers(1, &
fbo);
268 glDeleteBuffers(1, &
buf_id);
295 template<
class Derived>
297 return std::make_unique<Derived>();
339 std::unique_ptr<Frame_convertor>
conv;
405 void resize(
int width,
int height);
void resize(int width, int height)
void enableDeinterlacing(bool enable)
void put_frame(video_frame *f)
virtual void attach_texture(Texture &tex)=0
static std::unique_ptr< Frame_convertor > construct_unique()
virtual ~Frame_convertor()
virtual void put_frame(video_frame *f, bool pbo_frame=false)=0
void set_pbo(GlBuffer *pbo)
std::unique_ptr< GlBuffer > upload_pbo
std::vector< codec_t > get_supported_codecs()
void enable_pbo(bool enable)
void put_frame(video_frame *f, bool pbo_frame=false)
std::unique_ptr< Frame_convertor > conv
void attach_dst_texture(Texture *tex)
GlBuffer & operator=(const GlBuffer &)=delete
GlBuffer & operator=(GlBuffer &&o)
GlBuffer(const GlBuffer &)=delete
GlProgram & operator=(GlProgram &&o)
GlProgram & operator=(const GlProgram &)=delete
GlProgram(const GlProgram &)=delete
Model(const Model &)=delete
Model & operator=(const Model &)=delete
static Model get_sphere()
Model & operator=(Model &&o)
Texture & operator=(Texture &&o)
Texture & operator=(const Texture &)=delete
Texture(const Texture &)=delete
void load_frame(int w, int h, GLint internal_format, GLenum src_format, GLenum type, video_frame *f, bool pbo_frame)
void allocate(int w, int h, GLint internal_fmt)
bool is_new_front_available() const
bool check_gl_extension_present(const char *ext)
void attach_texture(GLuint tex)
Framebuffer(Framebuffer &&o)
void swap(Framebuffer &o)
void attach_texture(const Texture &tex)
Framebuffer & operator=(const Framebuffer &)=delete
Framebuffer & operator=(Framebuffer &&o)
Framebuffer(const Framebuffer &)=delete
Struct video_frame represents a video frame and contains video description.
@ VIDEO_CODEC_NONE
dummy color spec