Microsoft PowerPoint D View Class.pptx

Similar documents
Microsoft PowerPoint - 06-Body Data Class.pptx

ๆญฏLecture2.PDF

Microsoft PowerPoint - 09-Object Oriented Programming-3.pptx

Microsoft PowerPoint - 07-Data Manipulation.pptx

Microsoft PowerPoint - 03-Points.pptx

04_แ„‹แ…ฉแ„‘แ…ณแ†ซแ„Œแ…ตแ„‹แ…ฆแ†ฏAPI.key

ลรธยทลธร•=ร‚ยค ยฌ ร‡Xยฑxร’ยธ 06 - รˆpยบโ€“ 1

์Šฌ๋ผ์ด๋“œ 1

Microsoft PowerPoint - 06-Pointer and Memory.pptx

Microsoft PowerPoint - lecture15-ch6.ppt

Open GL

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

Microsoft PowerPoint - lecture16-ch6

Microsoft PowerPoint - 04-Model Class.pptx

Microsoft PowerPoint - 04-Lines.pptx

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

(Microsoft PowerPoint - ADEFNJKEPXSQ.ppt [\310\243\310\257 \270\360\265\345])

Microsoft Word - cg09-midterm.doc

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

Microsoft Word - cg07-final.doc

Microsoft PowerPoint - 13prac.pptx

(Microsoft PowerPoint - \301\24608\260\255 - \261\244\277\370\260\372 \300\347\301\372)

Microsoft PowerPoint - 12-Custom Classes.pptx

Microsoft Word - cg09-final-answer.doc

Microsoft PowerPoint - lecture4-ch2.ppt

์œˆ๋„์šฐ์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ

์‰ฝ๊ฒŒ ํ’€์–ด์“ด C ํ”„๋กœ๊ทธ๋ž˜๋ฐ

Microsoft Word - cg07-midterm.doc

<4D F736F F F696E74202D20C1A63034B0AD202D20C7C1B7B9C0D3B8AEBDBAB3CABFCD20B9ABB9F6C6DBC0D4B7C2>

<4D F736F F F696E74202D B3E22032C7D0B1E220C0A9B5B5BFECB0D4C0D3C7C1B7CEB1D7B7A1B9D620C1A638B0AD202D20C7C1B7B9C0D320BCD3B5B5C0C720C1B6C0FD>

์„œํ”ผ์Šค์…ฐ์ด๋”ํ”„๋กœ๊ทธ๋žจ ์…ฐ์ด๋”๊ฐœ๋ฐœ์„์‰ฝ๊ฒŒ! Thursday, April 12, 12

Microsoft PowerPoint - lecture2-opengl.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

(Microsoft PowerPoint - JXEUOAACMYBW.ppt [\310\243\310\257 \270\360\265\345])

ๆญฏMDI.PDF

Microsoft Word - cg08-final-answer.doc

์Šฌ๋ผ์ด๋“œ 1

์Šฌ๋ผ์ด๋“œ 1

Microsoft PowerPoint - lecture3-ch2.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

PowerPoint Presentation

untitled

2005CG01.PDF

63-69ยฑรจยดรซยฟยต

์œˆ๋„์šฐ์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ

์„œํ˜„์ˆ˜

(Microsoft PowerPoint - \301\24613\260\255 - oFusion \276\300 \261\270\274\272)

์‰ฝ๊ฒŒ ํ’€์–ด์“ด C ํ”„๋กœ๊ทธ๋ž˜๋ฐ

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

์Šฌ๋ผ์ด๋“œ 1

<4D F736F F F696E74202D20C1A63037B0AD202D20B1A4BFF8B0FA20B1D7B8B2C0DA>

Microsoft PowerPoint - NV40_Korea_KR_2.ppt

Microsoft PowerPoint - lecture11-ch4.ppt

(Microsoft PowerPoint - CNVZNGWAIYSE.ppt [\310\243\310\257 \270\360\265\345])

Microsoft PowerPoint - lecture18-ch8

iii. Design Tab ์„ Click ํ•˜์—ฌ WindowBuilder ๊ฐ€์ž๋™์œผ๋กœ์ƒ์„ฑํ•œ GUI ํ”„๋กœ๊ทธ๋ž˜๋ฐํ™˜๊ฒฝ์„ํ™•์ธํ•œ๋‹ค.

๋‹จ๊ตญ๋Œ€ํ•™๊ต๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด๊ณตํ•™๊ทธ๋ž˜ํ”ฝ์Šคํ”„๋กœ๊ทธ๋ž˜๋ฐ๊ธฐ๋ง๊ณ ์‚ฌ (2012 ๋…„๋ด„ํ•™๊ธฐ ) 2012 ๋…„ 6 ์›” 12 ์ผํ•™๊ณผํ•™๋ฒˆ์ด๋ฆ„ ๊ธฐ๋ง๊ณ ์‚ฌ ๋‹ด๋‹น๊ต์ˆ˜ : ๋‹จ๊ตญ๋Œ€ํ•™๊ต๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด๊ณตํ•™์ „๊ณต๋ฐ•๊ฒฝ์‹  l ๋‹ต์€๋ฐ˜๋“œ์‹œ๋‹ต์•ˆ์ง€์—๊ธฐ์ˆ ํ• ๊ฒƒ. ๊ณต๊ฐ„์ด๋ถ€์กฑํ• ๊ฒฝ์šฐ๋ฐ˜๋“œ์‹œ๋‹ต์•ˆ์ง€๋ช‡์ชฝ์˜๋’ค์—์žˆ๋‹ค๊ณ ๋ช…๊ธฐํ•œํ›„๊ธฐ์ˆ ํ• ๊ฒƒ. ๊ทธ์™ธ์˜๊ฒฝ์šฐ์˜๋‹ต์•ˆ์ง€๋’ค

API ๋งค๋‰ด์–ผ

