psp: draw lines with RenderGeometry, same as with the other renderers.
parent
9cb2c549fa
commit
6d3b5d66cd
|
@ -1120,23 +1120,8 @@ PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SDL_RENDERCMD_DRAW_LINES: {
|
case SDL_RENDERCMD_DRAW_LINES: /* unused */
|
||||||
const size_t count = cmd->data.draw.count;
|
|
||||||
const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
|
|
||||||
const Uint8 r = cmd->data.draw.r;
|
|
||||||
const Uint8 g = cmd->data.draw.g;
|
|
||||||
const Uint8 b = cmd->data.draw.b;
|
|
||||||
const Uint8 a = cmd->data.draw.a;
|
|
||||||
PSP_BlendState state = {
|
|
||||||
.color = GU_RGBA(r,g,b,a),
|
|
||||||
.texture = NULL,
|
|
||||||
.mode = cmd->data.draw.blend,
|
|
||||||
.shadeModel = GU_FLAT
|
|
||||||
};
|
|
||||||
PSP_SetBlendState(data, &state);
|
|
||||||
sceGuDrawArray(GU_LINE_STRIP, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, verts);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case SDL_RENDERCMD_FILL_RECTS: {
|
case SDL_RENDERCMD_FILL_RECTS: {
|
||||||
const size_t count = cmd->data.draw.count;
|
const size_t count = cmd->data.draw.count;
|
||||||
|
@ -1339,7 +1324,6 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
renderer->QueueSetViewport = PSP_QueueSetViewport;
|
renderer->QueueSetViewport = PSP_QueueSetViewport;
|
||||||
renderer->QueueSetDrawColor = PSP_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */
|
renderer->QueueSetDrawColor = PSP_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */
|
||||||
renderer->QueueDrawPoints = PSP_QueueDrawPoints;
|
renderer->QueueDrawPoints = PSP_QueueDrawPoints;
|
||||||
renderer->QueueDrawLines = PSP_QueueDrawPoints; /* lines and points queue vertices the same way. */
|
|
||||||
renderer->QueueGeometry = PSP_QueueGeometry;
|
renderer->QueueGeometry = PSP_QueueGeometry;
|
||||||
renderer->QueueFillRects = PSP_QueueFillRects;
|
renderer->QueueFillRects = PSP_QueueFillRects;
|
||||||
renderer->QueueCopy = PSP_QueueCopy;
|
renderer->QueueCopy = PSP_QueueCopy;
|
||||||
|
|
Loading…
Reference in New Issue