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

Thread: inconsistent behaviour of glscissors

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2010
    Posts
    5

    inconsistent behaviour of glscissors

    Hello, I use Windows 7 and Windows XP, SDL+OpenGL, mingW c++. I am using glscissors
    to do some dirty-rect animation, with the intention of getting very smooth 2D animation
    on my older XP computer that supports OpenGL 1.3. I use

    Code :
    glEnable(GL_SCISSOR_TEST);
     
    SDL_Rect aRect = Extra_life.Location();
    glScissor(aRect.x, 480 - aRect.h - aRect.y, aRect.w, aRect.h);
     
    glClear( GL_COLOR_BUFFER_BIT );

    with the result that everyting works fine on my win7 computer, but on my
    winXP computer (supports OpenGL 1.3), it only works fine in windowed mode, not
    fullscreen. In fullscreen, glClear() seems to forget that the rest of the screen isn't inside
    the scissored area, and thus only the background in the scissored area ends up being visible
    (when I put it back on and put the image back on top of it).

    The point is, I enable the scissors, then call gl_scisors(), then glClear(), but glClear affects the
    area outside the scissored area. Possibly pertinent information is, that the fullscreen mode on WinXP is also Vsynced,
    and I wonder if that has anything to do with this behaviour. Without Vsync, the windowed version
    runs at about 150 fps without any attempts at scissoring, every loop, while the fullscreen mode is always 60 fps.

    Thanks in advance for any and all responses!

    Addendum 6-20-12 9:24AM EST: The windowed version automatically doesn't vsync, while the fullscreen displays
    60 fps (vsyncs), despite coding attempts to modify.

    Addendum 6-20-12 11:51 AM EST: The fullscreen mode is now free of vsync, but still has the wrong scissor behaviour.
    Last edited by brian_HW; 06-20-2012 at 08:53 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
  •