Fix fake driver projection;

This commit is contained in:
bjorn 2018-08-29 17:06:44 -07:00
parent 4215ea2e24
commit 0dbdc78c87
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ static void fakeRenderTo(void (*callback)(void*), void* userdata) {
int width, height;
fakeGetDisplayDimensions(&width, &height);
Camera camera = { .canvas = NULL };
mat4_perspective(camera.projection[0], state.clipNear, state.clipFar, 67 * M_PI / 180., (float) width / height);
mat4_perspective(camera.projection[0], state.clipNear, state.clipFar, 67 * M_PI / 180., (float) width / 2 / height);
mat4_identity(camera.viewMatrix[0]);
mat4_translate(camera.viewMatrix[0], 0, state.offset, 0);
mat4_multiply(camera.viewMatrix[0], state.transform);