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

Thread: Drawing background gradient

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2014
    Posts
    21

    Drawing background gradient

    I would like to set the background with gradient instead of a single color. Is it possible ?

  2. #2
    Intern Contributor
    Join Date
    Sep 2013
    Posts
    81
    Draw a colored quad over the entire screen. There is no build in "clear to gradient" function.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2014
    Posts
    21
    How i can draw a quad with screen coords?

  4. #4
    Intern Contributor Brokenmind's Avatar
    Join Date
    Feb 2014
    Location
    Aachen / Germany
    Posts
    71
    You need to draw it before you do the transformation that affects the rest of the scene (so right after you load the identity matrix). Then, the screen space goes from (-1, -1) to (1, 1),

Posting Permissions

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