Here is my code :
#include <SFML\Graphics.hpp>
#include <SFML\OpenGL.hpp>
GLfloat rquad;
void Draw() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glShadeModel(GL_SMOOTH);
glLoadIdentity(); // Reset The Current Modelview Matrix
glPushMatrix();
glRotatef(rquad,0.0,1.0,0);
glBegin(GL_QUADS);
glColor3f(2.0, 0.0, 0.0); //
glVertex3f(0.30, 0.30, 0.0);
glVertex3f(0.30, 0.70, 0.0);
glVertex3f(0.70, 0.70, 0.0);
glVertex3f(0.70, 0.30, 0.0);
glColor3f(255.0, 0.0, 0.0); //
glVertex3f(0.70, 0.30, 0.3);
glVertex3f(0.70, 0.70, 0.3);
glVertex3f(0.70, 0.70, 0.0);
glVertex3f(0.70, 0.30, 0.0);
glColor3f(0.0, 255.0, 0.0); //
glVertex3f(0.30, 0.70, 0.3);
glVertex3f(0.30, 0.30, 0.3);
glVertex3f(0.70, 0.30, 0.3);
glVertex3f(0.70, 0.70, 0.3);
glColor3f(0.0, 0.0, 255.0); //
glVertex3f(0.30, 0.70, 0.0);
glVertex3f(0.30, 0.30, 0.0);
glVertex3f(0.30, 0.30, 0.3);
glVertex3f(0.30, 0.70, 0.3);
glColor3f(1.0,1.0,1.0); //
glVertex3f(0.30, 0.70, 0.0);
glVertex3f(0.70, 0.70, 0.0);
glVertex3f(0.30, 0.70, 0.3);
glVertex3f(0.70, 0.70, 0.3);
glVertex3f(0.30, 0.30, 0.0);
glVertex3f(0.70, 0.30, 0.0);
glVertex3f(0.30, 0.30, 0.3);
glVertex3f(0.70, 0.30, 0.3);
glEnd();
glPopMatrix();
rquad+=-0.5;
glFlush();
}
void Initialize() {
glClearColor(0.0, 0.0, 0.0, 0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}
int main(int iArgc, char** cppArgv) {
sf::Window App(sf::VideoMode(800,800,8), "OpengGL Test");
Initialize();
while(App.IsOpened())
{
glClear(GL_COLOR_BUFFER_BIT);
Draw();
App.Display();
}
return 0;
}
Ok Well I have gotten rid of those errors by creating a new project and trying to do all of this again but now window doesnt display. It doesnt pop up at all...
[/code]