Hey, i am having problems setting up frustrum for ogl.. i am able to get it perfectly running if i do this each frame:
but shouldnt i just be able to set the frustrum once and forget about it.. im sure edgelib is messing with the perspective matrix.. i have tried using display->frustrum function but even if i use -1,1 as near and far values in that function, my game still renders.. any idea what im missing here??
and secondly why do i need to do this every frame?? is edgelib modifying the perspective matrix each frame??
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
GLfloat aspectRatio = (GLfloat)(Ecd->dsp->GetWidth()) / (GLfloat)(Ecd->dsp->GetHeight());
glFrustum( FRUSTUM_LEFT * aspectRatio, FRUSTUM_RIGHT * aspectRatio,
FRUSTUM_BOTTOM, FRUSTUM_TOP,
FRUSTUM_NEAR, FRUSTUM_FAR );
// Restore matrix mode
glMatrixMode( GL_MODELVIEW );
but shouldnt i just be able to set the frustrum once and forget about it.. im sure edgelib is messing with the perspective matrix.. i have tried using display->frustrum function but even if i use -1,1 as near and far values in that function, my game still renders.. any idea what im missing here??
and secondly why do i need to do this every frame?? is edgelib modifying the perspective matrix each frame??