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
    Join Date
    Oct 2004
    Posts
    4,661
    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.

Similar Threads

  1. Question about automatically choosing current OpenGL window
    By wangjihang in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-22-2012, 01:57 PM
  2. save current window drawing before clear?
    By Loderunner in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 02-21-2010, 01:41 PM
  3. Off-screen rendering bigger than current window
    By Gene78 in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 07-05-2009, 07:33 PM
  4. how to set up window larger than current screen size
    By xueming1164 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-08-2006, 01:54 PM
  5. Attaching a glut window to window's window
    By jowins in forum OpenGL: Windows
    Replies: 2
    Last Post: 11-17-2005, 02:24 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