Results 1 to 5 of 5

Thread: my OpenGL window remains busy and white... why ?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Rennes, France
    Posts
    7

    my OpenGL window remains busy and white... why ?

    I've got a problem with the GLUT tutorial... It seems like my OpenGL window is 'stuck'... I mean, when the cursor is over it, it has the shape like when it is busy, and the window hardly refreshes itself, and whenever it does, it is all white... I can't do anything (close, resize, move etc), and i need a while(!kbhit()); to prevent it from quitting...

    Any help would be appreciate.

    source code (vc++6, win9
    --------------------------
    #include <gl/glut.h>
    #include<gl/gl.h>
    #include <conio.h>

    void renderScene(void) {
    glClear(GL_COLOR_BUFFER_BIT);
    glBegin(GL_TRIANGLES);
    glVertex3f(-0.5,-0.5,0.0);
    glVertex3f(0.5,0.0,0.0);
    glVertex3f(0.0,0.5,0.0);
    glEnd();
    glFlush();
    }

    void main(int argc, char **argv) {
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
    glutInitWindowPosition(100,100);
    glutInitWindowSize(320,100);
    try {
    glutCreateWindow("3D Tech- GLUT Tutorial");
    glutDisplayFunc(renderScene);
    glutMainLoop();
    }
    catch (...) {};
    while (!kbhit()) ;
    exit(0);
    }

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Rennes, France
    Posts
    7

    Re: my OpenGL window remains busy and white... why ?

    Me again... Well, does that source works on your computer at least ? .. It is supposed to draw a triangle..

    TIA

  3. #3
    Member Newbie
    Join Date
    Oct 2000
    Location
    Toronto, Ontario, Canada
    Posts
    33

    Re: my OpenGL window remains busy and white... why ?

    Where's your window resize function? You'll need it to choose a projection and setup a viewport.

    Also glutMainLoop() never returns so you'll need to set up a keyboard handler where you can determine when to quit. For this use glutKeyboardFunc() and check for a key (e.g. say ESC) that calls exit();

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Rennes, France
    Posts
    7

    Re: my OpenGL window remains busy and white... why ?

    Originally posted by ipo:
    [B]Where's your window resize function? You'll need it to choose a projection and setup a viewport.
    Ok I try to add a resize function...


    Also glutMainLoop() never returns so you'll need to set up a keyboard handler where you can determine when to quit.
    Yes, but my glutMainLoop does return !... The display function is just called once... Maybe I should try to install better drivers.

    ... Additionnaly, when I download examples, they compile ok, but there's a message box reading "A .DLL file, .DLL, wasn't found" at run time... And so it can't be launched... What DLL files could I need except from GLUT32.DLL, GLU32.DLL and OPENGL32.DLL which are all located in my windows\system\ ??

    Thanks...

  5. #5
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Rennes, France
    Posts
    7

    Re: my OpenGL window remains busy and white... why ?

    Me again...

    I changed my libs for OpenGL and GLUT, and now it works...

    Sorry for the inconvenient

Similar Threads

  1. My window just shows a white backround
    By Scarnet in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-11-2014, 06:32 PM
  2. Problem: when i run this program, i just got a white window.
    By bubbler in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-27-2013, 01:23 AM
  3. window turns white when clicked on
    By Super13 in forum OpenGL: Windows
    Replies: 0
    Last Post: 01-14-2004, 12:40 AM
  4. Opengl animation looks 'wrong' when windows gets busy!???
    By kevman in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 01-09-2001, 02:44 PM
  5. Windws clears my window white! How to stop it? Please help!!!
    By TB-Rex in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 08-21-2000, 04:12 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