Results 1 to 2 of 2

Thread: Simple problem

  1. #1
    Member Newbie
    Join Date
    Jan 2011
    Location
    Australia, Western Australia
    Posts
    37

    Simple problem

    I don't know what the problem is... So here's the code

    Code :
    #include <stdlib.h>
    #include <gl\glut.h>
    #include <gl\GL.h>
     
    void glCross (void)
    {
    	glClearColor(1, 1, 1, 1);
    	glClear(GL_COLOR_BUFFER_BIT);
    	glBegin(GL_POLYGON);
    		glColor3f(0, 1, 0);
    		glVertex2f(0.0, 200.0);
    		glVertex2f(400.0, 200.0);
    		glVertex2f(200.0, 0.0);
    		glVertex2f(200.0, 400.0);
    	glEnd();
     
    	glFlush();
    }
     
    void main(int argc, char **argv)
    {
    	glutInit(&amp;argc, argv);
    	glutInitWindowPosition(500,500);
    	glutInitWindowSize(800,600);
    	glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
    	glutCreateWindow("Cross");
    	glutDisplayFunc(glCross);
    	glutMainLoop();
    }

  2. #2
    Member Newbie
    Join Date
    Jan 2011
    Location
    Australia, Western Australia
    Posts
    37

    Re: Simple problem

    Solven... i failed with the Vertex positioning.

Similar Threads

  1. very simple texture problem
    By appdeveloper in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-12-2009, 07:25 AM
  2. Simple problem
    By starman in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-04-2007, 11:21 PM
  3. simple problem i cant fix
    By stichedleg in forum OpenGL: Windows
    Replies: 2
    Last Post: 12-12-2004, 12:23 PM
  4. a simple problem
    By thunder2001 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-31-2004, 03:41 PM
  5. a simple but strange problem
    By Nil_z in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-21-2003, 09:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean