glTranslate * (), glScale * () and glRotate * ().
I tried:
#include <gl\gl.h>
#include <gl\glut.h>
void display(void)
{
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.0f,0.0f,1.0f);
glBegin(GL_QUADS);
glVertex2i(100,150);
glVertex2i(100,100);
glVertex2i(150,100);
glVertex2i(150,150);
glEnd();
glFlush();
}
void init(void)
{
glClearColor(0.0, 0.0, 0.0, 1.0);
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500, 500);
glutInitWindowPosition(100, 100);
glutCreateWindow("Window");
glutDisplayFunc(display);
init();
glutMainLoop();
return 0;
}
But it does not appear square :confused:


Sign In
Create Account


Back to top









