Results 1 to 4 of 4

Thread: Clearing the window

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2000
    Location
    Pontiac, Mi. USA
    Posts
    2

    Clearing the window

    Is it possible to "clear" just a portion of the window? I'm trying to have my viewport
    (cleared in black) smaller than my window.
    (ltgray background). The clearing covers the entire window, not just the viewport. I've tried glScissors, with the box the same size as my viewport, but that produces some ugly vertical flashing. Thanks for the help!

  2. #2
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,342

    Re: Clearing the window

    Just draw a black rectangle over the region you want to clear.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Clearing the window

    Or you can set a new viewport, and use glClear(), then you can clear all buffers you want, with any value you want.

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2000
    Location
    Pontiac, Mi. USA
    Posts
    2

    Re: Clearing the window

    Humus, I tried your tip and it worked just fine! Thanks, I just love simple solutions.
    Bob, thanks for the suggestion, but I'm a bit confused on the extra viewport idea. (Sorry, I'm a opengl newbie) When you have a sec, could you explain?
    J.Warrick

Similar Threads

  1. Clearing SSBO
    By Mustard in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-15-2013, 03:35 AM
  2. clearing sub-region of the window, or viewports
    By _arts_ in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 06-08-2011, 10:08 AM
  3. Clearing a part of the window
    By Mukund in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-30-2010, 07:56 PM
  4. clearing
    By ajbiv in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-24-2009, 02:00 PM
  5. Clearing only part of a window
    By capnbishop in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-02-2005, 03:21 PM

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