32 #include <seq/sequel.h>
44 virtual void draw( co::Object* frameData );
53 typedef lunchbox::RefPtr< Application > ApplicationPtr;
56 int main(
const int argc,
char** argv )
60 if( app->init( argc, argv, 0 ) && app->run( 0 ) && app->exit( ))
71 const float lightPos[] = { 0.0f, 0.0f, 1.0f, 0.0f };
72 glLightfv( GL_LIGHT0, GL_POSITION, lightPos );
74 const float lightAmbient[] = { 0.2f, 0.2f, 0.2f, 1.0f };
75 glLightfv( GL_LIGHT0, GL_AMBIENT, lightAmbient );
80 for(
int i = 0; i < 6; i++ )
82 glColor3f( (i&1) ? 0.5f:1.0f, (i&2) ? 1.0f:0.5f, (i&4) ? 1.0f:0.5f );
84 glNormal3f( 0.0f, 0.0f, 1.0f );
85 glBegin( GL_TRIANGLE_STRIP );
86 glVertex3f( .7f, .7f, -1.0f );
87 glVertex3f( -.7f, .7f, -1.0f );
88 glVertex3f( .7f, -.7f, -1.0f );
89 glVertex3f( -.7f, -.7f, -1.0f );
93 glRotatef( 90.0f, 0.0f, 1.0f, 0.0f );
95 glRotatef( 90.0f, 1.0f, 0.0f, 0.0f );
97 glRotatef( 180.0f, 1.0f, 0.0f, 0.0f );
The main application object.
virtual void draw(co::Object *frameData)
The rendering routine, a.k.a., glutDisplayFunc()
virtual ~Application()
Destruct this application instance.
virtual void applyModelMatrix()
Apply the current model matrix to OpenGL.
virtual ~Renderer()
Destruct this renderer.
virtual void applyRenderContext()
Apply the current rendering parameters to OpenGL.
virtual seq::Renderer * createRenderer()
Create a new renderer instance.