mirror of
https://github.com/libretro/RetroArch
synced 2025-03-24 13:43:32 +00:00
Change function signature for set_coords
This commit is contained in:
parent
e48e294009
commit
ef835f93d5
gfx
@ -253,9 +253,8 @@ fallback:
|
|||||||
} \
|
} \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
static bool gl_cg_set_coords(void *handle_data, void *shader_data, const void *data)
|
static bool gl_cg_set_coords(void *handle_data, void *shader_data, const struct gfx_coords *coords)
|
||||||
{
|
{
|
||||||
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
|
||||||
cg_shader_data_t *cg_data = (cg_shader_data_t*)shader_data;
|
cg_shader_data_t *cg_data = (cg_shader_data_t*)shader_data;
|
||||||
|
|
||||||
if (!cg_data || !coords)
|
if (!cg_data || !coords)
|
||||||
|
@ -1379,7 +1379,7 @@ fallback:
|
|||||||
size += multiplier * coords->vertices; \
|
size += multiplier * coords->vertices; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gl_glsl_set_coords(void *handle_data, void *shader_data, const void *data)
|
static bool gl_glsl_set_coords(void *handle_data, void *shader_data, const struct gfx_coords *coords)
|
||||||
{
|
{
|
||||||
/* Avoid hitting malloc on every single regular quad draw. */
|
/* Avoid hitting malloc on every single regular quad draw. */
|
||||||
GLfloat short_buffer[4 * (2 + 2 + 4 + 2)];
|
GLfloat short_buffer[4 * (2 + 2 + 4 + 2)];
|
||||||
@ -1388,7 +1388,6 @@ static bool gl_glsl_set_coords(void *handle_data, void *shader_data, const void
|
|||||||
size_t attribs_size = 0, size = 0;
|
size_t attribs_size = 0, size = 0;
|
||||||
struct glsl_attrib *attr = NULL;
|
struct glsl_attrib *attr = NULL;
|
||||||
const struct shader_uniforms *uni = NULL;
|
const struct shader_uniforms *uni = NULL;
|
||||||
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
|
||||||
glsl_shader_data_t *glsl = (glsl_shader_data_t*)shader_data;
|
glsl_shader_data_t *glsl = (glsl_shader_data_t*)shader_data;
|
||||||
|
|
||||||
if (!glsl || !glsl->shader->modern || !coords)
|
if (!glsl || !glsl->shader->modern || !coords)
|
||||||
|
@ -92,15 +92,12 @@ static bool shader_null_set_mvp(void *data, void *shader_data, const math_matrix
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool shader_null_set_coords(void *handle_data, void *shader_data, const void *data)
|
static bool shader_null_set_coords(void *handle_data, void *shader_data, const struct gfx_coords *coords)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
#ifndef NO_GL_FF_VERTEX
|
#ifndef NO_GL_FF_VERTEX
|
||||||
if (string_is_equal(video_driver_get_ident(), "gl"))
|
if (string_is_equal(video_driver_get_ident(), "gl"))
|
||||||
{
|
|
||||||
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
|
||||||
gl_ff_vertex(coords);
|
gl_ff_vertex(coords);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include <gfx/math/matrix_4x4.h>
|
#include <gfx/math/matrix_4x4.h>
|
||||||
|
|
||||||
|
#include "video_coord_array.h"
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#endif
|
#endif
|
||||||
@ -183,7 +185,7 @@ typedef struct shader_backend
|
|||||||
void (*shader_scale)(void *data,
|
void (*shader_scale)(void *data,
|
||||||
unsigned index, struct gfx_fbo_scale *scale);
|
unsigned index, struct gfx_fbo_scale *scale);
|
||||||
bool (*set_coords)(void *handle_data,
|
bool (*set_coords)(void *handle_data,
|
||||||
void *shader_data, const void *data);
|
void *shader_data, const struct gfx_coords *coords);
|
||||||
bool (*set_mvp)(void *data, void *shader_data,
|
bool (*set_mvp)(void *data, void *shader_data,
|
||||||
const math_matrix_4x4 *mat);
|
const math_matrix_4x4 *mat);
|
||||||
unsigned (*get_prev_textures)(void *data);
|
unsigned (*get_prev_textures)(void *data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user