Results 1 to 7 of 7

Thread: glClear() problem

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    4

    glClear() problem

    Why is glClear wiping out my entire window instead of just the area specified with glViewport(..) ?

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

    Re: glClear() problem

    Hi !

    The scissor test is used to decide what area to clear.

    Mikael

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    4

    Re: glClear() problem

    ..and the scissor test is used how? I found a function Scissor(..) but it doesn't seem to be declared in my program. Is there some external library I should include?

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    4

    Re: glClear() problem

    Okay. I found a glScissor now. Sorry. But my window still wipes out (gets all black). I don't want other than my little openGL rectangle to be touched!

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

    Re: glClear() problem

    Did you enable the scissor test? It's disabled by default.

  6. #6
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    4

    Re: glClear() problem

    Yes, I did, and I noticed only the area I specified was active/useable/whatever, but _still_ the rest of my window got black.

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

    Re: glClear() problem

    Post some code.

Similar Threads

  1. glClear
    By DarioCiao! in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 09-19-2015, 01:34 AM
  2. Performance problem with glClear(GL_DEPTH_BUFFER_BIT)
    By sysrpl in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-02-2013, 09:02 PM
  3. glClear for FBO
    By V-man in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 06-25-2007, 06:29 PM
  4. glClear()
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-22-2005, 10:51 PM
  5. Can't glClear()!?!
    By Punchey in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 03-11-2001, 02:13 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