mirror of
https://github.com/yawut/SDL.git
synced 2026-07-17 01:46:33 -05:00
wiiu/render: Fix projection matrix for render targets
This commit is contained in:
parent
a63e0d188d
commit
2b0fd8fa1c
|
|
@ -98,6 +98,7 @@ SDL_Renderer *WIIU_SDL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
data->drawState.blendMode = SDL_BLENDMODE_INVALID;
|
||||
data->drawState.shader = SHADER_INVALID;
|
||||
data->drawState.projectionMatrix[3][0] = -1.0f;
|
||||
data->drawState.projectionMatrix[3][1] = 1.0f;
|
||||
data->drawState.projectionMatrix[3][3] = 1.0f;
|
||||
|
||||
/* Make a texture for the window */
|
||||
|
|
|
|||
|
|
@ -279,8 +279,7 @@ static int WIIU_SDL_SetDrawState(WIIU_RenderData * data, const SDL_RenderCommand
|
|||
|
||||
if (viewport->w && viewport->h) {
|
||||
data->drawState.projectionMatrix[0][0] = 2.0f / viewport->w;
|
||||
data->drawState.projectionMatrix[1][1] = (data->drawState.target ? 2.0f : -2.0f) / viewport->h;
|
||||
data->drawState.projectionMatrix[3][1] = data->drawState.target ? -1.0f : 1.0f;
|
||||
data->drawState.projectionMatrix[1][1] = -2.0f / viewport->h;
|
||||
matrixUpdated = SDL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user