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 3 of 3

Thread: How to glutPostRedisplay on a window that is not the current window?

  1. #1
    Junior Member Newbie
    Join Date
    May 2015
    Posts
    20

    How to glutPostRedisplay on a window that is not the current window?

    I have two windows. the upper window is taking user input and as a result of that input the lower window which is not the current window needs to get updated. However according to the manual page for glutPostRedisplay, that call only affects the top or current window. What is the equivalent call to force glut to update the lower window?
    I would like to avoid bringing the lower one to the front momentarily and updating it and then sending it to the back again.
    Thanks.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,152
    You might check out this old thread (first hit on a web search of "glut multi-window"):

    * https://www.opengl.org/discussion_bo...ith-GLUT-tutor

    Specifically:

    Code cpp:
    	glutSetWindow( window_1 );
    	glutPostRedisplay();  // Update screen with new rotation data
     
    	glutSetWindow( window_2 );
    	glutPostRedisplay();  // Update screen with new rotation data

    Sure enough, the API is still there:

    * http://freeglut.sourceforge.net/docs/api.php

  3. #3
    Junior Member Newbie
    Join Date
    May 2015
    Posts
    20
    Great, thank you.

Tags for this Thread

Posting Permissions

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