mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Rendering improvements
- Improve performance for unbatched rendering - Support direct texture access
This commit is contained in:
parent
23db5381a3
commit
ddfe7200e2
@ -148,9 +148,7 @@ void
|
|||||||
StartDrawing(SDL_Renderer *renderer)
|
StartDrawing(SDL_Renderer *renderer)
|
||||||
{
|
{
|
||||||
VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
|
VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
|
||||||
if(data->drawing)
|
if (data->drawing) {
|
||||||
{
|
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "uh-oh, already drawing\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -993,9 +991,6 @@ VITA_GXM_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *
|
|||||||
cmd = cmd->next;
|
cmd = cmd->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
sceGxmEndScene(data->gxm_context, NULL, NULL);
|
|
||||||
data->drawing = SDL_FALSE;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1091,6 +1086,11 @@ VITA_GXM_RenderPresent(SDL_Renderer *renderer)
|
|||||||
VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
|
VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
|
||||||
SceCommonDialogUpdateParam updateParam;
|
SceCommonDialogUpdateParam updateParam;
|
||||||
|
|
||||||
|
if(data->drawing) {
|
||||||
|
sceGxmEndScene(data->gxm_context, NULL, NULL);
|
||||||
|
sceGxmFinish(data->gxm_context);
|
||||||
|
}
|
||||||
|
|
||||||
data->displayData.address = data->displayBufferData[data->backBufferIndex];
|
data->displayData.address = data->displayBufferData[data->backBufferIndex];
|
||||||
|
|
||||||
SDL_memset(&updateParam, 0, sizeof(updateParam));
|
SDL_memset(&updateParam, 0, sizeof(updateParam));
|
||||||
|
Loading…
Reference in New Issue
Block a user