์„œ๊ฐ•๋Œ€ํ•™๊ต ๊ณต๊ณผ๋Œ€ํ•™ ์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ CSE4170 ๊ธฐ์ดˆ ์ปดํ“จํ„ฐ ๊ทธ๋ž˜ํ”ฝ์Šค ์ค‘๊ฐ„๊ณ ์‚ฌ (1/8) [CSE4170: ๊ธฐ์ดˆ ์ปดํ“จํ„ฐ ๊ทธ๋ž˜ํ”ฝ์Šค] ์ค‘๊ฐ„๊ณ ์‚ฌ (๋‹ด๋‹น๊ต์ˆ˜: ์ž„ ์ธ ์„ฑ) ๋‹ต์€ ์—ฐ์Šต์ง€๊ฐ€ ์•„๋‹ˆ๋ผ ๋‹ต์•ˆ์ง€์— ๊ธฐ์ˆ ํ•  ๊ฒƒ. ์žˆ๋Š” ๋ณ€ํ™˜ ํ–‰๋ ฌ์€ ์ผ๋ฐ˜์ ์œผ๋กœ ์–ด๋–ค ์ขŒํ‘œ๊ณ„ ์—์„œ ์–ด๋–ค ์ขŒํ‘œ๊ณ„๋กœ์˜

Microsoft PowerPoint - C++ 5 .pptx

Overview OSG Building a Scene Graph 2008 ๋…„์—ฌ๋ฆ„ ๋ฐ•๊ฒฝ์‹  Rendering States StateSet Attribute & Modes Texture Mapping Light Materials File I/O NodeKits Text 2

์ œ8์žฅ ์ž๋ฐ” GUI ํ”„๋กœ๊ทธ๋ž˜๋ฐ II

Microsoft PowerPoint - lecture11-ch4

Microsoft PowerPoint cg01.ppt

์Šฌ๋ผ์ด๋“œ 1

์ด๋„๊ฒฝ, ์ตœ๋•์žฌ Dokyeong Lee, Deokjai Choi 1. ์„œ๋ก 

Microsoft PowerPoint - lecture17-ch8.ppt

ThisJava ..

untitled

PowerPoint Presentation

(Microsoft PowerPoint - FZBDPQDCSHAN.ppt [\310\243\310\257 \270\360\265\345])

Microsoft PowerPoint - chap01-C์–ธ์–ด๊ฐœ์š”.pptx

Microsoft PowerPoint - 11์ฃผ์ฐจ_Android_GoogleMap.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

12 ๊ฐ•. ๋ฌธ์ž์ถœ๋ ฅ Direct3D ์—์„œ๋Š”๋ฌธ์ž๋ฅผ์ถœ๋ ฅํ•˜๊ธฐ์œ„ํ•ด์„œ LPD3DXFONT ๊ฐ์ฒด๋ฅผ์‚ฌ์šฉํ•œ๋‹ค LPD3DXFONT ๊ฐ์ฒด์ƒ์„ฑ๊ณผ์ดˆ๊ธฐํ™” LPD3DXFONT ๊ฐ์ฒด๋ฅผ์ƒ์„ฑํ•˜๊ณ ์ดˆ๊ธฐํ™”ํ•˜๋Š”ํ•จ์ˆ˜๋กœ D3DXCreateFont() ๊ฐ€์žˆ๋‹ค. HRESULT D3DXCreateFont

Chapter_02-3_NativeApp

Spring Boot/JDBC JdbcTemplate/CRUD ์˜ˆ์ œ

์„ค๊ณ„๋ž€ ๋ฌด์—‡์ธ๊ฐ€?

๋ถ€์‚ฐ, ๊ธ€๋กœ๋ฒŒ๊ณผ ๋กœ์ปฌ์˜ ์‚ฌ์ด์—์„œ

์„œ๊ฐ•๋Œ€ํ•™๊ต ๊ณต๊ณผ๋Œ€ํ•™ ์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ CSE4170 ๊ธฐ์ดˆ ์ปดํ“จํ„ฐ ๊ทธ๋ž˜ํ”ฝ์Šค ์ค‘๊ฐ„๊ณ ์‚ฌ (1/7) [CSE4170: ๊ธฐ์ดˆ ์ปดํ“จํ„ฐ ๊ทธ๋ž˜ํ”ฝ์Šค] ์ค‘๊ฐ„๊ณ ์‚ฌ (๋‹ด๋‹น๊ต์ˆ˜: ์ž„ ์ธ ์„ฑ) ๋‹ต์€ ์—ฐ์Šต์ง€๊ฐ€ ์•„๋‹ˆ๋ผ ๋‹ต์•ˆ์ง€์— ๊ธฐ์ˆ ํ•  ๊ฒƒ. ๋‹ต ์•ˆ์ง€ ๊ณต๊ฐ„์ด ๋ถ€์กฑํ•  ๊ฒฝ์šฐ, ๋‹ต์•ˆ์ง€ ๋’ท๋ฉด์— ๊ธฐ์ˆ  ํ•˜๊ณ , ํ•ด๋‹น

์ปดํ“จํ„ฐ๊ทธ๋ž˜ํ”ฝ์Šค ์†Œํ”„ํŠธ์›จ์–ด

