Add ortho projection
This commit is contained in:
parent
b048298bcc
commit
962e52502b
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue