ๆญฏLecture2.PDF

Similar documents
Microsoft PowerPoint - lecture17-ch8.ppt

Microsoft PowerPoint D View Class.pptx

Microsoft PowerPoint - lecture18-ch8

Microsoft PowerPoint - hci2-lecture5-messagemap.ppt

untitled

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

Open GL

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

Microsoft PowerPoint - 13prac.pptx

<B9CCB5F0BEEE20C1A4BAB8C3B3B8AE2E687770>

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

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

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

Dialog Box ์‹คํ–‰ํŒŒ์ผ์„ Web์— ํฌํ•จ์‹œํ‚ค๋Š” ๋ฐฉ๋ฒ•

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

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

K&R2 Reference Manual ๋ฒˆ์—ญ๋ณธ

Microsoft PowerPoint - lecture16-ch8 [ํ˜ธํ™˜ ๋ชจ๋“œ]

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

Microsoft PowerPoint - lecture17-ch8

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

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

Microsoft Word - cg09-final-answer.doc

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

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

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

้ฎ๋šฎโ”ฐ๏งŽ๋ถพ๋ฑ??๏งกโ‘ค๋‚ฏ

Microsoft Word - cg09-midterm.doc

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Microsoft Word - cg07-final.doc

chap10.PDF

Chapter 1. MFC ์‹œ์ž‘ํ•˜๊ธฐ

Deok9_Exploit Technique

์ž๋ฐ” ํ”„๋กœ๊ทธ๋ž˜๋ฐ

10 ์žฅ์„ธ๊ท ์ „ํ”„๋กœ๊ทธ๋ž˜๋ฐ 10.1 ๊ฒŒ์ž„๋ฃฐ (1) ์‚ฌ๋žŒ๊ณผ์ปดํ“จํ„ฐ๊ฐ€์‹ธ์šฐ๋Š” 2์ธ์šฉ๋ณด๋“œ๊ฒŒ์ž„์ด๋‹ค. (2) ์‚ฌ๋žŒ์ด๋จผ์ €์›€์ง์ด๊ณ , ์ปดํ“จํ„ฐ๊ฐ€์›€์ง์ธ๋‹ค. (3) ์„ธ๊ท ์„๊ฐ€๋กœ๋ฐ์„ธ๋กœ๋ฐฉํ–ฅ์œผ๋กœ 2์นธ๊นŒ์ง€๋นˆ์นธ์œผ๋กœ์ด๋™์‹œํ‚ฌ์ˆ˜์žˆ๋‹ค. (4) 1์นธ์„์ด๋™ํ• ๊ฒฝ์šฐ์—๋Š”๋ณต์ œ๊ฐ€๋œ๋‹ค. (5) ์ด๋™ํ•œํ›„์ฃผ๋ณ€์„ธ๊ท ์€๋‚ดํŽธ์œผ๋กœ๋ฐ”๋€๋‹ค.

MPLAB C18 C

๋งค๋ ฅ์ ์ธ ๋งฅ/iOS ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ทธ๋ฆผ A-1 ๋ณ€๊ฒฝ ์‚ฌํ•ญ ํ™•์ธ์ฐฝ Validate Setting... ํ•ญ๋ชฉ์„ ๊ณ ๋ฅด๋ฉด ๋œ๋‹ค. ํ”„๋กœ์ ํŠธ ํŽธ์ง‘๊ธฐ๋ฅผ ์„ ํƒํ–ˆ์„ ๋•Œ ํ™”๋ฉด ์•„ ๋ž˜์ชฝ์— ์žˆ๋Š” ๋™์ผํ•œ Validate Settings... ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ด๋„ ๋œ๋‹ค. ์ด์Šˆ ๋‚ด๋น„๊ฒŒ์ดํ„ฐ ๋ชฉ๋ก์—์„œ ๋ณ€๊ฒฝํ• 

Microsoft PowerPoint - lecture4-ch2.ppt

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

Microsoft PowerPoint - CPP_chap3

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

C# Programming Guide - Types

01-OOPConcepts(2).PDF

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

์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ C# 21์ผ ์™„์„ฑ

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

MAX+plus II Getting Started - ๋ฌด์ž‘์ •๋”ฐ๋ผํ•˜๊ธฐ

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

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

Microsoft PowerPoint _ํŒŒ์ผ์ž…์ถœ๋ ฅ.ppt

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

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

