OpenGLRenderer.cpp
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @file OpenGLRenderer.cpp 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 OpenGL preview renderer 00009 <!-------------------------------------------------------------------->**/ 00010 00011 #include "OpenGLRenderer.h" 00012 #include <Camera.h> 00013 #include <Scene.h> 00014 #include <GL/gl.h> 00015 00016 void OpenGLRenderer::render() { 00017 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 00018 00019 glMatrixMode(GL_PROJECTION); 00020 real_t proj[16]; 00021 00022 ASSERT(m_camera); 00023 m_camera->fillGLMatrix(proj); 00024 glLoadMatrixreal_t(proj); 00025 00026 glMatrixMode(GL_MODELVIEW); 00027 ASSERT(m_scene); 00028 m_scene->preview(); 00029 } 00030
Generated on 28 Feb 2009 for Milton by
1.5.6