mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
(Vita) Add new function to draw textured arrays of vertices
This commit is contained in:
parent
d52f3ba3e9
commit
9ad874eef8
1
deps/libvita2d/include/vita2d.h
vendored
1
deps/libvita2d/include/vita2d.h
vendored
@ -140,6 +140,7 @@ void vita2d_draw_texture_tint_scale_rotate_hotspot(const vita2d_texture *texture
|
|||||||
void vita2d_draw_texture_tint_scale_rotate(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, unsigned int color);
|
void vita2d_draw_texture_tint_scale_rotate(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, unsigned int color);
|
||||||
void vita2d_draw_texture_part_tint_scale_rotate(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, float rad, unsigned int color);
|
void vita2d_draw_texture_part_tint_scale_rotate(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, float rad, unsigned int color);
|
||||||
void vita2d_draw_array_textured(const vita2d_texture *texture, SceGxmPrimitiveType mode, const vita2d_texture_vertex *vertices, size_t count, unsigned int color);
|
void vita2d_draw_array_textured(const vita2d_texture *texture, SceGxmPrimitiveType mode, const vita2d_texture_vertex *vertices, size_t count, unsigned int color);
|
||||||
|
void vita2d_draw_array_textured_mat(const vita2d_texture *texture, const vita2d_texture_tint_vertex *vertices, size_t count, float *mat);
|
||||||
|
|
||||||
/** ADVANCED **/
|
/** ADVANCED **/
|
||||||
void vita2d_texture_set_wvp(float x, float y, float width, float height);
|
void vita2d_texture_set_wvp(float x, float y, float width, float height);
|
||||||
|
15
deps/libvita2d/source/vita2d_texture.c
vendored
15
deps/libvita2d/source/vita2d_texture.c
vendored
@ -873,3 +873,18 @@ void vita2d_draw_array_textured(const vita2d_texture *texture, SceGxmPrimitiveTy
|
|||||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||||
sceGxmDraw(_vita2d_context, mode, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), count);
|
sceGxmDraw(_vita2d_context, mode, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vita2d_draw_array_textured_mat(const vita2d_texture *texture, const vita2d_texture_tint_vertex *vertices, size_t count, float *mat)
|
||||||
|
{
|
||||||
|
set_texture_tint_program();
|
||||||
|
|
||||||
|
void *vertex_wvp_buffer;
|
||||||
|
sceGxmReserveVertexDefaultUniformBuffer(_vita2d_context, &vertex_wvp_buffer);
|
||||||
|
sceGxmSetUniformDataF(vertex_wvp_buffer, _vita2d_textureWvpParam, 0, 16, mat);
|
||||||
|
|
||||||
|
// Set the texture to the TEXUNIT0
|
||||||
|
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||||
|
|
||||||
|
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||||
|
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), count);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user