Changeset 5ab1b20 in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Nov 18, 2019, 9:41:39 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
15104a8
Parents:
5a0242e
Message:

Make VulkanGame use the same projection matrix as the original OpenGL game

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r5a0242e r5ab1b20  
    10051005   ubo.model = rotate(mat4(1.0f), time * radians(90.0f), vec3(0.0f, 0.0f, 1.0f));
    10061006   ubo.view = lookAt(vec3(0.0f, 2.0f, 2.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 1.0f, 0.0f));
    1007    ubo.proj = perspective(radians(45.0f), swapChainExtent.width / (float)swapChainExtent.height, 0.1f, 10.0f);
     1007   ubo.proj = perspective(radians(FOV_ANGLE), (float)swapChainExtent.width / (float)swapChainExtent.height, NEAR_CLIP, FAR_CLIP);
    10081008   ubo.proj[1][1] *= -1; // flip the y-axis so that +y is up
    10091009
Note: See TracChangeset for help on using the changeset viewer.