๋‹จ๊ตญ๋Œ€ํ•™๊ต๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด๊ณตํ•™๊ทธ๋ž˜ํ”ฝ์Šคํ”„๋กœ๊ทธ๋ž˜๋ฐ์ค‘๊ฐ„๊ณ ์‚ฌ (2011 ๋…„๋ด„ํ•™๊ธฐ ) 2011 ๋…„ 4 ์›” 26 ์ผํ•™๊ณผํ•™๋ฒˆ์ด๋ฆ„ ์ค‘๊ฐ„๊ณ ์‚ฌ ๋‹ด๋‹น๊ต์ˆ˜ : ๋‹จ๊ตญ๋Œ€ํ•™๊ต๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด๊ณตํ•™์ „๊ณต๋ฐ•๊ฒฝ์‹  l ๋‹ต์€๋ฐ˜๋“œ์‹œ๋‹ต์•ˆ์ง€์—๊ธฐ์ˆ ํ• ๊ฒƒ. ๊ณต๊ฐ„์ด๋ถ€์กฑํ• ๊ฒฝ์šฐ๋ฐ˜๋“œ์‹œ๋‹ต์•ˆ์ง€๋ช‡์ชฝ์˜๋’ค์—์žˆ๋‹ค๊ณ ๋ช…๊ธฐํ•œํ›„๊ธฐ์ˆ ํ• ๊ฒƒ. ๊ทธ์™ธ์˜๊ฒฝ์šฐ์˜๋‹ต์•ˆ์ง€๋’ค

Microsoft PowerPoint - lecture19-ch8.ppt

(Microsoft PowerPoint - 07\300\345.ppt [\310\243\310\257 \270\360\265\345])

Microsoft PowerPoint - chap02-Cํ”„๋กœ๊ทธ๋žจ์‹œ์ž‘ํ•˜๊ธฐ.pptx

<4D F736F F F696E74202D20C1A63130B0AD202D20C1F6C7FCB0FA20C7CFB4C3C0C720B7BBB4F5B8B5>

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint Presentation

์Šฌ๋ผ์ด๋“œ 1

(Microsoft PowerPoint - JXQEUPXIEBNZ.ppt [\310\243\310\257 \270\360\265\345])

Eclipse ์™€ Firefox ๋ฅผ์ด์šฉํ•œ Javascript ๊ฐœ๋ฐœ ๋ฐœํ‘œ์ž : ๋ฌธ๊ฒฝ๋Œ€ 11 ๋…„ 10 ์›” 26 ์ผ์ˆ˜์š”์ผ

โ…ก. Embedded GPU ๋ชจ๋ฐ”์ผ ํ”„๋กœ์„ธ์„œ์˜ ๋ฐœ์ „๋ฐฉํ–ฅ์€ ์ €์ „๋ ฅ ๊ณ ์„ฑ๋Šฅ ์ปดํ“จํŒ…์ด๋‹ค. ์ด ๋Ÿฌํ•œ ๋ชฉํ‘œ๋ฅผ ๋‹ฌ์„ฑํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋ชจ๋ฐ”์ผ ํ”„๋กœ์„ธ์„œ ๊ธฐ์ˆ ์€ ๋ฉ€ํ‹ฐ์ฝ” ์–ด ํ˜•ํƒœ๋กœ ๋ฐœ์ „ํ•ด ๊ฐ€๊ณ  ์žˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด NVIDIA์˜ ์ตœ์‹  ์‘์šฉํ”„ ๋กœ์„ธ์„œ์ธ Tegra3์˜ ๊ฒฝ์šฐ ์ฟผ๋“œ์ฝ”์–ด ARM Corte

์„œ๊ฐ•๋Œ€ํ•™๊ต๊ณต๊ณผ๋Œ€ํ•™์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ CSE4170 ๊ธฐ์ดˆ์ปดํ“จํ„ฐ๊ทธ๋ž˜ํ”ฝ์Šค๊ธฐ๋ง๊ณ ์‚ฌ (1/9) [CSE4170: ๊ธฐ์ดˆ์ปดํ“จํ„ฐ๊ทธ๋ž˜ํ”ฝ์Šค ] ๊ธฐ๋ง๊ณ ์‚ฌ ๋‹ด๋‹น๊ต์ˆ˜ : ์ž„์ธ์„ฑ ๋‹ต์€์—ฐ์Šต์ง€๊ฐ€์•„๋‹ˆ๋ผ๋‹ต์•ˆ์ง€์—๊ธฐ์ˆ ํ• ๊ฒƒ. ๋‹ต์•ˆ์ง€๊ณต๊ฐ„์ด๋ถ€์กฑํ• ๊ฒฝ์šฐ, ๋‹ต์•ˆ์ง€๋’ท๋ฉด์—๊ธฐ์ˆ ํ•˜๊ณ , ํ•ด๋‹น๋‹ต์•ˆ์ง€์นธ์—๊ทธ์‚ฌ์‹ค์„๋ช…๊ธฐํ• ๊ฒƒ. ์—ฐ์Šต์ง€๋Š”์ˆ˜๊ฑฐํ•˜

<4D F736F F F696E74202D204347C3E2BCAEBCF6BEF D315FC4C4C7BBC5CDB1D7B7A1C7C8BDBA20B0B3B0FC2E >

แ„‹แ…ฒแ„‚แ…ตแ„แ…ต แ„‡แ…งแ†ซแ„‰แ…ฎ-แ„’แ…กแ†ทแ„‰แ…ฎ.key

Microsoft PowerPoint - ๊ถŒ์žฅ ์‚ฌ์–‘

1. ๊ฐ์ฒด์˜์ƒ์„ฑ๊ณผ๋Œ€์ž… int ํ˜•๋ณ€์ˆ˜ : ์„ ์–ธ๊ณผ๋™์‹œ์—์ดˆ๊ธฐํ™”ํ•˜๋Š”๋ฐฉ๋ฒ• (C++) int a = 3; int a(3); // ๊ธฐ๋ณธํƒ€์ž…์—ญ์‹œํด๋ž˜์Šค์™€๊ฐ™์ด์ฒ˜๋ฆฌ๊ฐ€๋Šฅ ๊ฐ์ฒด์˜์ƒ์„ฑ ( ๋ณต์Šต ) class CPoint private : int x, y; public : CPoint(int a

[Brochure] KOR_TunA

C++ Programming

Microsoft PowerPoint - 02-GUI Basics.pptx

Microsoft PowerPoint - ร€รšยนร™08ร€รฅ-1.ppt

