OpenGL 3 Full Screen Quad Demo.
This application demonstrates how to render a quad using shaders that fills up the entire viewport using OpenGL 3 or higher or a forward compatible OpenGL 3.0 rendering context.
The application first clears the viewport to a black color and then draws the full screen quad. The full screen quad's fragment shader simply fills the full screen quad with a gray color. The full screen quad is rendered as a triangle strip with its vertex coordinates specified in normalized device coordinates (NDC). Specifying the vertex coordinates in this way means view and/or model transformations are not needed when rendering the full screen quad since the NDC vertex positions will always be mapped to the corners of the current viewport.
Note:
1. This is an OpenGL 3 demo. This demo will not run on OpenGL 2.x and OpenGL 1.x hardware.
2. This demo requires the Visual C++ 2010 Library Runtimes. Download instructions can be found here.
Download executable, source, and Visual C++ 2010 solution files. |