1 / 22

加速程式撰寫的工具 Library

加速程式撰寫的工具 Library. 各種常用免費函示庫介紹. 什麼是「 Library 」. 函式庫將一些繁複或者牽涉到硬體層面的程式包裝成函式( Function) 或物件( Object) 收集在一起,編譯成二進位碼提供程式設計者使用。 舉例: winsock API library winsock API 是 windows 將 BSD socket API 移植 到 windows 下的函式庫. 程式設計師. 函式庫. 硬體. 控制硬體的函式庫.

zaccheus
Download Presentation

加速程式撰寫的工具 Library

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 加速程式撰寫的工具Library 各種常用免費函示庫介紹

  2. 什麼是「Library」 • 函式庫將一些繁複或者牽涉到硬體層面的程式包裝成函式(Function)或物件(Object)收集在一起,編譯成二進位碼提供程式設計者使用。 • 舉例:winsock API library winsock API是windows 將BSD socket API 移植 到 windows 下的函式庫

  3. 程式設計師 函式庫 硬體 控制硬體的函式庫 由於控制硬體必須使用組合語言, 為了避開難以理解的組 合語言, 因此用函式包裝組合語言, 方便程式設計師使用

  4. Example: Sound card control Sound card 啦啦啦!!! Developer Program 命令: 放音樂 複雜的機械語言 Library

  5. 圖形函式庫- Graphics Library • 將描述轉換成實際的圖像 如向量、座標等。 • 處理各種2D、3D圖形的特效 • 提供快速的Layout演算法

  6. SDL Simple DirectMedia Layer SDL是一套全方位的多媒體函式,由現任的B社Sam Lantinga 開發維護,應用相當廣,連PS2都有軟體用它來開發 網址: www.libsdl.org

  7. openGL Open graphic library 這是個耳熟能詳的圖形軟體,最早由Silicon Graphics Inc. 開發,目前已經成為工業標準,所有市面上的作業系統都支援OpenGL 網址:www.opengl.org

  8. openGL 範例1:quake3 雷神之槌

  9. openGL範例2 3D方塊 • #include<windows.h> , #include<gl/glut.h> • glRotatef(rtri,0.0f,1.0f,0.0f); // Rotate The Pyramid On It's Y Axis • glBegin(GL_TRIANGLES); // Start Drawing The Pyramid • glColor3f(1.0f,0.0f,0.0f); // Red • glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Front) • glTranslatef(1.5f,0.0f,-7.0f); // Move Right And Into The Screen • More……texture ,light ,transform

  10. DriectX家族 • Windows平台的API-專用於多媒體 • 由許多部分組成,包括 DriectDraw , DriectSound, DriectInput , DriectPlay, Driect3D(D3D)

  11. ClanLib ClanLib是專門用在GAME開發的,包辦各種GAME所需要的函式,包括Audio、network、file、input、以及thread,使用簡便,非常容易學習。 網址:www.clanlib.org

  12. Plib Portable Game Library 這個函式庫包含了許多其他函式庫,和ClanLib一樣,是整合型的函式庫,而且還在陸續擴展當中。 網址:plb.sourceforge.net

  13. GUI 函式庫和工具 • 用來製作GUI介面 • 舉例: windows 的MFC 以及BCB 的VCL都是其中的一種。

  14. Hardware (computer) User User Interfacce Library

  15. examples • DOS/Unix console – text user interface • Windows/MacOS/Xwindows – graphics User interface

  16. GTK+ GTK+是用來設計X windows的開發工具,最近在windows下也開始支援了。 網址:www.gtk.org

  17. Gtk+ 程式範例: gimp

  18. Fltk 非常短小精悍的GUI函式庫,靜態連結檔案只有97k bytes大小,非常適合用來寫小程式,雖然容量很小,能做的事也不少。 網站:www.fltk.org

  19. 其他種類的函式庫 • File Handling函式庫 用來處理各種影像、音訊等檔案格式 • Networking 函式庫 就是用來寫網路程式的資料庫 • Script 語言,較容易撰寫並且具有跨語言 相較於compiled平台的能力

  20. File Handleing • libpng 及 libjpeg :用來處理png及jpg圖檔 網址:www.libpng.org , www.ijg.org • ogg vorbis 有別於mp3的聲音壓縮軟體,為了發展出Free的音效壓縮程式。 網址:http://www.xiph.org/ogg/vorbis/index.html • Zlib 處理gzip 壓縮檔按格式 • SMPEG 為了配合SDL所增加的MPEG函式庫

  21. Script 語言 • Perl 歷久不衰的語言,可以說是懶人的C語言,在處理字串上非常方便,C語言要數十行才做得出的東西Perl兩行就夠了。 • PHP 配合mySQL使用,相較於ASP來說是窮人的架站利器許多商業網站也放棄昂貴的M$ server改用PHP+mySQL或是PostgreSql • Python perl的後繼者,將物件導向觀念導入script中

  22. Networking • BSD socket 全球幾乎唯一的TCP/IP函式庫,要寫TCP/IP程式幾乎擺脫不了它。 • IPX 和 SPX 原本用在Novell上的網路協定,在區域網路中常用

More Related