Results 1 to 5 of 5

Thread: Noob has problem

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2009
    Posts
    2

    Noob has problem

    Hi,

    can someone tell me whats wrong with this exampleprogram? does not compile with dev c++ 4.992. Shows just a simple line




    #include <GL/glut.h>
    #include <windows.h>
    #include <stdlib.h>

    void init(void){

    glClearColor(1.0, 1.0, 1.0, 0.0);

    glMatrixMode(GL_PROJECTION);
    gluOrtho2D(0.0, 200.0, 0.0, 150.0);
    }
    void display(void){

    glClear(GL_COLOR_BUFFER_BIT);

    glColor3f(1.0, 0.0, 0.0);
    glBegin(GL_LINES);
    glVertex2i(180, 15);
    glVertex2i(10, 145);
    glEnd();
    glFlush();
    }

    int main(int argc, char** argv)
    {
    glutInit(&amp;argc, argv);
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
    glutInitWindowPostition(50, 100);
    glutInitWindowSize(400, 300);
    glutCreateWindow(argv[0]);
    init();
    glutDisplayFunc(display);
    glutMainLoop();
    return 0;
    }

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Noob has problem

    Show compiler output.

  3. #3
    Member Newbie
    Join Date
    May 2009
    Location
    Portugal
    Posts
    45

    Re: Noob has problem

    Quote Originally Posted by Kremsn
    #include <GL/glut.h>
    #include <windows.h>
    #include <stdlib.h>
    Instead:
    Code :
    #include <windows.h>
    #include <stdlib.h>
    #include <GL/glut.h>

    Quote Originally Posted by Kremsn
    glutInitWindowPostition(50, 100);
    I'm not going to tell what is wrong with this ;p
    "If you can't be a good example, you'll have to serve as a good warning..."

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2009
    Posts
    2

    Re: Noob has problem

    O dear, i must be blind

  5. #5
    Member Newbie
    Join Date
    May 2009
    Location
    Portugal
    Posts
    45

    Re: Noob has problem

    That's what I thought
    "If you can't be a good example, you'll have to serve as a good warning..."

Similar Threads

  1. Noob has a problem with really simple OpenGL example
    By BB_John in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-22-2012, 07:27 AM
  2. noob scene cliping problem
    By arctbl in forum OpenGL: User Software
    Replies: 0
    Last Post: 02-23-2009, 01:18 PM
  3. clearly, i'm a noob
    By homer_simpson0 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-16-2009, 10:30 AM
  4. Help a NOOB please!!
    By in forum OpenGL: User Software
    Replies: 3
    Last Post: 04-25-2004, 05:54 AM
  5. Noob needs help with SDL.
    By hayesj in forum OpenGL: Linux
    Replies: 7
    Last Post: 09-06-2001, 08:51 PM

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