glTexCoord2f ( l.Of - invWidth [1], l.Of -invHeight [1] );
glVertex3f ( pos.x + skySize, pos.y - skySize, pos.z - skySize );
glTexCoord2f ( l.Of - invWidth"[1], invHeight [1] ); glVertex3f ( pos.x + skySize, pos.y - skySize, pos.z + skySize );
glEnd () ,-
}
if ( camera.inViewingFrustrum ( leftBox ) ) {
glBindTexture ( GL_TEXTURE_2D,
skyTextures [2] -> getld () ); glBegin ( GL_QUADS );
glTexCoord2f ( l.Of - invWidth [2], invHeight [2] ) ; glVertex3d ( pos.x - skySize, pos.y - skySize, pos.z + skySize );
glTexCoord2f ( invWidth [2], invHeight [2] ); glVertex3f ( pos.x - skySize, pos.y + skySize, pos.z + skySize );
glTexCoord2f ( invWidth [2], l.Of - invHeight [2] ); glVertex3f ( pos.x - skySize, pos.y + skySize, pos.z - skySize );
glTexCoord2f ( l.Of - invWidth [2],
l.Of - invHeight [2] ); glVertex3f ( pos.x - skySize, pos.y - skySize,
pos.z - skySize );
glEnd (); .
}
if ( camera. inViewingFrustrum ( rightBox ), ) {
glBindTexture ( GL_TEXTURE_2D,
skyTextures [3] -> getld () ); glBegin ( GL_QUADS );
glTexCoord2f ( l.Of - invWidth [3], invHeight [3] ); glVertex3d ( pos.x + skySize, pos.y + skySize, pos.z + skySize );

Добавляем эффекты

glTexCoord2f ( invWidth [3], invHeight [3] ) ; glVertex3f ( pos.x + skySize, pos.y - skySize, pos.z + skySize ),-
glTexCoord2f ( invWidth [3], l.Of - invHeight [3] ) ,-glVertex3f ( pos.x + skySize, pos.y - skySize, pos.z - skySize );
glTexCoord2f ( l.Of - invWidth [3],
l.Of- invHeight [3] ); glVertex3f ( pos.x + skySize, pos.y + skySize,
pos.z - skySize );
glEnd ( );
}
if ( caméra.inViewingFrustrum ( upBox ) ) {
glBindTexture ( GL_TEXTURE_2D,
skyTextures [4] -> getld () ); glBegin ( GL_QUADS );
glTexCoord2f ( invWidth [4], l.Of - invHeight [4] ); glVertex3d ( pos.x + skySize, pos.y - skySize, pos.z + skySize );

⇐ Предыдущая| |Следующая ⇒