I am having some trouble with CEGUI trying to automatically determine the glviewport to render to. I mean, I am able to render but only a portion of my rendering surface gets drawn to by cegui. Can anyone please help me determine how to tell CEGUI to force the size of the viewport it's rendering to?
Thanks much! Sincerely,
John Argentieri
OpenGL Renderer : glViewport
Moderators: CEGUI MVP, CEGUI Team
-
JohnArgentieri
- Just popping in

- Posts: 15
- Joined: Tue Jan 09, 2007 16:14
Hello.
If you see at samples provided with CEGUI lib, there you can find directory [common\src] and here is the file CEGUIOpenGLBaseApplication reshape function
void CEGuiOpenGLBaseApplication::reshape(int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 50.0);
glMatrixMode(GL_MODELVIEW);
CEGUI::OpenGLRenderer* renderer = (CEGUI::OpenGLRenderer*)CEGUI::System::getSingleton().getRenderer();
renderer->setDisplaySize(CEGUI::Size((float)w,(float)h));
}
which is called when you change your window size. So it shoul fix Your problem.
Thank You.
If you see at samples provided with CEGUI lib, there you can find directory [common\src] and here is the file CEGUIOpenGLBaseApplication reshape function
void CEGuiOpenGLBaseApplication::reshape(int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluPerspective(60.0, (GLfloat) w/(GLfloat) h, 1.0, 50.0);
glMatrixMode(GL_MODELVIEW);
CEGUI::OpenGLRenderer* renderer = (CEGUI::OpenGLRenderer*)CEGUI::System::getSingleton().getRenderer();
renderer->setDisplaySize(CEGUI::Size((float)w,(float)h));
}
which is called when you change your window size. So it shoul fix Your problem.
Thank You.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 15 guests