์‰ฝ๊ฒŒ ํ’€์–ด์“ด C ํ”„๋กœ๊ทธ๋ž˜๋ฐ

ShaderX2: DirectX 9 ์…ฐ์ด๋” ํ”„๋กœ๊ทธ๋ž˜๋ฐ ํŒ & ํŠธ๋ฆญ

Transcription:

Digital 3D Anthropometry 5. 3D View Class Sungmin Kim SEOUL NATIONAL UNIVERSITY 3D View Class ์˜์„ค๊ณ„ 3 ์ฐจ์›๊ทธ๋ž˜ํ”ฝ์˜๊ฐœ์š” Introduction Surface graphics Volume graphics Lighting and shading 3์ฐจ์›๋ชจ๋ธ์„ 2์ฐจ์›ํ™”๋ฉด์—ํ‘œ์‹œํ•˜๋Š”ํด๋ž˜์Šค Rendering Context ๋งŒ๋“ค๊ธฐ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ ์‹œ์ ๋ณ€ํ™˜ 2

Surface Graphics Polygonal Mesh ๋ฅผ์ด์šฉํ•ด์„œ๋ฌผ์ฒด์˜ํ‘œ๋ฉด๋งŒ์„๊ทธ๋ฆฌ๋Š”๋ฐฉ๋ฒ• ์žฅ๋ฉด์˜๋ณต์žก์„ฑ์—๋”ฐ๋ผ์ฒ˜๋ฆฌ์†๋„๊ฐ€๋‹ฌ๋ผ์ง ํ•˜๋“œ์›จ์–ด๊ฐ€์†์ด์šฉ์ดํ•จ ๋Œ€๋ถ€๋ถ„์˜๊ทธ๋ž˜ํ”ฝ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์—์‚ฌ์šฉ๋จ Computer Graphics 3 Surface Graphics ๋ฉ”์‰ฌ (Mesh) ๊ตฌ์กฐ๋ชจ๋ธ๋ง ์ฃผ๋กœ์‚ผ๊ฐํ˜• mesh ๊ฐ€์‚ฌ์šฉ๋จ vertex, edge, face ๋กœ๊ตฌ์„ฑ Computer Graphics face normal vector 4

Volume Graphics ๋ณต์…€ (Voxel, Volume Element) ๊ธฐ๋ฐ˜์˜๋ชจ๋ธ๋ง ์žฅ๋ฉด์˜๋ณต์žก๋„์™€๊ด€๊ณ„์—†์ด์ผ์ •ํ•œ์ฒ˜๋ฆฌ์†๋„๋ฅผ๊ฐ€์ง ํ™•๋ฆฝ๋œํ•˜๋“œ์›จ์–ด๊ฐ€์†๋ฐฉ๋ฒ•์ด์—†์Œ Compositing ํ”„๋กœ์„ธ์Šค์˜๋ณต์žก์„ฑ์—๊ธฐ์ธ ์˜ํ•™๋ถ„์•ผ๋“ฑ์—์‚ฌ์šฉ Computer Graphics 5 ์กฐ๋ช… ์ค‘์š”์„ฑ ์žฅ๋ฉด์˜์‚ฌ์‹ค์„ฑ์„๋†’์—ฌ์คŒ ์–ด๋ ค์›€ ๋‹ค์–‘ํ•œ๊ด‘์›์˜ํšจ๊ณผ ์ผ๊ด‘, ๋ถˆ, ์ „๊ตฌ๋“ฑ ๋ฌผ์ฒด์˜ํ‘œ๋ฉด์„ฑ์งˆ๊ณผ์ƒ‰์ƒ์˜ํšจ๊ณผ ๋ฐ˜์ง์ด๋Š”ํ‘œ๋ฉด, ๊ฑฐ์นœํ‘œ๋ฉด๋“ฑ Lighting Directional (Parallel) Spot (Specular) Point Ambient (Incident) 6

์ •์˜ ๋น›์˜๋ฐ˜์‚ฌ๋ฅผ๊ณ ๋ คํ•œ์ƒ‰์ƒ์˜๊ณ„์‚ฐ Shading ์ข…๋ฅ˜ ๋ฌผ์ฒด์˜mesh ์˜๊ฐ์ ์—๋Œ€ํ•ด๊ณ„์‚ฐ Mesh ๋‚ด๋ถ€์˜์ ๋“ค์—๋Œ€ํ•ด interpolation Flat shading Gouraud shading Phong shading Face normal vector Light Angle Triangular Element Flat Shading 7 Gouraud Shading Mesh ์˜๊ฐ๊ผญ์ง€์ ์—๋Œ€ํ•ด๊ณ„์‚ฐ Shading Barycentric Coordinate ๋ฅผ์จ์„œ interpolation c2 c3 a1 C a2 a3 c1 c1 a1 c2 a2 c3 a3 C a1 a2 a3 Barycentric Coordinate System 8

Phong Shading Mesh ๊ผญ์ง€์ ์˜ normal vector ๋ฅผ interpolation Shading Interpolated normal ์„์ด์šฉํ•œ shading Specular Light ์—์˜ํ•œ highlight ์ด๊ตฌํ˜„๋จ Interpolated Normal vector 9 Global Illumination ๊ด‘ํ•™ํ˜„์ƒ์„์ถฉ์‹คํžˆ๋ฌ˜์‚ฌํ•œ๋ Œ๋”๋ง์œผ๋กœ๋งค์šฐ์‚ฌ์‹ค์ ์ธํ‘œํ˜„์ด๊ฐ€๋Šฅํ•จ ๋ฐ˜์‚ฌ, ๊ตด์ ˆ, ํˆฌ๋ช…๋„, ๊ทธ๋ฆผ์ž๋“ฑ์˜ํ‘œํ˜„ ์—„์ฒญ๋‚œ๊ณ„์‚ฐ์ดํ•„์š”ํ•จ Rendering 10

