wglgears: add srgb-mode to usage
[mesa-demos.git] / src / wgl / rtotex / README.txt
blob3d92b18ee26fcb47a2fbef29a9d7cd9b88fdf5f8
1 **************************************************************************
2 **      Render to texture
3 **
4 **      www.paulsprojects.net
5 **
6 **      paul@paulsprojects.net
7 **************************************************************************
9 Description:
11 This is my first use of pbuffers. It is a simple project which creates a render-to-texture-enabled pbuffer, and a texture object related to it. When rendering, the pbuffer is made the current context, and two wire tori are rendered into it. The window is then made current, and the pbuffer is used to texture a single rectangle. The camera can be moved around this rectangle.
13 If the SGIS_generate_mipmap extension is supported, it is used to automatically generate mipmaps for the texture each time it is updated, and a LINEAR_MIPMAP_LINEAR filter is used. Otherwise, a LINEAR filter is used.
15 If anisotropic filtering is supported, the maximum degree of anisotropy is enabled at start-up. The anisotropy level can be altered to show the difference this filtering has on the textured quad.
17 It is also possible to render a second scene into the pbuffer, a textured teapot instead of the wire torus. This demonstrates rendering using textures in the pbuffer, then using the pbuffer image itself as a texture. The important thing to note here is that the texture object which will use the pbuffer image is part of the window context. The image on the teapot is part of the pbuffer context. It is important to load the image when the pbuffer context is current since in this demo, the two contexts do not share textures.
20 Requirements:
22 WGL_ARB_extensions_string
23 WGL_ARB_pbuffer
24 WGL_ARB_pixel_format
25 WGL_ARB_render_texture
27 Optional:
29 EXT_texture_filter_anisotropic
30 SGIS_generate_mipmap
33 References:
35 "Using pbuffers for off-screen rendering", Chris Wynn. From developer.nvidia.com
36 "OpenGL Render-to-Texture", Chris Wynn. From developer.nvidia.com
37 Extension specifications for the above WGL extensions.
40 Keys:
42 F1      -       Take a screenshot
43 Escape  -       Quit
45 1       -       Draw wire torus shape
46 2       -       Draw textured teapot
48 Up      -       Increase texture max anisotropy (if anisotropic filtering is supported)
49 Down    -       Decrease texture max anisotropy (if anisotropic filtering is supported)
51 M       -       Use LINEAR_MIPMAP_LINEAR filtering, if SGIS_generate_mipmap is supported
52 L       -       Use LINEAR filtering
54 P       -       Pause
55 U       -       Unpause