mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
Change function signature for set_coords
This commit is contained in:
parent
e48e294009
commit
ef835f93d5
@ -253,9 +253,8 @@ fallback:
|
||||
} \
|
||||
} 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;
|
||||
|
||||
if (!cg_data || !coords)
|
||||
|
@ -1379,7 +1379,7 @@ fallback:
|
||||
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. */
|
||||
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;
|
||||
struct glsl_attrib *attr = 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;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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
|
||||
#ifndef NO_GL_FF_VERTEX
|
||||
if (string_is_equal(video_driver_get_ident(), "gl"))
|
||||
{
|
||||
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
||||
gl_ff_vertex(coords);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return false;
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include <gfx/math/matrix_4x4.h>
|
||||
|
||||
#include "video_coord_array.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
@ -183,7 +185,7 @@ typedef struct shader_backend
|
||||
void (*shader_scale)(void *data,
|
||||
unsigned index, struct gfx_fbo_scale *scale);
|
||||
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,
|
||||
const math_matrix_4x4 *mat);
|
||||
unsigned (*get_prev_textures)(void *data);
|
||||
|
Loading…
Reference in New Issue
Block a user