The chapter05/scenereflectcube.cpp file in the example code The Applying a 2D texture recipe Chapter 19 of the book GPU Gems, by Randima Fernando, Addison-Wesley Professional, 2009