mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
parent
e10eb51f71
commit
dd366cd5c5
@ -626,6 +626,7 @@ static void gl2_renderchain_render(
|
||||
|
||||
gl->coords.vertices = 4;
|
||||
|
||||
coords.handle_data = NULL;
|
||||
coords.data = &gl->coords;
|
||||
|
||||
video_driver_set_coords(&coords);
|
||||
@ -701,6 +702,7 @@ static void gl2_renderchain_render(
|
||||
|
||||
gl->coords.vertices = 4;
|
||||
|
||||
coords.handle_data = NULL;
|
||||
coords.data = &gl->coords;
|
||||
|
||||
video_driver_set_coords(&coords);
|
||||
@ -1974,6 +1976,7 @@ static void gl_render_overlay(gl_t *gl, video_frame_info_t *video_info)
|
||||
gl->coords.color = gl->overlay_color_coord;
|
||||
gl->coords.vertices = 4 * gl->overlays;
|
||||
|
||||
coords.handle_data = NULL;
|
||||
coords.data = &gl->coords;
|
||||
|
||||
video_driver_set_coords(&coords);
|
||||
@ -2349,6 +2352,7 @@ static void gl_render_osd_background(
|
||||
coords.lut_tex_coord = dummy;
|
||||
coords.vertices = vertices_total;
|
||||
|
||||
coords_data.handle_data = NULL;
|
||||
coords_data.data = &coords;
|
||||
|
||||
video_driver_set_viewport(video_info->width,
|
||||
@ -2466,6 +2470,7 @@ static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info)
|
||||
|
||||
gl->coords.vertices = 4;
|
||||
|
||||
coords.handle_data = NULL;
|
||||
coords.data = &gl->coords;
|
||||
|
||||
video_driver_set_coords(&coords);
|
||||
@ -2668,6 +2673,7 @@ static bool gl_frame(void *data, const void *frame,
|
||||
gl->shader->set_params(¶ms, gl->shader_data);
|
||||
|
||||
gl->coords.vertices = 4;
|
||||
coords.handle_data = NULL;
|
||||
coords.data = &gl->coords;
|
||||
|
||||
video_driver_set_coords(&coords);
|
||||
@ -4070,7 +4076,7 @@ static void gl_unload_texture(void *data, uintptr_t id)
|
||||
glDeleteTextures(1, &glid);
|
||||
}
|
||||
|
||||
static void gl_set_coords(void *shader_data,
|
||||
static void gl_set_coords(void *handle_data, void *shader_data,
|
||||
const struct video_coords *coords)
|
||||
{
|
||||
}
|
||||
|
@ -257,6 +257,7 @@ static void gl_raster_font_draw_vertices(gl_raster_t *font,
|
||||
font->atlas->dirty = false;
|
||||
}
|
||||
|
||||
coords_data.handle_data = NULL;
|
||||
coords_data.data = coords;
|
||||
|
||||
video_driver_set_coords(&coords_data);
|
||||
|
@ -258,8 +258,7 @@ static bool gl_cg_set_mvp(void *data, void *shader_data,
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool gl_cg_set_coords(void *shader_data,
|
||||
const struct video_coords *coords)
|
||||
static bool gl_cg_set_coords(void *handle_data, void *shader_data, const struct video_coords *coords)
|
||||
{
|
||||
cg_shader_data_t *cg = (cg_shader_data_t*)shader_data;
|
||||
|
||||
|
@ -1448,7 +1448,7 @@ static bool gl_glsl_set_mvp(void *data, void *shader_data, const void *mat_data)
|
||||
buffer[y + size] = coord2[y]; \
|
||||
size += multiplier * coords->vertices; \
|
||||
|
||||
static bool gl_glsl_set_coords(void *shader_data,
|
||||
static bool gl_glsl_set_coords(void *handle_data, void *shader_data,
|
||||
const struct video_coords *coords)
|
||||
{
|
||||
GLfloat short_buffer[4 * (2 + 2 + 4 + 2)];
|
||||
|
@ -2737,10 +2737,11 @@ bool video_driver_texture_unload(uintptr_t *id)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool video_driver_cb_set_coords(
|
||||
static bool video_driver_cb_set_coords(void *handle_data,
|
||||
void *shader_data, const struct video_coords *coords)
|
||||
{
|
||||
video_shader_ctx_coords_t ctx_coords;
|
||||
ctx_coords.handle_data = handle_data;
|
||||
ctx_coords.data = coords;
|
||||
|
||||
video_driver_set_coords(&ctx_coords);
|
||||
@ -3564,13 +3565,13 @@ bool video_shader_driver_init(video_shader_ctx_init_t *init)
|
||||
void video_driver_set_coords(video_shader_ctx_coords_t *coords)
|
||||
{
|
||||
if (current_shader && current_shader->set_coords)
|
||||
current_shader->set_coords(
|
||||
current_shader->set_coords(coords->handle_data,
|
||||
current_shader_data,
|
||||
(const struct video_coords*)coords->data);
|
||||
else
|
||||
{
|
||||
if (video_driver_poke && video_driver_poke->set_coords)
|
||||
video_driver_poke->set_coords(
|
||||
video_driver_poke->set_coords(coords->handle_data,
|
||||
current_shader_data,
|
||||
(const struct video_coords*)coords->data);
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ typedef struct shader_backend
|
||||
enum gfx_wrap_type (*wrap_type)(void *data, unsigned index);
|
||||
void (*shader_scale)(void *data,
|
||||
unsigned index, struct gfx_fbo_scale *scale);
|
||||
bool (*set_coords)(
|
||||
bool (*set_coords)(void *handle_data,
|
||||
void *shader_data, const struct video_coords *coords);
|
||||
bool (*set_mvp)(void *data, void *shader_data,
|
||||
const void *mat_data);
|
||||
@ -276,6 +276,7 @@ typedef struct video_shader_ctx_params
|
||||
|
||||
typedef struct video_shader_ctx_coords
|
||||
{
|
||||
void *handle_data;
|
||||
const void *data;
|
||||
} video_shader_ctx_coords_t;
|
||||
|
||||
@ -687,7 +688,7 @@ struct aspect_ratio_elem
|
||||
typedef struct video_poke_interface
|
||||
{
|
||||
uint32_t (*get_flags)(void *data);
|
||||
void (*set_coords)(void *shader_data,
|
||||
void (*set_coords)(void *handle_data, void *shader_data,
|
||||
const struct video_coords *coords);
|
||||
void (*set_mvp)(void *data, void *shader_data,
|
||||
const void *mat_data);
|
||||
|
@ -122,6 +122,7 @@ static void menu_display_gl_draw(menu_display_ctx_draw_t *draw,
|
||||
if (draw)
|
||||
glBindTexture(GL_TEXTURE_2D, (GLuint)draw->texture);
|
||||
|
||||
coords.handle_data = gl;
|
||||
coords.data = draw->coords;
|
||||
|
||||
video_driver_set_coords(&coords);
|
||||
|
Loading…
Reference in New Issue
Block a user