Add vertex count variable to menu_display drawing functions
This commit is contained in:
parent
0e7b031d5f
commit
8ecfa76ab9
|
@ -120,7 +120,7 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h,
|
||||||
w,
|
w,
|
||||||
h,
|
h,
|
||||||
gl->shader, &coords,
|
gl->shader, &coords,
|
||||||
&gl->mvp_no_rot, true, glui->textures.white);
|
&gl->mvp_no_rot, true, glui->textures.white, 4);
|
||||||
|
|
||||||
gl->coords.color = gl->white_color_ptr;
|
gl->coords.color = gl->white_color_ptr;
|
||||||
}
|
}
|
||||||
|
@ -450,7 +450,7 @@ static void glui_frame(void)
|
||||||
gl, width, height,
|
gl, width, height,
|
||||||
glui->textures.bg.id, 0.75f, false,
|
glui->textures.bg.id, 0.75f, false,
|
||||||
&coord_color[0], &coord_color2[0],
|
&coord_color[0], &coord_color2[0],
|
||||||
&glui_vertexes[0], &glui_tex_coords[0]);
|
&glui_vertexes[0], &glui_tex_coords[0], 4);
|
||||||
|
|
||||||
menu_entries_get_title(title, sizeof(title));
|
menu_entries_get_title(title, sizeof(title));
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb,
|
||||||
height - y,
|
height - y,
|
||||||
xmb->icon.size,
|
xmb->icon.size,
|
||||||
xmb->icon.size,
|
xmb->icon.size,
|
||||||
gl->shader, &coords, &mymat, false, texture);
|
gl->shader, &coords, &mymat, false, texture, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
||||||
|
@ -417,7 +417,7 @@ static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
||||||
height - y,
|
height - y,
|
||||||
xmb->icon.size,
|
xmb->icon.size,
|
||||||
xmb->icon.size,
|
xmb->icon.size,
|
||||||
gl->shader, &coords, mymat, false, texture);
|
gl->shader, &coords, mymat, false, texture, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb, GRfloat *color, unsigned width, unsigned height)
|
static void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb, GRfloat *color, unsigned width, unsigned height)
|
||||||
|
@ -448,7 +448,7 @@ static void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb, GRfloat *color, unsigne
|
||||||
height - y,
|
height - y,
|
||||||
xmb->boxart_size,
|
xmb->boxart_size,
|
||||||
xmb->boxart_size,
|
xmb->boxart_size,
|
||||||
gl->shader, &coords, &mymat, false, xmb->boxart);
|
gl->shader, &coords, &mymat, false, xmb->boxart, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_draw_text(menu_handle_t *menu,
|
static void xmb_draw_text(menu_handle_t *menu,
|
||||||
|
@ -1435,7 +1435,7 @@ static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb,
|
||||||
height - y,
|
height - y,
|
||||||
xmb->cursor.size,
|
xmb->cursor.size,
|
||||||
xmb->cursor.size,
|
xmb->cursor.size,
|
||||||
gl->shader, &coords, &mymat, true, xmb->textures.list[XMB_TEXTURE_POINTER].id);
|
gl->shader, &coords, &mymat, true, xmb->textures.list[XMB_TEXTURE_POINTER].id, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_render(void)
|
static void xmb_render(void)
|
||||||
|
@ -1603,7 +1603,7 @@ static void xmb_frame(void)
|
||||||
|
|
||||||
menu_display_frame_background(menu, settings,
|
menu_display_frame_background(menu, settings,
|
||||||
gl, width, height, xmb->textures.bg.id, xmb->alpha, false, &coord_color[0],
|
gl, width, height, xmb->textures.bg.id, xmb->alpha, false, &coord_color[0],
|
||||||
&coord_color2[0], &rmb_vertex[0], &rmb_tex_coord[0]);
|
&coord_color2[0], &rmb_vertex[0], &rmb_tex_coord[0], 4);
|
||||||
|
|
||||||
xmb_draw_text(menu, xmb,
|
xmb_draw_text(menu, xmb,
|
||||||
xmb->title_name, xmb->margins.title.left,
|
xmb->title_name, xmb->margins.title.left,
|
||||||
|
@ -1712,7 +1712,7 @@ static void xmb_frame(void)
|
||||||
width, height,
|
width, height,
|
||||||
xmb->textures.bg.id, xmb->alpha, true,
|
xmb->textures.bg.id, xmb->alpha, true,
|
||||||
&coord_color[0], &coord_color2[0],
|
&coord_color[0], &coord_color2[0],
|
||||||
&rmb_vertex[0], &rmb_tex_coord[0]);
|
&rmb_vertex[0], &rmb_tex_coord[0], 4);
|
||||||
xmb_frame_messagebox(msg);
|
xmb_frame_messagebox(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -943,7 +943,7 @@ static void zarch_frame(void)
|
||||||
gl, zui->width, zui->height,
|
gl, zui->width, zui->height,
|
||||||
zui->textures.bg.id, 0.75f, false,
|
zui->textures.bg.id, 0.75f, false,
|
||||||
&coord_color[0], &coord_color2[0],
|
&coord_color[0], &coord_color2[0],
|
||||||
&zarch_vertexes[0], &zarch_tex_coords[0]);
|
&zarch_vertexes[0], &zarch_tex_coords[0], 4);
|
||||||
|
|
||||||
if (gl && gl->shader && gl->shader->use)
|
if (gl && gl->shader && gl->shader->use)
|
||||||
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
|
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
|
||||||
|
|
|
@ -490,7 +490,8 @@ void menu_display_draw_frame(
|
||||||
struct gfx_coords *coords,
|
struct gfx_coords *coords,
|
||||||
math_matrix_4x4 *mat,
|
math_matrix_4x4 *mat,
|
||||||
bool blend,
|
bool blend,
|
||||||
GLuint texture
|
GLuint texture,
|
||||||
|
size_t vertex_count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const shader_backend_t *shader = (const shader_backend_t*)shader_data;
|
const shader_backend_t *shader = (const shader_backend_t*)shader_data;
|
||||||
|
@ -505,7 +506,7 @@ void menu_display_draw_frame(
|
||||||
if (blend)
|
if (blend)
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
glDrawArrays(GL_TRIANGLE_STRIP, 0, vertex_count);
|
||||||
|
|
||||||
if (blend)
|
if (blend)
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
|
@ -523,13 +524,14 @@ void menu_display_frame_background(
|
||||||
GRfloat *coord_color,
|
GRfloat *coord_color,
|
||||||
GRfloat *coord_color2,
|
GRfloat *coord_color2,
|
||||||
const GRfloat *vertex,
|
const GRfloat *vertex,
|
||||||
const GRfloat *tex_coord)
|
const GRfloat *tex_coord,
|
||||||
|
size_t vertex_count)
|
||||||
{
|
{
|
||||||
struct gfx_coords coords;
|
struct gfx_coords coords;
|
||||||
|
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
|
|
||||||
coords.vertices = 4;
|
coords.vertices = vertex_count;
|
||||||
coords.vertex = vertex;
|
coords.vertex = vertex;
|
||||||
coords.tex_coord = tex_coord;
|
coords.tex_coord = tex_coord;
|
||||||
coords.lut_tex_coord = tex_coord;
|
coords.lut_tex_coord = tex_coord;
|
||||||
|
@ -548,7 +550,7 @@ void menu_display_frame_background(
|
||||||
|
|
||||||
menu_display_draw_frame(0, 0, width, height,
|
menu_display_draw_frame(0, 0, width, height,
|
||||||
gl->shader, &coords,
|
gl->shader, &coords,
|
||||||
&gl->mvp_no_rot, true, texture);
|
&gl->mvp_no_rot, true, texture, vertex_count);
|
||||||
|
|
||||||
gl->coords.color = gl->white_color_ptr;
|
gl->coords.color = gl->white_color_ptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,8 @@ void menu_display_draw_frame(
|
||||||
struct gfx_coords *coords,
|
struct gfx_coords *coords,
|
||||||
math_matrix_4x4 *mat,
|
math_matrix_4x4 *mat,
|
||||||
bool blend,
|
bool blend,
|
||||||
GLuint texture
|
GLuint texture,
|
||||||
|
size_t vertex_count
|
||||||
);
|
);
|
||||||
|
|
||||||
void menu_display_frame_background(
|
void menu_display_frame_background(
|
||||||
|
@ -106,7 +107,8 @@ void menu_display_frame_background(
|
||||||
GRfloat *color,
|
GRfloat *color,
|
||||||
GRfloat *color2,
|
GRfloat *color2,
|
||||||
const GRfloat *vertex,
|
const GRfloat *vertex,
|
||||||
const GRfloat *tex_coord);
|
const GRfloat *tex_coord,
|
||||||
|
size_t vertex_count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *menu_video_get_ident(void);
|
const char *menu_video_get_ident(void);
|
||||||
|
|
Loading…
Reference in New Issue