資源簡介
OpenGL三維圖形系統開發與實用技術.基礎編程篇 隨書光盤代碼

代碼片段和文件信息
//?Console.cpp?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdafx.h“
#pragma?warning(disable?:?4305)
#include?
//??添加OpenGL頭文件
#include?
#include?
#include?
//??定義用戶函數及回調函數
void?myInit(void);
void?CALLBACK?myReshape(GLsizei?wGLsizei?h);
void?CALLBACK?myDisplay(void);
void?myInit(void)
{
glClearColor(0.00.00.00.0);??//??背景清除顏色
glShadeModel(GL_FLAT); //??圖形繪制模式
}
void?CALLBACK?myDisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor4f(0.20.61.01.0); //??圖形繪制顏色
glRotatef(60.01.01.01.0); //??設置旋轉
auxWireSphere(1.0); //??繪制線框模式的球
glFlush(); //??完成繪制
}
void?CALLBACK?myReshape(GLsizei?wGLsizei?h)
{
glViewport(00wh); //??設置窗口縮放時的視口變換
}
int?main(int?argc?char*?argv[])
{
auxInitDisplayMode(AUX_SINGLE?|?AUX_RGBA); //??初始化顯示模式
auxInitPosition(00400400); //??窗口顯示位置
auxInitWindow(“My?First?Console?OpenGL?Application“); //??窗口標題
myInit();
auxReshapeFunc(myReshape);
auxMainLoop(myDisplay);
return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????...D..R?????????0??2003-08-08?16:22??Chapter01
????...D..R?????????0??2003-08-07?17:11??Chapter01\Console
????......R??????1146??2002-10-17?14:07??Chapter01\Console\Console.cpp
????......R??????4603??2002-10-16?23:22??Chapter01\Console\Console.dsp
????......R???????539??2002-10-16?22:35??Chapter01\Console\Console.dsw
????......R?????41984??2002-10-24?21:01??Chapter01\Console\Console.ncb
????......R?????48640??2002-10-24?21:01??Chapter01\Console\Console.opt
????......R??????1397??2002-10-17?14:07??Chapter01\Console\Console.plg
????...D..R?????????0??2003-08-07?17:11??Chapter01\Console\Debug
????......R????217204??2002-10-17?14:07??Chapter01\Console\Debug\Console.exe
????......R??????1214??2002-10-16?22:34??Chapter01\Console\ReadMe.txt
????......R???????294??2002-10-16?22:34??Chapter01\Console\StdAfx.cpp
????......R???????667??2002-10-16?22:34??Chapter01\Console\StdAfx.h
????...D..R?????????0??2003-08-07?17:11??Chapter01\SDOpenGL
????...D..R?????????0??2003-08-07?17:11??Chapter01\SDOpenGL\Debug
????......R????155766??2002-10-17?20:02??Chapter01\SDOpenGL\Debug\SDOpenGL.exe
????......R??????2509??2002-10-17?19:13??Chapter01\SDOpenGL\MainFrm.cpp
????......R??????1581??2002-10-17?19:13??Chapter01\SDOpenGL\MainFrm.h
????......R??????4361??2002-10-17?19:13??Chapter01\SDOpenGL\ReadMe.txt
????...D..R?????????0??2003-08-07?17:11??Chapter01\SDOpenGL\RES
????......R??????1078??2002-10-17?19:13??Chapter01\SDOpenGL\RES\SDOpenGL.ico
????......R???????400??2002-10-17?19:13??Chapter01\SDOpenGL\RES\SDOpenGL.rc2
????......R??????1078??2002-10-17?19:13??Chapter01\SDOpenGL\RES\SDOpenGLDoc.ico
????......R??????1078??2002-10-17?19:13??Chapter01\SDOpenGL\RES\Toolbar.bmp
????......R???????496??2002-10-17?19:13??Chapter01\SDOpenGL\Resource.h
????......R??????2308??2002-10-17?19:13??Chapter01\SDOpenGL\SDOpenGL.clw
????......R??????4245??2002-10-17?19:13??Chapter01\SDOpenGL\SDOpenGL.cpp
????......R??????4635??2002-10-17?19:49??Chapter01\SDOpenGL\SDOpenGL.dsp
????......R???????541??2002-10-17?19:13??Chapter01\SDOpenGL\SDOpenGL.dsw
????......R??????1384??2002-10-17?19:13??Chapter01\SDOpenGL\SDOpenGL.h
............此處省略343個文件信息
- 上一篇:用友U8 UFO手冊
- 下一篇:SCSI總線和IDE接口協議應用和編程.pdf
評論
共有 條評論