manual pdfรƒร–รยพ

Orcad Capture 9.x

Interstage5 SOAP์„œ๋น„์Šค ์„ค์ • ๊ฐ€์ด๋“œ

T100MD+

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

Design Issues

07 แ„Œแ…กแ„‡แ…กแ„‹แ…ด แ„ƒแ…กแ„‹แ…ฃแ†ผแ„’แ…กแ†ซ แ„แ…ณแ†ฏแ„…แ…ขแ„‰แ…ณ.key

rmi_๋ฐ•์ค€์šฉ_final.PDF

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

C++-ยฟรยบยฎร‡ร˜ยผยณ10ร€รฅ

<33372DC0A9B5B5BFECC7C1B7CEB1D7B7A1B9D62E687770>

Microsoft Word - cg08-final-answer.doc

์Šฌ๋ผ์ด๋“œ ์ œ๋ชฉ ์—†์Œ

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

ยณยปรรถยผรถรยค

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

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

No Slide Title

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

Microsoft Word - hci07-final-answer.doc

( )๋ถ€๋ก

LCD Display

ๆญฏ9์žฅ.PDF

DocsPin_Korean.pages

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

BMP ํŒŒ์ผ ์ฒ˜๋ฆฌ

<4D F736F F F696E74202D203031C0E520C0A9B5B5BFEC20C7C1B7CEB1D7B7A1B9D620B1E2C3CA5FBFB5B3B2C0CCB0F8B4EB205BC8A3C8AF20B8F0B5E55D>

5.แ„‰แ…ณแ„แ…ขแ†จ(แ„€แ…กแ†ผแ„‹แ…ดแ„Œแ…กแ„…แ…ญ).key

02 C h a p t e r Java

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

Microsoft PowerPoint - 04windows.ppt

Macaron Cooker Manual 1.0.key

๊ทธ๋ž˜ํ”ฝ ํ”„๋กœ๊ทธ๋ž˜๋ฐ

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

1217 WebTrafMon II

<B0EDB1DEC7C1B7CEB1D7B7A1B9D6284D DBFE4BEE0C1A4B8AE28B9DAB1E2C8AB292E687770>

ํ”„๋กœ๊ทธ๋žจ์„ ํ•™๊ต ๋“ฑ์ง€์—์„œ ์กฐ๊ธˆ์ด๋ผ๋„ ๋ฐฐ์šด ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋…ธํŠธ ์ž…๋‹ˆ๋‹ค. ์ € ์—ญ์‹œ ๊ทธ ์‚ฌ๋žŒ๋“ค ์ค‘ ํ•˜๋‚˜ ์ž…๋‹ˆ๋‹ค. ์ค‘๊ณ ๋“ฑํ•™๊ต ์‹œ์ ˆ ํ•™๊ต ๋„์„œ๊ด€, ์ƒˆ๋กœ ์ƒ๊ธด ์‹œ๋ฆฝ ๋„์„œ๊ด€ ๋“ฑ์„ ๋‹ค๋‹ˆ๋ฉฐ ์ฑ…์„ ๋ณด ๊ณ  ์ •๋ฆฌํ•˜๋ฉฐ ์–ด๋Š์ •๋„ ๋…ํ•™์œผ๋ฅด ๊ณต๋ถ€ํ•˜๊ธด ํ–ˆ์ง€๋งŒ, ์ž์ฃผ ์•ˆํ•˜๋‹ค ๋ณด๋ฉด ๊ธˆ๋ฐฉ ์žŠ์–ด

,,,,,, (41) ( e f f e c t ), ( c u r r e n t ) ( p o t e n t i a l difference),, ( r e s i s t a n c e ) 2,,,,,,,, (41), (42) (42) ( 41) (Ohm s law),

13์ฃผ-14์ฃผproc.PDF

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

