mpv_opengl_cb_draw

Render video. Requires that the OpenGL state is initialized.

The video will use the full provided framebuffer. Options like "panscan" are applied to determine which part of the video should be visible and how the video should be scaled. You can change these options at runtime by using the mpv property API.

The renderer will reconfigure itself every time the output rectangle/size is changed. (If you want to do animations, it might be better to do the animation on a FBO instead.)

This function implicitly pulls a video frame from the internal queue and renders it. If no new frame is available, the previous frame is redrawn. The update callback set with mpv_opengl_cb_set_update_callback() notifies you when a new frame was added.

@param fbo The framebuffer object to render on. Because the renderer might manage multiple FBOs internally for the purpose of video postprocessing, it will always bind and unbind FBOs itself. If you want mpv to render on the main framebuffer, pass 0. @param w Width of the framebuffer. This is either the video size if the fbo parameter is 0, or the allocated size of the texture backing the fbo. The renderer will always use the full size of the fbo. @param h Height of the framebuffer. Same as with the w parameter, except that this parameter can be negative. In this case, the video frame will be rendered flipped. @return 0

extern (C)
int
mpv_opengl_cb_draw

Meta