mirror of
https://github.com/mpv-player/mpv
synced 2025-01-10 00:49:32 +00:00
aac04c0d64
Actually GL-specific parts go into gl_utils.c/h, the shader cache (gl_sc*) into shader_cache.c/h. No semantic changes of any kind, except that the VAO helper is made public again as part of gl_utils.c (all while the goal for gl_utils.c itself is to be included by GL-specific code).
37 lines
966 B
C
37 lines
966 B
C
#pragma once
|
|
|
|
#include "common.h"
|
|
#include "ra.h"
|
|
#include "gl_utils.h"
|
|
|
|
// For ra.priv
|
|
struct ra_gl {
|
|
GL *gl;
|
|
};
|
|
|
|
// For ra_tex.priv
|
|
struct ra_tex_gl {
|
|
bool own_objects;
|
|
GLenum target;
|
|
GLuint texture; // 0 if no texture data associated
|
|
GLuint fbo; // 0 if no rendering requested, or it default framebuffer
|
|
// These 3 fields can be 0 if unknown.
|
|
GLint internal_format;
|
|
GLenum format;
|
|
GLenum type;
|
|
struct gl_pbo_upload pbo;
|
|
};
|
|
|
|
// For ra_mapped_buffer.priv
|
|
struct ra_mapped_buffer_gl {
|
|
GLuint pbo;
|
|
GLsync fence;
|
|
};
|
|
|
|
int ra_init_gl(struct ra *ra, GL *gl);
|
|
struct ra_tex *ra_create_wrapped_texture(struct ra *ra, GLuint gl_texture,
|
|
GLenum gl_target, GLint gl_iformat,
|
|
GLenum gl_format, GLenum gl_type,
|
|
int w, int h);
|
|
struct ra_tex *ra_create_wrapped_fb(struct ra *ra, GLuint gl_fbo, int w, int h);
|