Add ortho projection

This commit is contained in:
jrkb 2023-04-12 15:47:22 +02:00
parent b048298bcc
commit 962e52502b

View file

@ -20,6 +20,9 @@ class GPUFontAtlasLayerCombo : public AtlasLayerCombo {
glm::mat4 getProjectionMatrix(float aspect){
return glm::perspective( /* fovy = */ glm::radians(60.0f), aspect, 0.002f, 12.000f);
}
glm::mat4 getOrthoProjectionMatrix(float w, float h){
return glm::ortho(-(w * 0.5f), (w * 0.5f), -(h * 0.5f), (h * 0.5f), 0.002f, 12.000f);
}
glm::mat4 getViewMatrix(){
auto translation = glm::translate(position);