์ค‘์š”์„ฑ ๋ฌผ์ฒด์˜๋ณต์žก๋„๋ฅผ๋†’์ด์ง€์•Š๊ณ ์‚ฌ์‹ค์„ฑ์„ํ–ฅ์ƒํ• ์ˆ˜์žˆ๋Š”๋ฐฉ๋ฒ• ๋ฐฉ๋ฒ• ๋ฌผ์ฒด์˜ํ˜•์ƒ์—๋งž๋Š” 2D ์ด๋ฏธ์ง€๋ฅผ์ƒ์„ฑ ๋ฉ”์‰ฌ์˜๊ผญ์ง€์ ์—ํ…์Šค์ณ์ขŒํ‘œ๋ฅผ์„ค์ • Texture Mapping 11 OpenGL (Open Graphics Library) ์˜์—ญ์‚ฌ 1992 ๋…„์‹ค๋ฆฌ์ฝ˜๊ทธ๋ž˜ํ”ฝ์Šค์‚ฌ์—์„œ๋งŒ๋“  2 ์ฐจ์›๋ฐ 3 ์ฐจ์›๊ทธ๋ž˜ํ”ฝ์Šคํ‘œ์ค€๊ทœ๊ฒฉ OpenGL 1980 ๋…„๋Œ€์—๋‹ค์–‘ํ•œ๊ทธ๋ž˜ํ”ฝํ•˜๋“œ์›จ์–ด์—๋งž๋Š”์†Œํ”„ํŠธ์›จ์–ด๋ฅผ๊ฐœ๋ฐœํ•˜๋Š”์ผ์€๋งค์šฐ์–ด๋ ค์› ์Œ ์†Œํ”„ํŠธ์›จ์–ด๊ฐœ๋ฐœ์ž๋“ค์ด๊ฐœ๋ณ„ํ•˜๋“œ์›จ์–ด์—๋งž์ถ”์–ด๋งž์ถค์‹์ธํ„ฐํŽ˜์ด์Šค์™€๋“œ๋ผ์ด๋ฒ„๋ฅผ์ž‘์„ฑ ์‹ค๋ฆฌ์ฝ˜๊ทธ๋ž˜ํ”ฝ์Šค (SGI) IrisGL API (Application Programming Interface) ๋ฅผ์˜คํ”ˆ์†Œ์Šค๋กœ์ „ํ™˜ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์–ธ์–ด๊ฐ„, ํ”Œ๋žซํผ๊ฐ„์˜๊ต์ฐจ์‘์šฉํ”„๋กœ๊ทธ๋ž˜๋ฐ์„์ง€์› ๋งˆ์ดํฌ๋กœ์†Œํ”„ํŠธ์‚ฌ์˜ Direct3D ์™€ํ•จ๊ป˜์ปดํ“จํ„ฐ๊ทธ๋ž˜ํ”ฝ์„ธ๊ณ„๋ฅผ์–‘๋ถ„ ํ‘œ์ค€์•ˆ์ด์—ฌ๋Ÿฌ๊ด€๋ จ์—…์ฒด์˜ํ† ๋ก ๊ณผ์ œ์•ˆ์œผ๋กœ์ด๋ฃจ์–ด์ง€๊ธฐ์—๋ฒ„์ „์—…๋ฐ์ดํŠธ๋Š”๋Š๋ฆฐํŽธ์ด๋‹ค ๋น„์˜๋ฆฌ๊ธฐ์ˆ ์ปจ์†Œ์‹œ์—„์ธํฌ๋กœ๋…ธ์Šค๊ทธ๋ฃน์—์˜ํ•˜์—ฌ๊ด€๋ฆฌ๋˜๊ณ ์žˆ๋‹ค ์•ฝ 250 ์—ฌ๊ฐœ์˜ API ํ•จ์ˆ˜ํ˜ธ์ถœ์„์ด์šฉ ํŠน์ง• ๋‹จ์ˆœํ•œ๊ธฐํ•˜๋„ํ˜•์—์„œ๋ถ€ํ„ฐ๋ณต์žกํ•œ์‚ผ์ฐจ์›์žฅ๋ฉด๊นŒ์ง€์ƒ์„ฑ๊ฐ€๋Šฅ ๊ฒŒ์ž„, CAD, ๊ฐ€์ƒํ˜„์‹ค, ์ •๋ณด์‹œ๊ฐํ™”, ๋น„ํ–‰์‹œ๋ฎฌ๋ ˆ์ด์…˜๋“ฑ์˜๋ถ„์•ผ์—์„œํ™œ์šฉ ์„œ๋กœ๋‹ค๋ฅธํ•˜๋“œ์›จ์–ด์—๋Œ€ํ•ด๋‹จ์ผํ•œ API ๋ฅผ์ œ๊ณต ํ•˜๋“œ์›จ์–ดํ”Œ๋žซํผ์˜๋Šฅ๋ ฅ์ฐจ์ด๋ฅผ๋ณด์™„ํ•จ 12

