Free web servers - OpenGL Super Bible! Page 411 { temp =
OpenGL Super Bible! Page 411 { temp = rgb[0]; rgb[0] = rgb[2]; rgb[2] = temp; }; /* * Finally, initialize the bitmap header information */ (*info)- >bmiHeader.biSize = sizeof(BITMAPINFOHEADER); (*info)->bmiHeader.biWidth = viewport[2]; (*info)->bmiHeader.biHeight = viewport[3]; (*info)- >bmiHeader.biPlanes = 1; (*info)->bmiHeader.biBitCount = 24; (*info)- >bmiHeader.biCompression = BI_RGB; (*info)->bmiHeader.biSizeImage = bitsize; (*info)->bmiHeader.biXPelsPerMeter = 2952; /* 75 DPI */ (*info)- >bmiHeader.biYPelsPerMeter = 2952; /* 75 DPI */ (*info)->bmiHeader.biClrUsed = 0; (*info)->bmiHeader.biClrImportant = 0; return (bits); } The first thing you need to do is find out the size of the current viewport, using glGetIntegerv as shown just below. (This function is described in Chapter 14). This places the current X origin, Y origin, X size, and Y size into the viewport array, as shown in Table 11-3. /* * Grab the current viewport */ glGetIntegerv(GL_VIEWPORT, viewport); Table 11-3 Viewport Array Definitions Index Description 0 X origin of viewport (pixels) 1 Y origin of viewport (pixels) 2 X size of viewport (pixels) 3 Y size of viewport (pixels)
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.