mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Rename gl_coords to gfx_coords
This commit is contained in:
parent
af752ba24b
commit
527c0c29d4
@ -19,7 +19,7 @@
|
|||||||
void gl_ff_vertex(const void *data)
|
void gl_ff_vertex(const void *data)
|
||||||
{
|
{
|
||||||
#ifndef NO_GL_FF_VERTEX
|
#ifndef NO_GL_FF_VERTEX
|
||||||
const struct gl_coords *coords = (const struct gl_coords*)data;
|
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
||||||
|
|
||||||
/* Fall back to fixed function-style if needed and possible. */
|
/* Fall back to fixed function-style if needed and possible. */
|
||||||
glClientActiveTexture(GL_TEXTURE1);
|
glClientActiveTexture(GL_TEXTURE1);
|
||||||
@ -173,7 +173,7 @@ static INLINE bool realloc_checked(void **ptr, size_t size)
|
|||||||
return *ptr == nptr;
|
return *ptr == nptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gl_coord_array_add(gl_coord_array_t *ca, const gl_coords_t *coords, unsigned count)
|
bool gl_coord_array_add(gl_coord_array_t *ca, const gfx_coords_t *coords, unsigned count)
|
||||||
{
|
{
|
||||||
bool success = false;
|
bool success = false;
|
||||||
count = min(count, coords->vertices);
|
count = min(count, coords->vertices);
|
||||||
|
@ -190,37 +190,37 @@ struct gl_fbo_rect
|
|||||||
|
|
||||||
struct gl_ortho
|
struct gl_ortho
|
||||||
{
|
{
|
||||||
GLfloat left;
|
float left;
|
||||||
GLfloat right;
|
float right;
|
||||||
GLfloat bottom;
|
float bottom;
|
||||||
GLfloat top;
|
float top;
|
||||||
GLfloat znear;
|
float znear;
|
||||||
GLfloat zfar;
|
float zfar;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gl_tex_info
|
struct gl_tex_info
|
||||||
{
|
{
|
||||||
GLuint tex;
|
GLuint tex;
|
||||||
GLfloat input_size[2];
|
float input_size[2];
|
||||||
GLfloat tex_size[2];
|
float tex_size[2];
|
||||||
GLfloat coord[8];
|
float coord[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct gl_coords
|
typedef struct gfx_coords
|
||||||
{
|
{
|
||||||
const GLfloat *vertex;
|
const float *vertex;
|
||||||
const GLfloat *color;
|
const float *color;
|
||||||
const GLfloat *tex_coord;
|
const float *tex_coord;
|
||||||
const GLfloat *lut_tex_coord;
|
const float *lut_tex_coord;
|
||||||
unsigned vertices;
|
unsigned vertices;
|
||||||
} gl_coords_t;
|
} gfx_coords_t;
|
||||||
|
|
||||||
typedef struct gl_mut_coords
|
typedef struct gl_mut_coords
|
||||||
{
|
{
|
||||||
GLfloat *vertex;
|
float *vertex;
|
||||||
GLfloat *color;
|
float *color;
|
||||||
GLfloat *tex_coord;
|
float *tex_coord;
|
||||||
GLfloat *lut_tex_coord;
|
float *lut_tex_coord;
|
||||||
unsigned vertices;
|
unsigned vertices;
|
||||||
} gl_mut_coords_t;
|
} gl_mut_coords_t;
|
||||||
|
|
||||||
@ -294,9 +294,9 @@ typedef struct gl
|
|||||||
unsigned tex_w, tex_h;
|
unsigned tex_w, tex_h;
|
||||||
math_matrix_4x4 mvp, mvp_no_rot;
|
math_matrix_4x4 mvp, mvp_no_rot;
|
||||||
|
|
||||||
struct gl_coords coords;
|
struct gfx_coords coords;
|
||||||
const GLfloat *vertex_ptr;
|
const float *vertex_ptr;
|
||||||
const GLfloat *white_color_ptr;
|
const float *white_color_ptr;
|
||||||
|
|
||||||
GLuint pbo;
|
GLuint pbo;
|
||||||
|
|
||||||
@ -319,9 +319,9 @@ typedef struct gl
|
|||||||
bool overlay_enable;
|
bool overlay_enable;
|
||||||
bool overlay_full_screen;
|
bool overlay_full_screen;
|
||||||
GLuint *overlay_tex;
|
GLuint *overlay_tex;
|
||||||
GLfloat *overlay_vertex_coord;
|
float *overlay_vertex_coord;
|
||||||
GLfloat *overlay_tex_coord;
|
float *overlay_tex_coord;
|
||||||
GLfloat *overlay_color_coord;
|
float *overlay_color_coord;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GL_ASYNC_READBACK
|
#ifdef HAVE_GL_ASYNC_READBACK
|
||||||
@ -338,7 +338,7 @@ typedef struct gl
|
|||||||
GLuint menu_texture;
|
GLuint menu_texture;
|
||||||
bool menu_texture_enable;
|
bool menu_texture_enable;
|
||||||
bool menu_texture_full_screen;
|
bool menu_texture_full_screen;
|
||||||
GLfloat menu_texture_alpha;
|
float menu_texture_alpha;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GL_SYNC
|
#ifdef HAVE_GL_SYNC
|
||||||
@ -418,7 +418,7 @@ static INLINE unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gl_coord_array_add(gl_coord_array_t *ca, const gl_coords_t *coords, unsigned count);
|
bool gl_coord_array_add(gl_coord_array_t *ca, const gfx_coords_t *coords, unsigned count);
|
||||||
void gl_coord_array_free(gl_coord_array_t *ca);
|
void gl_coord_array_free(gl_coord_array_t *ca);
|
||||||
|
|
||||||
void gl_ff_vertex(const void *data);
|
void gl_ff_vertex(const void *data);
|
||||||
|
@ -161,7 +161,7 @@ static int gl_get_message_width(void *data, const char *msg, unsigned msg_len_fu
|
|||||||
return delta_x * scale;
|
return delta_x * scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl_raster_font_draw_vertices(gl_t *gl, const gl_coords_t *coords)
|
static void gl_raster_font_draw_vertices(gl_t *gl, const gfx_coords_t *coords)
|
||||||
{
|
{
|
||||||
if (!gl)
|
if (!gl)
|
||||||
return;
|
return;
|
||||||
@ -180,11 +180,11 @@ static void gl_raster_font_render_line(
|
|||||||
int x, y, delta_x, delta_y;
|
int x, y, delta_x, delta_y;
|
||||||
float inv_tex_size_x, inv_tex_size_y, inv_win_width, inv_win_height;
|
float inv_tex_size_x, inv_tex_size_y, inv_win_width, inv_win_height;
|
||||||
unsigned i, msg_len;
|
unsigned i, msg_len;
|
||||||
|
struct gfx_coords coords;
|
||||||
GLfloat font_tex_coords[2 * 6 * MAX_MSG_LEN_CHUNK];
|
GLfloat font_tex_coords[2 * 6 * MAX_MSG_LEN_CHUNK];
|
||||||
GLfloat font_vertex[2 * 6 * MAX_MSG_LEN_CHUNK];
|
GLfloat font_vertex[2 * 6 * MAX_MSG_LEN_CHUNK];
|
||||||
GLfloat font_color[4 * 6 * MAX_MSG_LEN_CHUNK];
|
GLfloat font_color[4 * 6 * MAX_MSG_LEN_CHUNK];
|
||||||
GLfloat font_lut_tex_coord[2 * 6 * MAX_MSG_LEN_CHUNK];
|
GLfloat font_lut_tex_coord[2 * 6 * MAX_MSG_LEN_CHUNK];
|
||||||
struct gl_coords coords;
|
|
||||||
gl_t *gl = font ? font->gl : NULL;
|
gl_t *gl = font ? font->gl : NULL;
|
||||||
|
|
||||||
if (!gl)
|
if (!gl)
|
||||||
@ -435,7 +435,7 @@ static void gl_raster_font_flush_block(void *data)
|
|||||||
if (font && block->carr.coords.vertices)
|
if (font && block->carr.coords.vertices)
|
||||||
{
|
{
|
||||||
gl_raster_font_setup_viewport(font, block->fullscreen);
|
gl_raster_font_setup_viewport(font, block->fullscreen);
|
||||||
gl_raster_font_draw_vertices(font->gl, (gl_coords_t*)&block->carr.coords);
|
gl_raster_font_draw_vertices(font->gl, (gfx_coords_t*)&block->carr.coords);
|
||||||
gl_raster_font_restore_viewport(font->gl);
|
gl_raster_font_restore_viewport(font->gl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ static bool gl_cg_set_mvp(void *data, const math_matrix_4x4 *mat)
|
|||||||
|
|
||||||
static bool gl_cg_set_coords(const void *data)
|
static bool gl_cg_set_coords(const void *data)
|
||||||
{
|
{
|
||||||
const struct gl_coords *coords = (const struct gl_coords*)data;
|
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
cg_shader_data_t *cg = (cg_shader_data_t*)driver->video_shader_data;
|
cg_shader_data_t *cg = (cg_shader_data_t*)driver->video_shader_data;
|
||||||
|
|
||||||
|
@ -1173,7 +1173,7 @@ static bool gl_glsl_set_coords(const void *data)
|
|||||||
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 gl_coords *coords = (const struct gl_coords*)data;
|
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
glsl_shader_data_t *glsl = (glsl_shader_data_t*)driver->video_shader_data;
|
glsl_shader_data_t *glsl = (glsl_shader_data_t*)driver->video_shader_data;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ static bool shader_null_set_coords(const void *data)
|
|||||||
gl_t *gl = (gl_t*)video_driver_get_ptr(NULL);
|
gl_t *gl = (gl_t*)video_driver_get_ptr(NULL);
|
||||||
if (gl)
|
if (gl)
|
||||||
{
|
{
|
||||||
const struct gl_coords *coords = (const struct gl_coords*)data;
|
const struct gfx_coords *coords = (const struct gfx_coords*)data;
|
||||||
gl_ff_vertex(coords);
|
gl_ff_vertex(coords);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -89,7 +89,7 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h,
|
|||||||
float r, float g, float b, float a)
|
float r, float g, float b, float a)
|
||||||
{
|
{
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
struct gl_coords coords;
|
struct gfx_coords coords;
|
||||||
GLfloat color[16], tex_coord[8], vertex[8];
|
GLfloat color[16], tex_coord[8], vertex[8];
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
glui_handle_t *glui = (glui_handle_t*)menu->userdata;
|
glui_handle_t *glui = (glui_handle_t*)menu->userdata;
|
||||||
|
@ -342,7 +342,7 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb,
|
|||||||
GLuint texture, float x, float y,
|
GLuint texture, float x, float y,
|
||||||
float alpha, float rotation, float scale_factor)
|
float alpha, float rotation, float scale_factor)
|
||||||
{
|
{
|
||||||
struct gl_coords coords;
|
struct gfx_coords coords;
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
GLfloat color[16];
|
GLfloat color[16];
|
||||||
math_matrix_4x4 mymat, mrot, mscal;
|
math_matrix_4x4 mymat, mrot, mscal;
|
||||||
@ -401,7 +401,7 @@ static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
|||||||
GLuint texture, float x, float y,
|
GLuint texture, float x, float y,
|
||||||
float alpha, float rotation, float scale_factor)
|
float alpha, float rotation, float scale_factor)
|
||||||
{
|
{
|
||||||
struct gl_coords coords;
|
struct gfx_coords coords;
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
GLfloat color[16];
|
GLfloat color[16];
|
||||||
|
|
||||||
@ -453,7 +453,7 @@ static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
|||||||
|
|
||||||
static void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb)
|
static void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb)
|
||||||
{
|
{
|
||||||
struct gl_coords coords;
|
struct gfx_coords coords;
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
float x, y;
|
float x, y;
|
||||||
math_matrix_4x4 mymat, mrot, mscal;
|
math_matrix_4x4 mymat, mrot, mscal;
|
||||||
@ -1435,7 +1435,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
|||||||
static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb, float x, float y)
|
static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb, float x, float y)
|
||||||
{
|
{
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
struct gl_coords coords;
|
struct gfx_coords coords;
|
||||||
math_matrix_4x4 mymat, mrot;
|
math_matrix_4x4 mymat, mrot;
|
||||||
GLfloat color[16];
|
GLfloat color[16];
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
void menu_video_draw_frame(
|
void menu_video_draw_frame(
|
||||||
const shader_backend_t *shader,
|
const shader_backend_t *shader,
|
||||||
struct gl_coords *coords,
|
struct gfx_coords *coords,
|
||||||
math_matrix_4x4 *mat,
|
math_matrix_4x4 *mat,
|
||||||
bool blend,
|
bool blend,
|
||||||
GLuint texture
|
GLuint texture
|
||||||
@ -54,7 +54,7 @@ void menu_video_frame_background(
|
|||||||
float alpha,
|
float alpha,
|
||||||
bool force_transparency)
|
bool force_transparency)
|
||||||
{
|
{
|
||||||
struct gl_coords coords;
|
struct gfx_coords coords;
|
||||||
GLfloat color[16], black_color[16],
|
GLfloat color[16], black_color[16],
|
||||||
vertex[8], tex_coord[8];
|
vertex[8], tex_coord[8];
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ extern "C" {
|
|||||||
|
|
||||||
void menu_video_draw_frame(
|
void menu_video_draw_frame(
|
||||||
const shader_backend_t *shader,
|
const shader_backend_t *shader,
|
||||||
struct gl_coords *coords,
|
struct gfx_coords *coords,
|
||||||
math_matrix_4x4 *mat,
|
math_matrix_4x4 *mat,
|
||||||
bool blend,
|
bool blend,
|
||||||
GLuint texture
|
GLuint texture
|
||||||
|
Loading…
x
Reference in New Issue
Block a user