diff --git a/gfx/drivers/gl_common.c b/gfx/drivers/gl_common.c index 3588c89e83..2906ddfee3 100644 --- a/gfx/drivers/gl_common.c +++ b/gfx/drivers/gl_common.c @@ -19,7 +19,7 @@ void gl_ff_vertex(const void *data) { #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. */ glClientActiveTexture(GL_TEXTURE1); @@ -173,7 +173,7 @@ static INLINE bool realloc_checked(void **ptr, size_t size) 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; count = min(count, coords->vertices); diff --git a/gfx/drivers/gl_common.h b/gfx/drivers/gl_common.h index e968c731d3..12767569bd 100644 --- a/gfx/drivers/gl_common.h +++ b/gfx/drivers/gl_common.h @@ -190,37 +190,37 @@ struct gl_fbo_rect struct gl_ortho { - GLfloat left; - GLfloat right; - GLfloat bottom; - GLfloat top; - GLfloat znear; - GLfloat zfar; + float left; + float right; + float bottom; + float top; + float znear; + float zfar; }; struct gl_tex_info { GLuint tex; - GLfloat input_size[2]; - GLfloat tex_size[2]; - GLfloat coord[8]; + float input_size[2]; + float tex_size[2]; + float coord[8]; }; -typedef struct gl_coords +typedef struct gfx_coords { - const GLfloat *vertex; - const GLfloat *color; - const GLfloat *tex_coord; - const GLfloat *lut_tex_coord; + const float *vertex; + const float *color; + const float *tex_coord; + const float *lut_tex_coord; unsigned vertices; -} gl_coords_t; +} gfx_coords_t; typedef struct gl_mut_coords { - GLfloat *vertex; - GLfloat *color; - GLfloat *tex_coord; - GLfloat *lut_tex_coord; + float *vertex; + float *color; + float *tex_coord; + float *lut_tex_coord; unsigned vertices; } gl_mut_coords_t; @@ -294,9 +294,9 @@ typedef struct gl unsigned tex_w, tex_h; math_matrix_4x4 mvp, mvp_no_rot; - struct gl_coords coords; - const GLfloat *vertex_ptr; - const GLfloat *white_color_ptr; + struct gfx_coords coords; + const float *vertex_ptr; + const float *white_color_ptr; GLuint pbo; @@ -319,9 +319,9 @@ typedef struct gl bool overlay_enable; bool overlay_full_screen; GLuint *overlay_tex; - GLfloat *overlay_vertex_coord; - GLfloat *overlay_tex_coord; - GLfloat *overlay_color_coord; + float *overlay_vertex_coord; + float *overlay_tex_coord; + float *overlay_color_coord; #endif #ifdef HAVE_GL_ASYNC_READBACK @@ -338,7 +338,7 @@ typedef struct gl GLuint menu_texture; bool menu_texture_enable; bool menu_texture_full_screen; - GLfloat menu_texture_alpha; + float menu_texture_alpha; #endif #ifdef HAVE_GL_SYNC @@ -418,7 +418,7 @@ static INLINE unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type) 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_ff_vertex(const void *data); diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index 17b85b05c4..d8bc354d2a 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -161,7 +161,7 @@ static int gl_get_message_width(void *data, const char *msg, unsigned msg_len_fu 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) return; @@ -180,11 +180,11 @@ static void gl_raster_font_render_line( int x, y, delta_x, delta_y; float inv_tex_size_x, inv_tex_size_y, inv_win_width, inv_win_height; unsigned i, msg_len; + struct gfx_coords coords; GLfloat font_tex_coords[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_lut_tex_coord[2 * 6 * MAX_MSG_LEN_CHUNK]; - struct gl_coords coords; gl_t *gl = font ? font->gl : NULL; if (!gl) @@ -435,7 +435,7 @@ static void gl_raster_font_flush_block(void *data) if (font && block->carr.coords.vertices) { 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); } } diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index 2fdbd71edf..fc69ba726e 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -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) { - 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(); cg_shader_data_t *cg = (cg_shader_data_t*)driver->video_shader_data; diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index 1101674c85..73a90b1ea9 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -1173,7 +1173,7 @@ static bool gl_glsl_set_coords(const void *data) size_t attribs_size = 0, size = 0; struct glsl_attrib *attr = 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(); glsl_shader_data_t *glsl = (glsl_shader_data_t*)driver->video_shader_data; diff --git a/gfx/drivers_shader/shader_null.c b/gfx/drivers_shader/shader_null.c index 78c2b90680..6f0125e3cb 100644 --- a/gfx/drivers_shader/shader_null.c +++ b/gfx/drivers_shader/shader_null.c @@ -68,7 +68,7 @@ static bool shader_null_set_coords(const void *data) gl_t *gl = (gl_t*)video_driver_get_ptr(NULL); 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); } #endif diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index dd9b14330c..d4c39eb3f0 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -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) { unsigned width, height; - struct gl_coords coords; + struct gfx_coords coords; GLfloat color[16], tex_coord[8], vertex[8]; menu_handle_t *menu = menu_driver_get_ptr(); glui_handle_t *glui = (glui_handle_t*)menu->userdata; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index aee4ff7393..ebb0d99620 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -342,7 +342,7 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb, GLuint texture, float x, float y, float alpha, float rotation, float scale_factor) { - struct gl_coords coords; + struct gfx_coords coords; unsigned width, height; GLfloat color[16]; 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, float alpha, float rotation, float scale_factor) { - struct gl_coords coords; + struct gfx_coords coords; unsigned width, height; 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) { - struct gl_coords coords; + struct gfx_coords coords; unsigned width, height; float x, y; 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) { unsigned width, height; - struct gl_coords coords; + struct gfx_coords coords; math_matrix_4x4 mymat, mrot; GLfloat color[16]; diff --git a/menu/menu_video.c b/menu/menu_video.c index b3861561b8..1b9a715182 100644 --- a/menu/menu_video.c +++ b/menu/menu_video.c @@ -23,7 +23,7 @@ #ifdef HAVE_OPENGL void menu_video_draw_frame( const shader_backend_t *shader, - struct gl_coords *coords, + struct gfx_coords *coords, math_matrix_4x4 *mat, bool blend, GLuint texture @@ -54,7 +54,7 @@ void menu_video_frame_background( float alpha, bool force_transparency) { - struct gl_coords coords; + struct gfx_coords coords; GLfloat color[16], black_color[16], vertex[8], tex_coord[8]; diff --git a/menu/menu_video.h b/menu/menu_video.h index dbae57518c..270e5f8056 100644 --- a/menu/menu_video.h +++ b/menu/menu_video.h @@ -28,7 +28,7 @@ extern "C" { void menu_video_draw_frame( const shader_backend_t *shader, - struct gl_coords *coords, + struct gfx_coords *coords, math_matrix_4x4 *mat, bool blend, GLuint texture