我使用的是ubuntu 14.04版本的 具體安裝過程如下:
$ sudo apt-get install build-essential
安裝opengl library
接下來要把我們會用到的 library 裝上去,首先安裝 opengl library
$sudo apt-get install libgl1-mesa-dev
安裝opengl utilities
opengl utilities 是一組建構於 opengl library 之上的工具組,提供許多很方便的函式,使 opengl 更強大且更容易使用。接下來我們安裝opengl utilities
$sudo apt-get install libglu1-mesa-dev
安裝opengl utility toolkit
opengl utility toolkit 是建立在 opengl utilities 上面的工具箱,除了強化了 opengl utilities 的不足之外,也增加了 opengl 對於視窗介面支援。
hello.c 的源**:
#include
#include
void display()
int main(int argc,char **argv)
編譯:#gcc hello.c -o hello -lglut -lgl
我的第乙個程式
我的第乙個vc程式終於寫完了,花了2周,之前從沒有用vc寫過程式,也沒讀過什麼程式,只是在看書,看了幾百頁 mfc windows程式設計 正好有個機會,老師讓寫個vc程式,就試著寫了。程式的功能是不同地方的access的更新的記錄整合到一台機子上的access中,支援斷網自動連線,用的是socke...
opengl 學習2 第乙個程式
這個程式是我從弄下來的 include stdafx.h include void mydisplay void int main int argc,char argv 執行程式出現如圖的矩形 看下這個程式 1 標頭檔案 1.stdafx.h 這個與工程有關 和opengl無關 2.這是glut的標...
OpenGL例項簡述 第乙個程式
1.初始化glut glutinit argc,ar 2.建立顯示視窗 glutcreatewindow opengl test1 3.指定顯示內容 建立乙個圖並將圖的定義傳遞給glut函式glutdisplayfunc,即將圖賦給顯示視窗 如 linesegment glutdisplayfunc...