블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
  • total
  • today
  • yesterday

Category

2008. 8. 13. 17:10 Method/CG

ftp://medialab.sogang.ac.kr
폴더: 오동훈>opengl

C관련 참고 사이트
www.winapi.co.kr

추천 교재
OpenGL 3판, 정보교육사

컴퓨터 그래픽스, 한빛미디어

http://nehe.gamedev.net

1. Setting OpenGL
다음의 세 파일을 컴퓨터에 설치한다

1) glut.h
소스코드에서 아래와 같이 하면
#include <gl/glut.h>
다음 경로에서 헤더 파일을 호출한다
C:\Program Files\Microsoft Visual Studio\VC98\Include\GL

2) glut32.dll
dll
dynamic link library
다음 위치에 복사한다
C:\WINDOWS\system32

3) glut32.lib
다음 위치에 복사한다
C:\Program Files\Microsoft Visual Studio\VC98\Lib


2. 예제 코드 Simple.c

* call back 함수
glutDisplayFunc(RenderScene)
여기서 argument로 쓰인 RenderScene은 함수이다

glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
여기서 argument는 buffer를 single로 할지 double로 할지를 선택한다.

glFlush() - single일 때
glSwapBuffer() - double일 때


SetupRC()
RC=rendering context

glutMainLoop()
일종의 while문이라고 생각하면 된다.
무한 루프를 돌면서 어떤 이벤트가 생기는지 검사한다.


'Method > CG' 카테고리의 다른 글

OpenGL Super Bible  (0) 2008.08.02
Rendering for an Interactive 360 Light Field Display  (0) 2008.07.11
Game Blender  (0) 2008.02.24
Maya tutorials  (0) 2008.02.18
curved surfaces 곡면  (0) 2008.02.12
posted by maetel