SLI Zone
NVIDIA.com Developer Home

NVIDIA OpenGL SDK 10 Code Samples

In each release of our SDK you will find numerous code samples, complete with carefully commented source code, whitepapers, and videos to help you take advantage of the latest technology from NVIDIA.

This code is released free of charge for use in derivative works, whether academic, commercial, or personal (Full License).

Cg 2.0 Toolkit is required to compile some code samples. Please obtain the Cg 2.0 Toolkit from the full OpenGL SDK 10 installer.


Download the complete OpenGL SDK 10.


Instanced Tessellation For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

This example shows how to use bindable uniform buffers and draw instanced in order to render tessellated curved surfaces. The vertices and the indices are stored in buffer objects and bound to the shader. Patches are drawn by rendering a single tessellated quad multiple times, using instancing to do this in a single call and the instance id to index the index buffer. Indices are stored as integers using the integer support in gpu shader4. This is idea is based on the Generic Mesh Refinement On GPU paper.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Compress YCoCg-DXT For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

This example demonstrates how a pixel shader can be used to compress a dynamically rendered color map into a texture, using both the DXT1 and YCoCg-DXT5 texture formats. This example accompanies the Real-Time YCoCg-DXT Compression Whitepaper
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Compress Normal-DXT For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

This example demonstrates how a pixel shader can be used to compress a dynamically rendered normal map into a texture, using both the DXT5 and LATC texture formats. This example accompanies the Real-Time Normal Map DXT Compression Whitepaper
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Froggy Demo AA For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Showing how the Froggy demo (and also Adriane demo) is doing AA. This sample allows you to add an additional pass for supersampling AA and kernel filtering. It also allows you to - test CSAA mode. - see how to use FBO.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Simple Glow For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Glow effect using separate filter and FBO. Simple sample on how to create a post-processing effect without changing too much of the main rendering code of you application.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Simple Depth Float For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Simple Depth Float demonstrates the use of a floating point depth buffer. The sample demonstrates the differences in depth fighting between different depth buffer precisions, and it demonstrates inverting the depth values to enhance precision further when using a floating point depth buffer.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Dual Depth Peeling For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

This sample demonstrates how to implement depth peeling on GeForce 8 using the new 32-bit depth texture format, as well as an optimization called dual depth peeling which peels from the front and from the back simultaneously.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Multisample Coverage For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

This sample demonstartes the use WGL_NV_multisample_coverage. It shows how to enable CSAA in an application window without rendering to a framebuffer object.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Simple Texture Buffer Object For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Simple Texture Buffer Object demonstrates how a texture buffer object can be used as a source for additional array data for a shader. In this sample, the arrays are used in place of regular vertex arrays to allow more comlicated indexing than OpenGL allows.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Cascaded Shadow Maps For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

This sample illustrates cascaded shadow mapping with the use of texture arrays in OpenGL with GLSL.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Christmas Tree For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Chistmas Tree demonstrates using new fourth generation shader capabilities to render a visually complex Christmas Tree. The sample uses deferred shading into a high dynamic range framebuffer object to handle the complex lighting environment
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Render to 3D Texture For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

This sample demonstrates the use of framebuffer objects to render to a 3D texture. It does a simple wave simulation on the 3D texture, and displays it by ray marching
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Transform Feedback Fractal For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Transform Feedback Fractal shows an advanced use of the transform feedback and the geometry shader, by iteratively feeding the data through the transformation stages, adding more detail each time.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Simple Texture Array For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Simple texture array demonstrates the use of the GL_EXT_texture_array extension.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Simple Geometry Program For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Simple Geometry Program demonstrates the use of the assembly level GL_NV_gpu_program4 shading extension, focusing on geometry shaders.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Simple Framebuffer Object For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Simple Framebuffer Object demonstrates the use of GL_EXT_framebuffer_object, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, GL_NV_framebuffer_multisample_coverage, and several format extensions. This sample shows how a program can search for support format combinations to find something that suites its needs.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


HDR For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

HDR demonstrates the use of new image formats for use in high-dynamic range rendering.
  Minimum Required GPU

Graphics API Type



Video
Whitepaper
Download


Cg Isosurf For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Cg Isosurf demonstrates the use of the geometry shader to tessellate an isosurface using marching tetrahedrons. The shaders includes tessellate metaballs, a texture volume, and a procedural vollume.
  Minimum Required GPU

Graphics API Type




Whitepaper
Download


Cg Geometry Program For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon.

Cg Geometry Program demonstrates the use of Cg 2.0 in loading and using geometry programs with OpenGL. The sample includes programs for silhouette determination, curve tessellation, and fin extrusion
  Minimum Required GPU

Graphics API Type




Whitepaper
Download

Last Update: 8/8/2008
NVPerfHUD 4