OpenGL ์˜ํ™•์žฅ OpenGL GLSL GLUT SDL GLU GLee GLEW GLUI GLFW GLM SFML GLUX OpenGL์˜์ƒ์œ„๋ ˆ๋ฒจ์…ฐ์ด๋”ฉ์–ธ์–ด์œˆ๋„์‹œ์Šคํ…œ์—๋…๋ฆฝ์ ์ธ OpenGL ํ”„๋กœ๊ทธ๋žจ์„์ž‘์„ฑํ•˜๋„๋ก๋„์™€์ฃผ๋Š”๋„๊ตฌ Simple DirectMedia Layer OpenGL ํ”„๋กœ๊ทธ๋žจ์„์œ„ํ•œ์ถ”๊ฐ€์ ์ธํ•จ์ˆ˜๋ฅผ์ œ๊ณต OpenGL ํ”„๋กœ๊ทธ๋žจ์„์œ„ํ•œ๋‹จ์ˆœํ•œ์ถ”๊ฐ€๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ œ๊ณต OpenGL ํ™•์žฅ Wrangler ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ œ๊ณต GLUT๋กœ๋งŒ๋“ค์–ด์ง„ GUI ํˆดํ‚ท์œผ๋กœ๋ฒ„ํŠผ, ์ฒดํฌ๋ฐ•์Šค๋“ฑ์˜ GUI ๊ธฐ๋Šฅ์„์ œ๊ณต OpenGL ์‘์šฉํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ์„์œ„ํ•œ์ด์‹๊ฐ€๋Šฅํ•œํ”„๋ ˆ์ž„์›Œํฌ GLSL ๊ทœ๊ฒฉ์—๊ธฐ๋ฐ˜ํ•œ OpenGL์„์œ„ํ•œ C++ ์ˆ˜ํ•™ํˆดํ‚ท๊ฐ„๋‹จํ•˜๊ณ ๋น ๋ฅธ๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ OpenGL ์œ ํ‹ธ๋ฆฌํ‹ฐ๋ฐ๋ณด์กฐ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ 13 C++ Builder ์—์„œ OpenGL ์˜์ž‘๋™์ˆœ์„œ ํ™”๋ฉด๋ฒ„ํผ์™€๊ฐ™์€์†์„ฑ์˜ Rendering Context ์ž‘์„ฑ OnCreate, OnResize ์žฅ๋ฉด์‹œ์ ์„ค์ •๋“ฑ๊ทธ๋ฆฌ๊ธฐ์ค€๋น„์ž‘์—… OnPaint Rendering Context ์—์žฅ๋ฉด์„๊ทธ๋ฆฌ๊ธฐ OnPaint Rendering Context ์™€ํ™”๋ฉด๋ฒ„ํผ๋ฅผ์„œ๋กœ๋ฐ”๊พธ๊ธฐ OnPaint Rendering Context ๋ฅผ์‚ญ์ œ OnClose 14

OpenGL ์˜๊ธฐ์ดˆ Rendering Context ๋งŒ๋“ค๊ธฐ ํ™”๋ฉด๊ณผํ˜ธํ™˜๋˜๋Š” Pixel Format ์˜์„ ํƒ๋ฐ์ด๋ฅผ๋ฐ”ํƒ•์œผ๋กœํ•œ Rendering Context ์„ค์ • DWORD dwflags=pfd_draw_to_window PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER; PIXELFORMATDESCRIPTOR pfd= sizeof(pixelformatdescriptor), 1, dwflags, PFD_TYPE_RGBA, 24, 0,0,0,0,0,0, 0,0, 0,0,0,0,0, 24, 0, 0, PFD_MAIN_PLANE, 0, 0,0, ; PixelFormat = ChoosePixelFormat(DC, &pfd); if (PixelFormat) SetPixelFormat(DC, PixelFormat, &pfd); RC=wglCreateContext(DC); 15 OpenGL ์˜๊ธฐ์ดˆ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ์ค€๋น„ ํ™”๋ฉด์˜ํฌ๊ธฐ์™€์ข…ํšก๋น„๋“ฑ์„๊ฒฐ์ •ํ•˜๊ธฐ height XRes=GetDeviceCaps(DC,LOGPIXELSX); YRes=GetDeviceCaps(DC,LOGPIXELSY); AspectRatio=((GLfloat)Width*(GLfloat)YRes)/((GLfloat)Height*(GLfloat)XRes); (left,bottom) width 16

OpenGL ์˜๊ธฐ์ดˆ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ์‹œ์ž‘ ๋ฐฐ๊ฒฝ์ง€์šฐ๊ธฐ Depth buffer์ดˆ๊ธฐํ™” ์กฐ๋ช…๋ฐ์žฌ์งˆ์„ค์ • wglmakecurrent(dc,rc); glcleardepth(1); glenable(gl_depth_test); gldepthfunc(gl_lequal); glhint(gl_perspective_correction_hint, GL_NICEST); glclearaccum(0,0,0,0); gldisable(gl_cull_face); glclear(gl_color_buffer_bit GL_DEPTH_BUFFER_BIT GL_ACCUM_BUFFER_BIT); glenable( GL_COLOR_MATERIAL); glenable(gl_lighting); glenable(gl_light0); 17 OpenGL ์˜๊ธฐ์ดˆ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ์‹œ์ž‘ ์‹œ์ ๋ฐ๋ชจ๋ธํ‘œ์‹œ๋ฐฉ๋ฒ•๊ฒฐ์ • ํ–‰๋ ฌ์„์ด์šฉํ•œ์ˆœ์ฐจ์ ๋ณ€ํ™˜๋˜๋Š”๋ช…์‹œ์ ์ธ์ง€์ • glmatrixmode(gl_projection); glloadidentity(); gluperspective(60.0f,aspectratio,1,10000); glmatrixmode(gl_modelview); glloadidentity(); glulookat(0,0,100,,0,0,0,0,1,0); // eye point, scene center, up vector 18

OpenGL ์˜๊ธฐ์ดˆ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ์ข…๋ฃŒ Rendering Context ์™€ํ™”๋ฉด Buffer ๋ฅผ๋ฐ”๊พธ๊ธฐ Flicker ๋ฐฉ์ง€ glflush(); SwapBuffers(DC); wglmakecurrent(dc,null); OpenGL ์„ธ์…˜์ข…๋ฃŒ wglmakecurrent(dc,0); if (RC) wgldeletecontext(rc); 19 Class ์„ค๊ณ„ C++ Builder ์˜๋ฌธ์ œ OnCreate, OnResize, OnPaint Event ์—์„œ Device Context ๊ฐ€๋ณ€ํ• ์ˆ˜์žˆ๋‹ค #include #include #include #include <vcl.h> <gl/gl.h> <gl/glu.h> "TPoint3D.h" class public : (HDC,int,int,int,int); ~(); HDC LastDC; HGLRC RC; ; int int float void void void PixelFormat; Left,Bottom,Width,Height,XRes,YRes; AspectRatio; CreateRenderingContext(HDC); BeginDraw(HDC); EndDraw(HDC); 20

