I am working with some larger vertice values which I have parsed from a DAE file. E.g :
{-79.6536, -2230.43, -213.8},{-79.6536, 2377.36, -213.8},{79.6536, 2377.36, -213.8},{79.6536, -2230.43, -213.8},{-79.6536, -2230.43, 958.953},{79.6536, -2230.43, 958.953},{79.6536, 2377.36, 958.953},{-79.6536, 2377.36, 958.953},...
My question is what changes do I need to make to the setting up of my viewport in order to accomodate these larger vertices ? I currently have the following :
- (void)setupView
{
// Set up the window that we will view the scene through
glViewport(0, 0, backingWidth, backingHeight);
// switch to the projection matrix and setup our 'camera lens'
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrthof(-1.0f, 1.0f, -1.5f, 1.5f, -1.0f, 1.0f);
// switch to model mode and set our background color
glMatrixMode(GL_MODELVIEW);
glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
}
However when I run the code, I just get a screen filled with white – I presume because my object is zoomed in to an extreme degree.
Thanks for any advice in advance.
Use
glScalef(max_s, max_s, max_s);Where