ํžˆ์Šคํ† ๊ทธ๋žจ๊ตฌํ•˜๊ธฐ ์‚ฌ์ „์ค€๋น„ : ํžˆ์Šคํ† ๊ทธ๋žจ์„์ €์žฅํ• ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ํ•„์š”ํ•จ ํ•„์š”ํ•œ๋ฉ”๋ชจ๋ฆฌ๊ฐœ์ˆ˜ ร  ์ „์ฒด์˜์ƒ์˜ํ”ฝ์…€์€๊ทธ๊ฐ’์ด 0 ~ 255์ด๋ฏ€๋กœ 256 ๊ฐœ์˜๋ฉ”๋ชจ๋ฆฌํ•„์š”ํ•จ ์˜์ƒ์„๊ตฌ์„ฑํ•˜๋Š”ํ”ฝ์…€์˜๊ฐœ์ˆ˜๋Š”๋งค์šฐํฌ๋ฏ€๋กœ๋ฉ”๋ชจ๋ฆฌํ˜•์‹์€ unsigned long์œผ๋กœํ•ด์•ผํ•จ ( unsigned ๋ž€ +/- ๋ฅผ๊ณ ๋ คํ•˜์ง€์•Š๋Š”๋‹ค๋Š”

Microsoft PowerPoint - IP11.pptx

Javascript.pages

2005CG01.PDF

Microsoft Word - ExecutionStack

IDA 5.x Manual hwp

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

๏ผป์ œ1๊ฐ•๏ผฝ ํ…์ŠคํŠธ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”

Transcription:

VISUAL C++/MFC Lecture 2? Update Visual C ++/MFC Graphic Library OpenGL? Frame OpenGL 3D Graphic library coding CLecture1View? OpenGL MFC coding Visual C++ Project Settings Link Tap Opengl32lib, Glu32lib, glauxlib header file member data lecture1viewh

void winglresize(cx, cy) wingldrawscene() public: HGLRC m_hrc; HDC m_hdc; void winglresize(cx, cy); void wingldrawscene();? ^^ Window Style Pixel Format Rendering Context OnCreate() OnCreate() WM_CREATE, lecture1viewh OnCreate()? Class Wizard(View- ClassWizard, or Ctrl+w) Message WM_CREATE Add Function Member function OnCreate() OK

lecture1viewcpp OnCreate() int CLecture1View::OnCreate(LPCREATESTRUCT lpcreatestruct) if (CView::OnCreate(lpCreateStruct) == -1) return -1; int npixelformat; m_hdc = ::GetDC(m_hWnd); PIXELFORMATDESCRIPTOR pfd = sizeof(pixelformatdescriptor), 1, PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER, PFD_TYPE_RGBA, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0 ; npixelformat = ChoosePixelFormat(m_hDC, &pfd);

VERIFY(SetPixelFormat(m_hDC, npixelformat, &pfd)); m_hrc = wglcreatecontext(m_hdc); return 0;? WM_DESTROY ClassWizard Message box WM_DESTROY Add function Ok lecture1viewcpp OnDestroy code void Clecutre1View::OnDestroy() CView::OnDestroy(); wgldeletecontext(m_hrc); ::ReleaseDC(m_hWnd, m_hdc); WM_SIZE Message ClassWizard WM_SIZE function OnSize() void CLecture1View::OnSize(UINT ntype, int cx, int cy ) CView::OnSize(nType, cx, cy); x=0; y=10; wglmakecurrent(m_hdc, m_hrc); winglresize(600, 600, x, y); wglmakecurrent(null, NULL); OnDraw CLecture1Viewcpp void CLecture1View::OnDraw(CDC* pdc) CLecture1Doc* pdoc = GetDocument(); ASSERT_VALID(pDoc); wglmakecurrent(m_hdc, m_hrc); wingldrawscene(); SwapBuffers(m_hDC); wglmakecurrent(m_hdc, NULL);

MFC OpenGL OpenGL cider can rendering Rotation, Translation lingting, shading, texture mapping ^^ // lecture1viewh /////////////////////////////////////////////////////////// class CLecture1View : public CView /////////////////////////////////////////////////////////// // privat: double angle; unsigned int texname[4]; GLUquadricObj *CiderObj; float light_position[3]; enum CIDER, EARTH ; int view_mode; public: HGLRC m_hrc; HDC m_hdc; void winglresize(cx, cy); void wingldrawscene(); void winglresize(int w, int h); void winglinitrc(); /////////////////////////////////////////////////////////// lecture1viewcpp void CLecuture1View::winGLInitRC() glclearcolor (00, 00, 00, 10); glcleardepth( 10f); glshademodel (GL_SMOOTH); glenable(gl_depth_test); // //texture mapping //cider can object // // // // // //OpenGL // // Texture setting

// Bitmap image AUX_RGBImageRec * prgbimage; // 4 texture glgentextures (4, texname); ////////////////////////// First texture ///////////////////////////////////// glbindtexture (GL_TEXTURE_2D, texname[0]); // Bitmap (cider_tbmp) prgbimage = auxdibimageloada ( "cider_tbmp" ); // S gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); // T gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); // Mag gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Min gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Texture glteximage2d (GL_TEXTURE_2D, 0, 3, prgbimage->sizex, prgbimage->sizey, 0, GL_RGB, GL_UNSIGNED_BYTE, prgbimage->data); ////////////////////////////////////////////////////////////////////////////// ////////////////////////// Second texture //////////////////////////////////// // texture glbindtexture (GL_TEXTURE_2D, texname[1]); // Bitmap (cider_bbmp) prgbimage = auxdibimageloada ( "cider_bbmp" ); // S gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); // T gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); // Mag gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Min gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Texture glteximage2d (GL_TEXTURE_2D, 0, 3, prgbimage->sizex, prgbimage->sizey, 0, GL_RGB, GL_UNSIGNED_BYTE, prgbimage->data); ////////////////////////////////////////////////////////////////////////////// ////////////////////////// Third texture ///////////////////////////////////// // texture glbindtexture (GL_TEXTURE_2D, texname[2]);

// Bitmap (cider_sbmp) prgbimage = auxdibimageloada ( "cider_sbmp" ); // S gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); // T gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); // Mag gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Min gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Texture glteximage2d (GL_TEXTURE_2D, 0, 3, prgbimage->sizex, prgbimage->sizey, 0, GL_RGB, GL_UNSIGNED_BYTE, prgbimage->data); ////////////////////////////////////////////////////////////////////////////// ////////////////////////// Fourth texture ///////////////////////////////////// // texture glbindtexture (GL_TEXTURE_2D, texname[3]); // Bitmap (earthbmp) prgbimage = auxdibimageloada ( "earthbmp" ); // S gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); // T gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); // Mag gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Min gltexparameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Texture glteximage2d (GL_TEXTURE_2D, 0, 3, prgbimage->sizex, prgbimage->sizey, 0, GL_RGB, GL_UNSIGNED_BYTE, prgbimage->data); ////////////////////////////////////////////////////////////////////////////// // GL_MODULATE gltexenvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); // CiderObj Quadric object CiderObj = glunewquadric(); CiderObj = glunewquadric (); // Quadric object texture gluquadrictexture (CiderObj, GL_TRUE); // Quadric object normal gluquadricnormals (CiderObj, GLU_SMOOTH); glenable(gl_texture_2d); glenable(gl_lighting); glenable(gl_light0);

void CLecture1View::winGLResize(int w, int h) glviewport (0, 0, (GLsizei) w, (GLsizei) h); glmatrixmode (GL_PROJECTION); glloadidentity (); gluperspective( 500f, (GLdouble) w/h, 10f, 1500f ); glmatrixmode (GL_MODELVIEW); glloadidentity(); glulookat( 50, 50, 50, 0, 0, 0, 0, 0, 1); WM_KEYDOWN WM_TIMER ClassWizard CLecture1Viewcpp void CLecture1View::OnTimer(UINT nidevent) // TODO: Add your message handler code here and/or call default Invalidate(FALSE); // // CView::OnTimer(nIDEvent); //

CLecture1View::OnCreate() SetTimer() 50msec wglmakecurrent(m_hdc, m_hrc); winglinitrc(); wglmakecurrent(null,null); SetTimer(1, 50, NULL); // return 0; ClassWizard? WM_KEYDOWN keyboard m view_mode void CLecture1View::OnKeyDown(UINT nchar, UINT nrepcnt, UINT nflags) // TODO: Add your message handler code here and/or call default if(nchar = 'm') if(view_mode == CIDER) view_mode = EARTH; // else if(view_mode == EARTH) view_mode = CIDER; // // CView::OnKeyDown(nChar, nrepcnt, nflags);? Compile

?, file \Lecture1\ directory gks directory \debug\ Lecture1exe file \debug\ keyboard m

? C++ soruce CLecture1View CcideView, CLecture1Doc CCideDoc Good Bye!! ^^// Reference :, Visual C++ 2,, 1998,, OpenGL, 1999 : ( )