// An allocator that allocates straight into OpenGL pinned memory.
// Meant for video frames only. We use a queue rather than a stack,
// An allocator that allocates straight into OpenGL pinned memory.
// Meant for video frames only. We use a queue rather than a stack,
// Note: You need to have an OpenGL context when calling
// the constructor.
PBOFrameAllocator(size_t frame_size,
// Note: You need to have an OpenGL context when calling
// the constructor.
PBOFrameAllocator(size_t frame_size,
size_t num_queued_frames = 16, // FIXME: should be 6
GLenum buffer = GL_PIXEL_UNPACK_BUFFER_ARB,
GLenum permissions = GL_MAP_WRITE_BIT,
GLenum map_bits = GL_MAP_FLUSH_EXPLICIT_BIT);
~PBOFrameAllocator() override;
size_t num_queued_frames = 16, // FIXME: should be 6
GLenum buffer = GL_PIXEL_UNPACK_BUFFER_ARB,
GLenum permissions = GL_MAP_WRITE_BIT,
GLenum map_bits = GL_MAP_FLUSH_EXPLICIT_BIT);
~PBOFrameAllocator() override;