17 #if defined( _MSC_VER )
18 # pragma warning( disable : 4127 )
19 #elif defined( __GNUC__ )
33 float fov = glm::radians( 45.0f );
36 fov *=
static_cast<float>( extent.
height ) /
static_cast<float>( extent.
width );
39 glm::mat4x4 model = glm::mat4x4( 1.0f );
40 glm::mat4x4 view = glm::lookAt( glm::vec3( -5.0f, 3.0f, -10.0f ), glm::vec3( 0.0f, 0.0f, 0.0f ), glm::vec3( 0.0f, -1.0f, 0.0f ) );
41 glm::mat4x4 projection = glm::perspective( fov, 1.0f, 0.1f, 100.0f );
43 glm::mat4x4 clip = glm::mat4x4( 1.0f, 0.0f, 0.0f, 0.0f,
44 0.0f, -1.0f, 0.0f, 0.0f,
45 0.0f, 0.0f, 0.5f, 0.0f,
46 0.0f, 0.0f, 0.5f, 1.0f );
48 return clip * projection * view * model;
glm::mat4x4 createModelViewProjectionClipMatrix(vk::Extent2D const &extent)