VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_gl_sampler Struct Reference

OpenGL sampler. More...

#include <vlc_opengl_sampler.h>

Collaboration diagram for vlc_gl_sampler:
[legend]

Data Fields

vlc_object_t obj
module_tmodule
struct vlc_gl_tgl
 OpenGL context.
video_format_t fmt_in
 Input video format.
unsigned tex_count
 Number of texture planes.
int32_t tex_widths [(5)]
 Per-plane texture widths.
int32_t tex_heights [(5)]
 Per-plane texture heights.
uint32_t tex_target
 GL texture target (e.g.
uint32_t formats [(5)]
 Per-plane GL format (GLenum values).
bool half_float
 Whether textures use half-float storage.
const float * pic_to_tex_matrix
 Matrix to convert from picture coordinates to texture coordinates.
struct { 
   char *   version 
 Version header appropriate for this shader. More...
   char *   precision 
 Precision preamble appropriate for this shader. More...
   char *   extensions 
 Piece of fragment shader code declaring OpenGL extensions. More...
   char *   body 
 Piece of fragment shader code providing the GLSL function vlc_texture(vec2 coords). More...
shader
const struct vlc_gl_sampler_opsops
void * sys
 Private data for the sampler implementation.

Detailed Description

OpenGL sampler.

Generates GLSL code for sampling input textures and handles chroma conversion, transfer functions, and color space mapping.

Field Documentation

◆ body

char* vlc_gl_sampler::body

Piece of fragment shader code providing the GLSL function vlc_texture(vec2 coords).

It is initialized by the sampler, and is never NULL.

Users of this sampler should inject this code into their fragment shader, before any call to vlc_texture().

◆ extensions

char* vlc_gl_sampler::extensions

Piece of fragment shader code declaring OpenGL extensions.

It is initialized by the sampler, and may be NULL if no extensions are required.

If non-NULL, users of this sampler must inject this code into their fragment shader, immediately after the "version" line.

◆ fmt_in

video_format_t vlc_gl_sampler::fmt_in

Input video format.

◆ formats

uint32_t vlc_gl_sampler::formats[(5)]

Per-plane GL format (GLenum values).

◆ gl

struct vlc_gl_t* vlc_gl_sampler::gl

OpenGL context.

◆ half_float

bool vlc_gl_sampler::half_float

Whether textures use half-float storage.

◆ module

module_t* vlc_gl_sampler::module

◆ obj

vlc_object_t vlc_gl_sampler::obj

◆ ops

◆ pic_to_tex_matrix

const float* vlc_gl_sampler::pic_to_tex_matrix

Matrix to convert from picture coordinates to texture coordinates.

The matrix is 2x3 and is stored in column-major order:

/ a b c \
\ d e f /

It is stored as an array of 6 floats:

[a, d, b, e, c, f]

It is NULL before the first picture is available and may theoretically change on every picture.

◆ precision

char* vlc_gl_sampler::precision

Precision preamble appropriate for this shader.

◆ [struct]

struct { ... } vlc_gl_sampler::shader

◆ sys

void* vlc_gl_sampler::sys

Private data for the sampler implementation.

◆ tex_count

unsigned vlc_gl_sampler::tex_count

Number of texture planes.

◆ tex_heights

int32_t vlc_gl_sampler::tex_heights[(5)]

Per-plane texture heights.

◆ tex_target

uint32_t vlc_gl_sampler::tex_target

GL texture target (e.g.

GL_TEXTURE_2D)

◆ tex_widths

int32_t vlc_gl_sampler::tex_widths[(5)]

Per-plane texture widths.

◆ version

char* vlc_gl_sampler::version

Version header appropriate for this shader.


The documentation for this struct was generated from the following file: