[컴퓨터] 도는 원 프로그래밍
- 최초 등록일
- 2003.04.22
- 최종 저작일
- 2003.04
- 4페이지/ 한컴오피스
- 가격 1,000원
소개글
행성 세개가 돌고 있다고 생각하시면 됩니다.
원근감 있게 돕니다.
C++언어로 짜여진 프로그램입니다.
목차
없음
본문내용
// Solar.c
// OpenGL SuperBible, Chapter 5
// Demonstrates OpenGL nested coordinate transformations
// and perspective
// Program by Richard S. Wright Jr.
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h>
#include <math.h>
// Lighting values
GLfloat whiteLight[] = { 0.2f, 0.2f, 0.2f, 1.0f };
GLfloat sourceLight[] = { 0.8f, 0.8f, 0.8f, 1.0f };
GLfloat lightPos[] = { 0.0f, 0.0f, 0.0f, 1.0f };
// Called to draw scene
void RenderScene(void)
{
// Earth and Moon angle of revolution
static float fMoonRot = 0.0f;
static float fEarthRot = 0.0f;
// Clear the window with current clearing color
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
참고 자료
없음