VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_opengl_sampler.h File Reference

This file defines the public OpenGL sampler interface. More...

Include dependency graph for vlc_opengl_sampler.h:

Go to the source code of this file.

Data Structures

struct  vlc_gl_sampler_ops
struct  vlc_gl_sampler
 OpenGL sampler. More...

Macros

#define set_callback_opengl_sampler(open)

Typedefs

typedef int vlc_gl_sampler_open_fn(struct vlc_gl_sampler *sampler, bool expose_planes)
 Activation function for OpenGL sampler module implementations.

Functions

static void vlc_gl_sampler_FetchLocations (struct vlc_gl_sampler *sampler, uint32_t program)
static void vlc_gl_sampler_Load (struct vlc_gl_sampler *sampler)
static int vlc_gl_sampler_Update (struct vlc_gl_sampler *sampler, const struct vlc_gl_picture *picture)
static void vlc_gl_sampler_SelectPlane (struct vlc_gl_sampler *sampler, unsigned plane)

Detailed Description

This file defines the public OpenGL sampler interface.

The purpose of a sampler is to provide pixel values of a VLC input picture, stored in any format.

Concretely, a GLSL function:

vec4 vlc_texture(vec2 coords)

returns the RGBA values for the given coordinates.

Contrary to the standard GLSL function:

vec4 texture2D(sampler2D sampler, vec2 coords)

it does not take a sampler2D as parameter. The role of the sampler is to abstract the input picture from the filter, so the input picture is implicitly available.

Macro Definition Documentation

◆ set_callback_opengl_sampler

#define set_callback_opengl_sampler ( open)
Value:
{ \
vlc_gl_sampler_open_fn *fn = open; \
(void) fn; \
set_callback(fn); \
}
int vlc_gl_sampler_open_fn(struct vlc_gl_sampler *sampler, bool expose_planes)
Activation function for OpenGL sampler module implementations.
Definition vlc_opengl_sampler.h:233

Typedef Documentation

◆ vlc_gl_sampler_open_fn

typedef int vlc_gl_sampler_open_fn(struct vlc_gl_sampler *sampler, bool expose_planes)

Activation function for OpenGL sampler module implementations.

The input format is described by the public fields of the sampler object which are populated before the module is loaded.

Parameters
samplerthe sampler
expose_planesif set, vlc_texture() exposes a single plane at a time
Returns
VLC_SUCCESS when the module can be opened

Function Documentation

◆ vlc_gl_sampler_FetchLocations()

void vlc_gl_sampler_FetchLocations ( struct vlc_gl_sampler * sampler,
uint32_t program )
inlinestatic

◆ vlc_gl_sampler_Load()

void vlc_gl_sampler_Load ( struct vlc_gl_sampler * sampler)
inlinestatic

◆ vlc_gl_sampler_SelectPlane()

void vlc_gl_sampler_SelectPlane ( struct vlc_gl_sampler * sampler,
unsigned plane )
inlinestatic

◆ vlc_gl_sampler_Update()

int vlc_gl_sampler_Update ( struct vlc_gl_sampler * sampler,
const struct vlc_gl_picture * picture )
inlinestatic