Results 1 to 4 of 4

Thread: Problem on OpenGL programming with VC++

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    2

    Problem on OpenGL programming with VC++

    I am using Visual C++ on Win Me. I tried a simple program like this
    void renderpoly(void){
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0,0.7,0.0);
    glutWireTeapot(50);
    glutSwapBuffers();
    }

    int WinMain .....
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
    glutCreateWindow("Test undergoing");
    glutDisplayFunc(renderpoly);

    glClear is executed but the teaport is not seen, it is simply a blue window. Moreover, I would like to know when glutInitDisplayMode and glutCreateWindow is used, how I can set the window size???
    BTW, thanks a lot

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    477

    Re: Problem on OpenGL programming with VC++

    Have you placed the camera ?

    Try "gluLookAt()".

    Ex : gluLookAt(0,0,2,0,0,0,0,1,0);

  3. #3
    Senior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Slovak Republic( Slovakia )
    Posts
    110

    Re: Problem on OpenGL programming with VC++

    If you beginnig with OpenGL don't use
    the glut.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: Problem on OpenGL programming with VC++

    Originally posted by FoxDie:
    If you beginnig with OpenGL don't use
    the glut.
    GLUT is ideal for beginning and for quick demos. nVidia uses it extensively for their demos. That way you can concentrate on OpenGL and not on Win32 or MFC programming. aphlai, the function you're looking for is glutInitWindowSize(int width, int height). You should be able to find some online documentation for GLUT somewhere (maybe search the discussion board for links). Otherwise, look at glut.h - it's fairly self-explanatory.

    Hope that helps.

Similar Threads

  1. Problem with the source codes of OpenGL Programming Guide 8th
    By siqunpan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-26-2014, 06:43 AM
  2. OpenGL Programming Guide 8th edition - website problem
    By Sword7 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-23-2013, 03:36 PM
  3. Is OpenGL Programming Same as VRML Programming
    By grungefreak1 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 09-30-2008, 03:07 PM
  4. Replies: 6
    Last Post: 09-13-2001, 09:50 AM
  5. Replies: 4
    Last Post: 03-25-2001, 05:25 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