Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Re-sizing problem

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2011
    Posts
    10

    Re-sizing problem

    Hello when i re-size my GLUT window it blinks its very annoying. I have Ubuntu and installed fresh ATI drivers with Open GL 4.1. Also on start if I just move window my triangle disappear.
    PICTURE:
    1. On start it looks: http://dl.dropbox.com/u/15084870/Screenshot-3.png

    2. When i move it: http://dl.dropbox.com/u/15084870/Screenshot-4.png

    3. When i'm re-sizing (you can see thie pice shows what's under the GLUT window and it blinks): http://dl.dropbox.com/u/15084870/Screenshot-5.png

    Thanks a lot.

    PS. Transparency on Linux doesn't work? I try to set alpha to Triangle but it doesn't work the same in Qt.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    802

    Re: Re-sizing problem

    Could u show us ur resize/relevant code please? We donot have magic eyes that could extract the code from the image :P
    Regards,
    Mobeen

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2011
    Posts
    10

    Re: Re-sizing problem

    Oh sorry here is the Code : http://dl.dropbox.com/u/15084870/Triangle.cpp

    It's a Triangle sample form CodeBible OpenGl

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    802

    Re: Re-sizing problem

    Hi,
    For the main problem, could u try adding glFinish() after glutSwapBuffers call and see if this helps. For transparency to work, you need to enable blending
    Code :
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    Regards,
    Mobeen

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2011
    Posts
    10

    Re: Re-sizing problem

    Ok when i add glFinish it doesn't change anything the same. And Alpha works thanks

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    802

    Re: Re-sizing problem

    Could u put glFinish before glutSwapBuffers call and see if it helps.
    Regards,
    Mobeen

  7. #7
    Junior Member Newbie
    Join Date
    Jul 2011
    Posts
    10

    Re: Re-sizing problem

    The Same

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    802

    Re: Re-sizing problem

    The code that u have given works fine on my machine.
    Regards,
    Mobeen

  9. #9
    Junior Member Newbie
    Join Date
    Jul 2011
    Posts
    10

    Re: Re-sizing problem

    You run this on Linux? Maybe something is bad configured i will try if anyone has this problem and solve it please write

    Thanks a lot!

  10. #10
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    802

    Re: Re-sizing problem

    nope I am on windows 7, one thing you can do is add this line at the start of the render function and see if it gives an assertion.
    Code :
    //include <cassert> at the top ofcourse
    assert(glGetError() == GL_NO_ERROR);
    Regards,
    Mobeen

Posting Permissions

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