c++ - OpenGL 3.3 Projection Matrix Error -


i trying tutorial on opengl 3.3 presented : http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/

it says projection matrix can created glm :

glm::mat4 projection = glm::perspective(45.0, 4.0/3.0, .1, 100.0 ); 

however, try compile code, it, following error:

 error: conversion ‘glm::detail::tmat4x4<double>’ non-scalar type ‘glm::core::type::mat4 {aka glm::detail::tmat4x4<float>}’ requested make: *** [src/main.o] error 1 

what wrong?

you passing double try passing float arguments instead.

glm::mat4 projection = glm::perspective(45.0f, 4.0f/3.0f, .1f, 100.0f ); 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -