25 lines
439 B
C++
25 lines
439 B
C++
#pragma once
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include "typedefs.hpp"
|
|
|
|
class Viewport {
|
|
uint width;
|
|
uint height;
|
|
public:
|
|
Viewport(uint width, uint height);
|
|
Viewport(const glm::ivec2& size);
|
|
|
|
virtual uint getWidth() const;
|
|
virtual uint getHeight() const;
|
|
|
|
glm::ivec2 size() const {
|
|
return glm::ivec2(width, height);
|
|
}
|
|
|
|
float getRatio() const {
|
|
return width / static_cast<float>(height);
|
|
}
|
|
};
|