VLC  3.0.21
Data Structures | Typedefs | Functions
opengl.c File Reference
Include dependency graph for opengl.c:

Data Structures

struct  vlc_gl_priv_t
 
struct  vlc_gl_surface
 

Typedefs

typedef struct vlc_gl_surface vlc_gl_surface_t
 

Functions

vlc_gl_tvlc_gl_Create (struct vout_window_t *wnd, unsigned flags, const char *name)
 Creates an OpenGL context (and its underlying surface). More...
 
void vlc_gl_Hold (vlc_gl_t *gl)
 
void vlc_gl_Release (vlc_gl_t *gl)
 
static void vlc_gl_surface_ResizeNotify (vout_window_t *surface, unsigned width, unsigned height)
 
vlc_gl_tvlc_gl_surface_Create (vlc_object_t *obj, const vout_window_cfg_t *cfg, struct vout_window_t **restrict wp)
 
bool vlc_gl_surface_CheckSize (vlc_gl_t *gl, unsigned *restrict width, unsigned *restrict height)
 Checks if the dimensions of the surface used by the OpenGL context have changed (since the previous call), and the OpenGL viewport should be updated. More...
 
void vlc_gl_surface_Destroy (vlc_gl_t *gl)
 

Typedef Documentation

◆ vlc_gl_surface_t

Function Documentation

◆ vlc_gl_Create()

vlc_gl_t* vlc_gl_Create ( struct vout_window_t wnd,
unsigned  flags,
const char *  name 
)

Creates an OpenGL context (and its underlying surface).

Note
In most cases, you should vlc_gl_MakeCurrent() afterward.
Parameters
wndwindow to use as OpenGL surface
flagsOpenGL context type
namemodule name (or NULL for auto)
Returns
a new context, or NULL on failure

Referenced by vlc_gl_surface_Create().

◆ vlc_gl_Hold()

void vlc_gl_Hold ( vlc_gl_t gl)

◆ vlc_gl_Release()

void vlc_gl_Release ( vlc_gl_t gl)

◆ vlc_gl_surface_CheckSize()

bool vlc_gl_surface_CheckSize ( vlc_gl_t gl,
unsigned *restrict  width,
unsigned *restrict  height 
)

Checks if the dimensions of the surface used by the OpenGL context have changed (since the previous call), and the OpenGL viewport should be updated.

Returns
true if at least one dimension has changed, false otherwise
Warning
This function is intrinsically race-prone. The dimensions can change asynchronously.

References vlc_gl_surface::height, vlc_gl_surface::lock, vout_window_t::owner, vlc_gl_t::surface, vout_window_owner::sys, vlc_gl_Resize(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_gl_surface::width.

◆ vlc_gl_surface_Create()

vlc_gl_t* vlc_gl_surface_Create ( vlc_object_t obj,
const vout_window_cfg_t cfg,
struct vout_window_t **restrict  wp 
)

◆ vlc_gl_surface_Destroy()

void vlc_gl_surface_Destroy ( vlc_gl_t gl)

◆ vlc_gl_surface_ResizeNotify()

static void vlc_gl_surface_ResizeNotify ( vout_window_t surface,
unsigned  width,
unsigned  height 
)
static