Octocad.cpp
// Sets up the drawing viewport so we don't get a weird squished display.
Sets up the drawing viewport so we don't get a weird squished display.
Sets up the drawing viewport so we don ' t get a weird squished display .
void Octocad::SetupViewport()
{
    GLManager *pM = GLManager::GetManager();
    aspect = (float)pM->width/ (float)pM->height;
    proj_matrix = gmtl::setPerspective(proj_matrix, GLManager::FOV_Y, aspect, GLManager::NEAR_PLANE, GLManager::FAR_PLANE);
    glViewport(0, 0, pM->width, pM->height);
}
void Octocad :: SetupViewport ( ) { GLManager * pM = GLManager :: GetManager ( ) ; aspect = ( float ) pM -> width / ( float ) pM -> height ; proj_matrix = gmtl :: setPerspective ( proj_matrix , GLManager :: FOV_Y , aspect , GLManager :: NEAR_PLANE , GLManager :: FAR_PLANE ) ; glViewport ( 0 , 0 , pM -> width , pM -> height ) ; }
Sets up the drawing viewport so we don't get a weird squished display.
Sets up the drawing viewport so we don ' t get a weird squished display .
// Viewing aspect ratio and projection matrix.