Class ์„ค๊ณ„ ์ƒ์„ฑ์ž์™€ํŒŒ๊ดด์ž ::(HDC DC,int l,int b,int r,int t) CreateRenderingContext(DC); // Rendering Context ๋งŒ๋“ค๊ธฐ Left=l; Bottom=b; Width=r-l; Height=t-b; XRes=GetDeviceCaps(DC,LOGPIXELSX); // ํ•ด๋‹น Device context ์˜ํ•ด์ƒ๋„๊ตฌํ•˜๊ธฐ YRes=GetDeviceCaps(DC,LOGPIXELSY); AspectRatio=((GLfloat)Width*(GLfloat)YRes)/((GLfloat)Height*(GLfloat)XRes); ::~() wglmakecurrent(lastdc,0); if (RC) wgldeletecontext(rc); RC=0; // ์ตœ์ข…์ ์œผ๋กœ์‚ฌ์šฉ๋œ DC ๋ฅผ์ด์šฉ 21 Class ์„ค๊ณ„ CreateRenderingContext ํ•จ์ˆ˜ void ::CreateRenderingContext(HDC DC) DWORD dwflags=pfd_draw_to_window PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER; PIXELFORMATDESCRIPTOR pfd= sizeof(pixelformatdescriptor), 1, dwflags, PFD_TYPE_RGBA, 24, 0,0,0,0,0,0, 0,0, 0,0,0,0,0, 24, 0, 0, PFD_MAIN_PLANE, 0, 0,0, ; PixelFormat = ChoosePixelFormat(DC, &pfd); if (PixelFormat) SetPixelFormat(DC, PixelFormat, &pfd); RC=wglCreateContext(DC); 22

