資源簡介
通過此代碼,能大致了解OpenGL畫圖的基本結(jié)構(gòu)
代碼片段和文件信息
//?ccc.cpp?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdafx.h“
#include
#include
#include?
const?int?n?=?1000;
const?GLfloat?R?=?80.0f;
const?GLfloat?Pi?=?3.1415926535f;
const?GLfloat?a=80*cos(Pi/3);
GLsizei?winWidth?=?1000winHeight?=?800;
GLint?dataValue[34]={290300180300180390310450400610650610740450800390800300710300690340590340570300430300410340310340290300};
void?init(void){
glClearColor(1.01.01.01.0);
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0500.00.0500.0);
}
void?drawwheel(void){
GLint?ij;
glBegin(GL_LINE_LOOP);
for(i=0;i glVertex2f(360+R*cos(2*Pi/n*i)+300-a+R*sin(2*Pi/n*i));
}
glEnd();
glBegin(GL_LINE_LOOP);
for(j=0;j glV
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1677??2016-03-17?21:17??汽車\ccc.cpp
?????文件???????4572??2016-03-17?21:18??汽車\ccc.dsp
?????文件????????514??2016-03-17?20:48??汽車\ccc.dsw
?????文件??????41984??2016-03-17?21:18??汽車\ccc.ncb
?????文件??????48640??2016-03-17?21:18??汽車\ccc.opt
?????文件???????1352??2016-03-17?21:17??汽車\ccc.plg
?????文件?????204886??2016-03-17?21:17??汽車\Debug\ccc.exe
?????文件?????233724??2016-03-17?21:17??汽車\Debug\ccc.ilk
?????文件??????51773??2016-03-17?21:17??汽車\Debug\ccc.obj
?????文件?????187180??2016-03-17?21:13??汽車\Debug\ccc.pch
?????文件?????476160??2016-03-17?21:17??汽車\Debug\ccc.pdb
?????文件???????2068??2016-03-17?21:13??汽車\Debug\StdAfx.obj
?????文件?????140288??2016-03-17?21:17??汽車\Debug\vc60.idb
?????文件?????233472??2016-03-17?21:17??汽車\Debug\vc60.pdb
?????文件???????1190??2016-03-17?20:48??汽車\ReadMe.txt
?????文件????????290??2016-03-17?20:48??汽車\StdAfx.cpp
?????文件????????667??2016-03-17?20:48??汽車\StdAfx.h
?????目錄??????????0??2016-03-17?21:19??汽車\Debug
?????目錄??????????0??2016-03-17?21:19??汽車
-----------?---------??----------?-----??----
??????????????1630437????????????????????19
- 上一篇:軟件質(zhì)量保證計劃SQA
- 下一篇:tw-test.zip
評論
共有 條評論