>
# include
# include
# include
# include
# pragma comment (lib, "glaux.lib"); int photo_tex; _RGBImageRec * photo_image; int space_tex; _RGBImageRec * space_image; CALLBACK resize (int width, int height) [9] p>
{(0,0, width, height); (GL_PROJECTION); (); (-5,5, -5,5, 2,12); (0,0,5, 0 , 0,0, 0,1,0); (GL_MODELVIEW);
} CALLBACK display (void)
{double xRotate = 0, yRotate = 0, zRotate = 0, radius = 0; double dr = 0.01; (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); (GL_TEXTURE_2D); d (1,1,1); (GL_TEXTURE_2D, space_tex); (GL_QUADS); d (0,0); glVertex3d (-5, -5, 3); glTexCoord2d (0,1); glVertex3d (-5, 5, 3); d (1,1 ); glVertex3d (5, 5, 3); d (1,0); glVertex3d (5, -5, 3); (); (); (0.1,0, radius); (0,0.1, radius); (8,5,0); (0.5,1); (xRotate, 0, 0, 10); (yRotate, 0, 2, 0); (zRotate, 1, 0, 0); (GL_TEXTURE_2D, photo_tex); (GL_QUADS); d (0,0); glVertex2d (-8, -8); d (0,1); glVertex2d (-8, 8); d (1,1); glVertex2d (8, 8); d (1,0); glVertex2d (8, -8); (); + = 0; + = 0; + = 0; - = dr; (radius <-3 | | radius> 0)
{=-dr; - = 2 * dr;
} (); (GL_TEXTURE_2D); ();
} main ()
{(50, 10, 400, 400); (AUX_RGB | AUX_DEPTH | AUX_DOUBLE); (TEXT ("Курсова робота")); (display); (resize); (GL_UNPACK_ALIGNMENT, 1 ); _image = auxDIBImageLoadW (L "photo1.bmp"); _image = auxDIBImageLoadW (L "space1.bmp"); (1, & photo_tex); (1, & space_tex); (GL_TEXTURE_2D, photo_tex); (GL_TEXTURE_2D , GL_TEXTURE_MIN_FILTER, GL_NEAREST); (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); D (GL_TEXTURE_2D, 0, 3, _image-> sizeX, _image-> sizeY,
, GL_RGB, GL_UNSIGNED_BYTE, _image-> data); (GL_TEXTURE_2D, space_tex); (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); D (GL_TEXTURE_2D, 0, 3, _image-> sizeX, _image-> sizeY,
, GL_RGB, GL_UNSIGNED_BYTE, _image-> data); (display);
}