glut 程式開發
DESCRIPTION
GLUT 程式開發. Ming-Te Chi Department of Computer Science National Chengchi University. Outline. Code blocks 下載及安裝 Glut bin file 下載及配置 創立一個 glut 範例程式. Code::Blocks 下載. 下載網址 http://www.codeblocks.org/. 點選 Download. 點選 ”Download the binary release”. - PowerPoint PPT PresentationTRANSCRIPT
GLUT 程式開發GLUT 程式開發Ming-Te Chi
Department of Computer Science National Chengchi University
OutlineOutline
Code blocks 下載及安裝Glut bin file 下載及配置創立一個 glut 範例程式
Code::Blocks 下載Code::Blocks 下載下載網址– http://www.codeblocks.org/
點選 Download
點選 ” Download the binary release”
請依照所適用之 OS 作下載( 在此僅以 windows 系統做示範教學 )
請依照所適用之 OS 作下載( 在此僅以 windows 系統做示範教學 )
兩者選一點擊下載
安裝 Code Blocks
依照內定
選擇安裝位置
執行 Code Blocks執行 Code Blocks
Glut bin file 下載及配置Glut bin file 下載及配置下載網址
– http://www.xmission.com/~nate/glut.html
Install glutInstall glut
After you download and open the GLUT bin zip file
Do the following!Copy glut32.dll to c:\windows\system32 or c:\windows\SysWOW64 (win 64)Copy glut32.lib to c:\program files\CodeBlocks\mingw\libCopy glut.h to c:\program files\CodeBlocks\mingw\include\
GL
Freeglut( 另一個 glut 選擇 )Freeglut( 另一個 glut 選擇 )
http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MinGW.zip
Copy freeglut.dll to c:\windows\system32 or c:\windows\SysWOW64 (win
64)Copy libfreeglut.a to c:\program files\CodeBlocks\mingw\libCopy freeglut.h, freeglut_std.h, and freeglut_ext.h to c:\program files\CodeBlocks\mingw\include\GL
建立一個 glut template建立一個 glut templateFile -> New -> Project
• 選擇 GLUT • 為 project 命名
• 指定路徑至 MinGW • 直接按下 Finish
Troubleshooting in windowsTroubleshooting in windows
add at line 18: #include <windows.h>
按下 (F9) to Build and run 則會出現以下執行畫面
static void key(unsigned char key, int x, int y){ case '+': slices++; stacks++; case '-': if (slices>3 && stacks>3) { slices--; stacks--; }} //The number of geometry stacks and slices can be adjusted using the ‘+’ and ‘-’ keys.
如果放對位置,但仍找不到 glut.h如果放對位置,但仍找不到 glut.h
請依下面流程,檢查路徑是否有你預期的一樣
參考教學網址 :– http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/
glut/