Results 1 to 3 of 3

Thread: Detecting actual window creation

  1. #1
    Member Contributor
    Join Date
    Mar 2004
    Location
    Bangalore, India
    Posts
    51

    Detecting actual window creation

    When using GLUT to create a window, is there any way to find out exactly when the window creation happens? I need to know as soon as the window has been created and become visible. Is there any way to query GLUT and find out if the window creation is complete?

    Also, after a call to glutPostRedisplay(), how do I know exactly when the rendering is actually complete?

    I'm working on an app that is meant to run exclusively on Linux.

    Thanks in advance.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Detecting actual window creation

    In your display callback you just set a flag indicating the the rendering is complete.

    As for window creation you could use the same thing, once the display callback has been called the first time the window is also visible.

    Mikael

  3. #3
    Member Contributor
    Join Date
    Mar 2004
    Location
    Bangalore, India
    Posts
    51

    Re: Detecting actual window creation

    Thanks, Mikael, but I've already tried that and it doesn't seem to work. I've tried grabbing the contents of the framebuffer after the end of my display callback, and sometimes I get a completely black image. This has happened even when I'm certain that there are no display requests pending. Also, I find that at startup, even after the display callback has finished executing for the first time, the window is not always visible immediately. The latency is too small to detect visually, but any XWindows command involving the newly created window's Window ID fails unless I allow for an arbitrary delay.

    Any further suggestions would be very welcome.

Similar Threads

  1. Crash on Window Creation
    By draftomatic in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-28-2009, 11:07 PM
  2. detecting/anticipating texture creation failure
    By angusdavis in forum OpenGL ES
    Replies: 2
    Last Post: 02-28-2008, 10:12 AM
  3. Maximized window creation using OPENGL
    By scoobypopeye in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 07-16-2006, 08:20 AM
  4. opengl window creation and use
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-12-2002, 07:27 AM
  5. Which type of Window creation is advantageous
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 04-15-2002, 04:08 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