Fullscreen, Regions and OpenGL viewports


I have posted this on the beginners section already but I got no answers, so I decided to post this on the advanced Board. Blame me!

I have a question concerning 3 topics:

  1. How do I make a Fullscreen viewport with WinApi funcs, meaning what has to be passed in the struct when creating a window?

  2. How do I define a viewport in a region? How do I have to set the coordinates for the viewport. What I want to do is to create a round window with a viewport situated inside of it.

  3. Is there any known possibility to create a round viewport?

Thanks in advance for your help,


1 & 2: Have a look here .

3: Only rectalgular viewports allowed. However, you can simulate an arbitrary viewport form with the stencil buffer. For tutoial on the stencil buffer, see answer 1 & 2.


I had a look at different pages before I posted, but I couldn’t find something apropriate. What tutorial do you mean at NeHe’s??


Lesson 1 for fullscreen viewports, and 26 for stencil buffer. You can also have a look in the Red Book about the stencil buffer.

Thanks alot!