mirror of
https://github.com/yawut/SDL.git
synced 2026-09-11 10:36:27 -05:00
wiiu/render: Fix projection matrix
This commit is contained in:
committed by
Dave Murphy
parent
6cee733415
commit
5b526cc458
@@ -98,7 +98,6 @@ 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 */
|
||||
|
||||
@@ -274,7 +274,8 @@ 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] = 2.0f / viewport->h;
|
||||
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;
|
||||
matrixUpdated = SDL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user