Class ์„ค๊ณ„ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ์ค€๋น„ void ::BeginDraw(HDC DC) if (!RC) return; wglmakecurrent(dc,rc); glcleardepth(1); glenable(gl_depth_test); gldepthfunc(gl_lequal); glhint(gl_perspective_correction_hint, GL_NICEST); glclearaccum(0,0,0,0); gldisable(gl_cull_face); glclear(gl_color_buffer_bit GL_DEPTH_BUFFER_BIT GL_ACCUM_BUFFER_BIT); glenable(gl_color_material); glenable(gl_lighting); glenable(gl_light0); glmatrixmode(gl_projection); glloadidentity(); gluperspective(60.0f,aspectratio,1,10000); glmatrixmode(gl_modelview); glloadidentity(); glulookat(0,0,100,0,0,0,0,1,0); // eye/center/up 23 Class ์„ค๊ณ„ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ์ข…๋ฃŒ void ::EndDraw(HDC DC) LastDC=DC; // ์ตœ์ข…์ ์œผ๋กœ์‚ฌ์šฉํ•œ DC๋ฅผ๊ธฐ๋ก glflush(); SwapBuffers(DC); wglmakecurrent(dc,null); 24

ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์ƒˆํ”„๋กœ์ ํŠธ์‹œ์ž‘ SDI ํ”„๋กœ๊ทธ๋žจ์„์ž‘์„ฑ TMainForm ์˜์ƒ์„ฑ์ž / ํŒŒ๊ดด์ž #include ".h"... class TMainForm : public TForm... ; *GL; fastcall TMainForm::TMainForm(TComponent* Owner) : TForm(Owner) GL=0; void fastcall TMainForm::FormClose(TObject *Sender, TCloseAction &Action) if (GL) delete GL; GL=0; Action=caFree; 25 ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ํด๋ž˜์Šค์ดˆ๊ธฐํ™” OnCreate, OnResize event handler ์ž‘์„ฑ void fastcall TMainForm::FormCreate(TObject *Sender) GL=new (Canvas->Handle,0,0,ClientWidth,ClientHeight); void fastcall TMainForm::FormResize(TObject *Sender) if (GL) delete GL; GL=new (Canvas->Handle,0,0,ClientWidth,ClientHeight); FormPaint(this); 26

ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์žฅ๋ฉด๊ทธ๋ฆฌ๊ธฐ OnPaint event handler ์ž‘์„ฑ void fastcall TMainForm::FormPaint(TObject *Sender) if (GL) GL->BeginDraw(Canvas->Handle); glbegin(gl_triangles); glcolor3f(1,0,0); glnormal3f(0,0,1); glvertex3f(-10,-10,0); glvertex3f(10,-10,0); glvertex3f(0,10,0); glend(); GL->EndDraw(Canvas->Handle); 27 ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ๋ณ€ํ™˜๊ธฐ๋Šฅ ํšŒ์ „์ด๋™ EyePoint ์™€ UpVector ๋ฅผ์กฐ์ ˆ ํ™•๋Œ€์ถ•์†Œ Scene Center ์™€ EyePoint ๊ฑฐ๋ฆฌ์กฐ์ ˆ Scene Center ์™€ EyePoint ์œ„์น˜์ด๋™ Up Vector Eye Point Scene Center 28

ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ Mouse Event Handler ์ •์˜ ํด๋ž˜์Šค์— mouse event handler ํ•จ์ˆ˜๋ฅผ์ •์˜ void fastcall TMainForm::FormMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) if (GL) GL->MouseDown(Button,Shift,X,Y); void fastcall TMainForm::FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y) if (GL) if (GL->MouseMove(Shift,X,Y)) FormPaint(this); void fastcall TMainForm::FormMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) if (GL) GL->MouseUp(Button,Shift,X,Y); 29 ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ๋ณ€๊ฒฝ์—ํ•„์š”ํ•œ๋ณ€์ˆ˜๋ฐํ•จ์ˆ˜์„ค์ • bool DragStart; TPoint3D O_SceneCenter,O_EyePoint,O_UpVector; // ์ดˆ๊ธฐ viewport TPoint2D Rotation,Start; // ํšŒ์ „๋Ÿ‰, ๋งˆ์šฐ์Šค์‹œ์ž‘์  void CalculateViewport); // ์‹œ์ ๊ณ„์‚ฐํ•จ์ˆ˜ void bool void MouseDown(TMouseButton Button,TShiftState Shift, int X, int Y); MouseMove(TShiftState Shift,int X, int Y); MouseUp(TMouseButton Button,TShiftState Shift, int X, int Y); ::(HDC DC,int l,int b,int r,int t)... O_SceneCenter.Set(0,0,0); O_EyePoint.Set(0,0,100); O_UpVector.Set(0,1,0); Rotation.Set(0,0); CalculateViewport(); DragStart=false; 30

ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ํšŒ์ „ void ::MouseDown(TMouseButton Button,TShiftState Shift, int X, int Y) if (!DragStart) DragStart=true; Start.Set(X,Y); // ๋งˆ์šฐ์Šค์‹œ์ž‘์  bool ::MouseMove(TShiftState Shift,int X, int Y) if (DragStart) Rotation.x+=(float)(X-Start.x)/2.0*M_PI/180.0; // ๊ฒฝ๋„๋ณ€ํ™”๋Ÿ‰ Rotation.y+=(float)(Y-Start.y)/2.0*M_PI/180.0; // ์œ„๋„๋ณ€ํ™”๋Ÿ‰ CalculateViewport(); // ์‹œ์ ์žฌ๊ณ„์‚ฐ Start.Set(X,Y); // ๋งˆ์šฐ์Šค์‹œ์ž‘์ ์žฌ์„ค์ • return true; return false; void ::MouseUp(TMouseButton Button,TShiftState Shift, int X, int Y) if (DragStart) DragStart=false; 31 ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ํšŒ์ „ ์‹œ์ ์žฌ๊ณ„์‚ฐ void ::CalculateViewport() TPoint3D O,YAxis,Normal; O.Set(0,0,0); YAxis.Set(0,1,0); // ๊ฒฝ๋„๋ฐฉํ–ฅํšŒ์ „ EyePoint=O_EyePoint.RotatedAbout(O_SceneCenter,YAxis,Rotation.x); UpVector=O_UpVector.RotatedAbout(O,YAxis,Rotation.x); // ์œ„๋„๋ฐฉํ–ฅํšŒ์ „ Normal=O_SceneCenter.CrossProduct(EyePoint,O_SceneCenter+YAxis); Normal.Normalize(); EyePoint=EyePoint.RotatedAbout(O_SceneCenter,Normal,Rotation.y); UpVector=UpVector.RotatedAbout(O,Normal,Rotation.y); 32

ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ์ด๋™ ์‹œ์ ์ด๋™์—ํ•„์š”ํ•œ๋ณ€์ˆ˜์ถ”๊ฐ€ class... bool DragStart,Rotating; float Distance; TPoint3D O_SceneCenter,O_EyePoint,O_UpVector; TPoint2D Rotation,Start;... ::()... Distance=100; CalculateViewport(); 33 ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ์ด๋™ ์‹œ์ ์ด๋™์—ํ•„์š”ํ•œ์ฝ”๋“œ์ถ”๊ฐ€ void ::MouseDown(TMouseButton Button,TShiftState Shift, int X, int Y) if (!DragStart) DragStart=true; Start.Set(X,Y); Rotating=(Button==mbLeft); 34

ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ์ด๋™ ์‹œ์ ์ด๋™์—ํ•„์š”ํ•œ์ฝ”๋“œ์ถ”๊ฐ€ bool ::MouseMove(TShiftState Shift,int X, int Y) if (DragStart) if (Rotating) Rotation.x+=(float)(X-Start.x)/2.0*M_PI/180.0; Rotation.y+=(float)(Y-Start.y)/2.0*M_PI/180.0; else float dy=y-start.y; if (dy>0) Distance*=1.02f; else Distance*=0.98f; CalculateViewport(); Start.Set(X,Y); return true; return false; 35 ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ์ด๋™ ์‹œ์ ์ด๋™์—ํ•„์š”ํ•œ์ฝ”๋“œ์ถ”๊ฐ€ void ::CalculateViewport() TPoint3D O,YAxis,Normal; O.Set(0,0,0); YAxis.Set(0,1,0); O_EyePoint.Set(0,0,Distance); EyePoint=O_EyePoint.RotatedAbout(O_SceneCenter,YAxis,Rotation.x); UpVector=O_UpVector.RotatedAbout(O,YAxis,Rotation.x); Normal=O_SceneCenter.CrossProduct(EyePoint,O_SceneCenter+YAxis); Normal.Normalize(); EyePoint=EyePoint.RotatedAbout(O_SceneCenter,Normal,Rotation.y); UpVector=UpVector.RotatedAbout(O,Normal,Rotation.y); ์‹œ์ ์„์ƒํ•˜์ขŒ์šฐ๋กœ์ด๋™ํ•˜๋ ค๋ฉด์–ด๋–ป๊ฒŒํ•ด์•ผํ• ๊นŒ? (Homework) 36

ํ…Œ์ŠคํŠธํ”„๋กœ๊ทธ๋žจ๊ฐœ๋ฐœ ์‹œ์ ์ดˆ๊ธฐํ™” ๋ฉ”๋‰ด๋ฅผ์ถ”๊ฐ€ void fastcall TMainForm::InitializeViewport1Click(TObject *Sender) if (GL) GL->InitViewport(100); FormPaint(this); void ::InitViewport(float dist) Distance=dist; O_SceneCenter.Set(0,0,0); O_UpVector.Set(0,1,0); Rotation.Set(0,0); CalculateViewport(); ::(HDC DC,int l,int b,int r,int t)... InitViewport(100); DragStart=false; 37