Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SceneSimpleQuad.cpp
1 #include <GLviewer/Scenes/SceneSimpleQuad.hh>
2 
3 #include <Gui/biasgl.h>
4 
5 using namespace BIAS;
6 
8 Draw()
9 {
10  float red[4] = {1.0, 0.0, 0.0, 1.0};
11  float white[4] = {1.0, 1.0, 1.0, 1.0};
12  float black[4] = {0.0, 0.0, 0.0, 1.0};
13  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, black);
14  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, red);
15  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, white);
16 
17  glColor3f(1.0, 0.0, 0.0);
18  glBegin(GL_QUADS);
19  glNormal3f(0.0, 0.0, 1.0);
20  glVertex3f(-1.0, -1.0, 0.0);
21 
22  //glNormal3f(0.0, 0.0, 1.0);
23  glVertex3f(1.0, -1.0, 0.0);
24 
25  //glNormal3f(0.0, 0.0, 1.0);
26  glVertex3f(1.0, 1.0, 0.0);
27 
28  //glNormal3f(0.0, 0.0, 1.0);
29  glVertex3f(-1.0, 1.0, 0.0);
30  glEnd();
31 }
virtual void Draw()
To do anything usefull, overload this method, assume context is ready and draw.