Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: glutRepostDisplay()

  1. #1
    Intern Newbie
    Join Date
    Nov 2001
    Posts
    38

    glutRepostDisplay()

    when i return from fullscreen game mode my app crashes (tested of different platform with latest drivers)
    when i disable my glutIdle function or when i comment the glutPostRedisplay in that function, the app doesn't crash ...

    any1?

  2. #2
    Guest

    Re: glutRepostDisplay()

    can you post your display code? If not, check to see if you are using glPushMatrix or glPopMatrix and popping an empty stack or something.

  3. #3
    Intern Newbie
    Join Date
    Nov 2001
    Posts
    38

    Re: glutRepostDisplay()

    Originally posted by mr x:
    can you post your display code? If not, check to see if you are using glPushMatrix or glPopMatrix and popping an empty stack or something.
    display code:

    // gl scene display function
    void GLApplication::glDisplayFunc(void) {
    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glMatrixMode (GL_MODELVIEW);
    glLoadIdentity ();
    /* move our eye position 50 units away */
    glTranslatef (0, 0, -50);
    /* apply the rotation from the mouse */
    glRotatef (_mouseRotX, 1.0, 0.0, 0.0);
    glRotatef (_mouseRotY, 0.0, 1.0, 0.0);
    glBegin (GL_LINES);
    glColor3f (0.5, 0.0, 0.0);
    glVertex3f (-20.0, 0.0, 0.0);
    glVertex3f (20.0, 0.0, 0.0);

    glColor3f (0.0, 0.5, 0.0);
    glVertex3f (0.0, 20.0, 0.0);
    glVertex3f (0.0, -20.0, 0.0);

    glColor3f (0.0, 0.0, 0.5);
    glVertex3f (0.0, 0.0, -20.0);
    glVertex3f (0.0, 0.0, 20.0);

    glEnd ();

    glutSwapBuffers();
    }

    animation code:

    // gl animation function
    void GLApplication::glAnimationFunc(void) {
    if (_doesAnimation) {
    _animationRotate += 2.0f;
    if (_animationRotate > 360) {
    _animationRotate = 0.0f;
    }
    glutPostRedisplay();
    }
    }

  4. #4
    Intern Newbie
    Join Date
    Nov 2001
    Posts
    38

    Re: glutRepostDisplay()

    a bit more relevant code is on
    http://users.pandora.be/lagae/code.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •