목차
프로젝트 파일
소스
그림
소스
그림
본문내용
#include
#include
#include
#include
#include
#include
#include
#include
static GLfloat xRot = 15.01f;
static GLfloat yRot = 340.0f;
static GLfloat posx,posy;
static GLfloat nRange = 50.f;
static GLfloat MercuryY = 90.0f;
static GLfloat VenusY = 320.0f;
static GLfloat EarthY = 120.0f;
static GLfloat MoonY = 120.0f;
static GLfloat MarsY = 280.0f;
static GLfloat JupiterY = 340.0f;
static GLfloat SaturnY = 180.0f;
static GLfloat UranusY = 110.0f;
static GLfloat NeptuneY = 220.0f;
static GLfloat PlutoY = 60.0f;
static GLfloat planetRoy = 0.0f;
static GLfloat planetRoz = 0.0f;
static GLfloat planetSpiny = 0.0f;
static GLfloat planetSpinz = 0.0f;
static GLfloat planety = 0.0f;
#define checkImageWidth 256
#define checkImageHeight 256
#define division_n 200
typedef float point3[3];
static GLubyte checkImage[checkImageHeight][checkImageWidth][4];
static GLuint texName;
GLfloat ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };
GLfloat diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };
GLfloat specular[] = { 1.0f, 1.0f, 1.0f, 1.0f};
GLfloat specref[] = { 1.0f, 1.0f, 1.0f, 1.0f };
//=============================================================
GLfloat Sun_diffuse[] = { 1.0, 0.51, 0.07, 1.0 };
GLfloat Mercury_diffuse[] = { 0.54, 0.45, 0.39, 1.0 };
GLfloat Venus_diffuse[] = { 0.85, 0.76, 0.59, 1.0 };
GLfloat Earth_diffuse[] = { 0.09, 0.27, 0.36, 1.0 };
GLfloat Moon_diffuse[] = { 0.8, 0.8, 0.8, 1.0 };
GLfloat Mars_diffuse[] = { 0.67, 0.48, 0.26, 1.0 };
GLfloat Jupiter_diffuse[] = { 0.67, 0.66, 0.60, 1.0 };
GLfloat Saturn_diffuse[] = { 0.93, 0.87, 0.74, 1.0 };
GLfloat Uranus_diffuse[] = { 0.41, 0.77, 0.93, 1.0 };
GLfloat Neptune_diffuse[] = { 0.37, 0.58, 0.7, 1.0 };
GLfloat Pluto_diffuse[] = { 0.87, 0.84, 1.0, 1.0 };
//=============================================================
static int iPlanet = 3;
static int mouseon;
GLuint tex[12];
void renderSphere(float cx, float cy, float cz, float r, int p, int tex_num );
AUX_RGBImageRec *LoadBMPFile(char *filename)
{
FILE *hFile =NULL;
if(!filename)
return NULL;
hFile = fopen(filename,"r");
if(hFile)
{
#include
#include
#include
#include
#include
#include
#include
static GLfloat xRot = 15.01f;
static GLfloat yRot = 340.0f;
static GLfloat posx,posy;
static GLfloat nRange = 50.f;
static GLfloat MercuryY = 90.0f;
static GLfloat VenusY = 320.0f;
static GLfloat EarthY = 120.0f;
static GLfloat MoonY = 120.0f;
static GLfloat MarsY = 280.0f;
static GLfloat JupiterY = 340.0f;
static GLfloat SaturnY = 180.0f;
static GLfloat UranusY = 110.0f;
static GLfloat NeptuneY = 220.0f;
static GLfloat PlutoY = 60.0f;
static GLfloat planetRoy = 0.0f;
static GLfloat planetRoz = 0.0f;
static GLfloat planetSpiny = 0.0f;
static GLfloat planetSpinz = 0.0f;
static GLfloat planety = 0.0f;
#define checkImageWidth 256
#define checkImageHeight 256
#define division_n 200
typedef float point3[3];
static GLubyte checkImage[checkImageHeight][checkImageWidth][4];
static GLuint texName;
GLfloat ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };
GLfloat diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };
GLfloat specular[] = { 1.0f, 1.0f, 1.0f, 1.0f};
GLfloat specref[] = { 1.0f, 1.0f, 1.0f, 1.0f };
//=============================================================
GLfloat Sun_diffuse[] = { 1.0, 0.51, 0.07, 1.0 };
GLfloat Mercury_diffuse[] = { 0.54, 0.45, 0.39, 1.0 };
GLfloat Venus_diffuse[] = { 0.85, 0.76, 0.59, 1.0 };
GLfloat Earth_diffuse[] = { 0.09, 0.27, 0.36, 1.0 };
GLfloat Moon_diffuse[] = { 0.8, 0.8, 0.8, 1.0 };
GLfloat Mars_diffuse[] = { 0.67, 0.48, 0.26, 1.0 };
GLfloat Jupiter_diffuse[] = { 0.67, 0.66, 0.60, 1.0 };
GLfloat Saturn_diffuse[] = { 0.93, 0.87, 0.74, 1.0 };
GLfloat Uranus_diffuse[] = { 0.41, 0.77, 0.93, 1.0 };
GLfloat Neptune_diffuse[] = { 0.37, 0.58, 0.7, 1.0 };
GLfloat Pluto_diffuse[] = { 0.87, 0.84, 1.0, 1.0 };
//=============================================================
static int iPlanet = 3;
static int mouseon;
GLuint tex[12];
void renderSphere(float cx, float cy, float cz, float r, int p, int tex_num );
AUX_RGBImageRec *LoadBMPFile(char *filename)
{
FILE *hFile =NULL;
if(!filename)
return NULL;
hFile = fopen(filename,"r");
if(hFile)
{
소개글