Audio module, simple text rendering
This commit is contained in:
@@ -37,7 +37,10 @@ void Camera::rotate(float x, float y, float z){
|
||||
|
||||
mat4 Camera::getProjection(){
|
||||
float aspect = (float)Window::width / (float)Window::height;
|
||||
return glm::perspective(fov*zoom, aspect, 0.05f, 1500.0f);
|
||||
if (perspective)
|
||||
return glm::perspective(fov*zoom, aspect, 0.05f, 1500.0f);
|
||||
else
|
||||
return glm::ortho(0.0f, fov*aspect, 0.0f, fov);
|
||||
}
|
||||
|
||||
mat4 Camera::getView(){
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
float fov;
|
||||
float zoom;
|
||||
mat4 rotation;
|
||||
bool perspective = true;
|
||||
Camera(vec3 position, float fov);
|
||||
|
||||
void rotate(float x, float y, float z);
|
||||
|
||||
Reference in New Issue
Block a user