91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.27MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-08-13
  • 語言: 其他
  • 標簽: OpenGL??

資源簡介

微軟OpenGL的22個例子,適合初學者。

資源截圖

代碼片段和文件信息

//TACCUM?-?Accumulation?test.
//??-?RGBA?SB/DB?(SB?default).
//??-?Command?line?options:
//????-sb?Single?buffer?mode.
//????-db?Double?buffer?mode.
//??-?Keys:?
// ??ESC?Quit
//????1???Use?filled?polygon?mode.
//????2???Use?outlined?polygon?mode.?

#include?“glos.h“
#include?
#include?
#include?
#include??

#pragma?comment(lib?“OpenGl32.lib“)
#pragma?comment(lib?“glu32.lib“)
#pragma?comment(lib?“glaux.lib“)
?
void?Init(void?);?
void?CALLBACK?Reshape(int?widthint?height);?
void?CALLBACK?Key_1(void?);?
void?CALLBACK?Key_2(void?);?
void?CALLBACK?Draw(void?);?
GLenum?Args(int?argcchar?**argv?);?
?
GLenum?doubleBuffer?directRender;?
GLint?thing1?thing2;?
?
?
void?Init(void)?
{?
????glClearColor(0.0?0.0?0.0?0.0);?
????glClearAccum(0.0?0.0?0.0?0.0);?
?
????thing1?=?glGenLists(1);?
????glNewList(thing1?GL_COMPILE);?
????glColor3f(1.0?0.0?0.0);?
????glRectf(-1.0?-1.0?1.0?0.0);?
????glEndList();?
?
????thing2?=?glGenLists(1);?
????glNewList(thing2?GL_COMPILE);?
????glColor3f(0.0?1.0?0.0);?
????glRectf(0.0?-1.0?1.0?1.0);?
????glEndList();?
}?
?
void?CALLBACK?Reshape(int?width?int?height)?
{?
????glViewport(0?0?(GLint)width?(GLint)height);?
?
????glMatrixMode(GL_PROJECTION);?
????glLoadIdentity();?
????glMatrixMode(GL_MODELVIEW);?
????glLoadIdentity();?
}?
?
void?CALLBACK?Key_1(void)?
{?
????glPolygonMode(GL_FRONT_AND_BACK?GL_FILL);?
}?
?
void?CALLBACK?Key_2(void)?
{?
????glPolygonMode(GL_FRONT_AND_BACK?GL_LINE);?
}?
?
void?CALLBACK?Draw(void)?
{?
????glPushMatrix();?
?
????glScalef(0.8?0.8?1.0);?
?
????glClear(GL_COLOR_BUFFER_BIT);?
????glCallList(thing1);?
????glAccum(GL_LOAD?0.5);?
?
????glClear(GL_COLOR_BUFFER_BIT);?
????glCallList(thing2);?
????glAccum(GL_ACCUM?0.5);?
?
????glAccum(GL_RETURN?1.0);?
?
????glPopMatrix();?
?
????glFlush();?
?
????if?(doubleBuffer)
{?
????auxSwapBuffers();?
????}?
}?
?
GLenum?Args(int?argc?char?**argv)?
{?
????GLint?i;?

????doubleBuffer?=?GL_FALSE;?

????for?(i?=?1;?i? {?
if?(strcmp(argv[i]?“-sb“)?==?0)
{?
doubleBuffer?=?GL_FALSE;?
}
else?if?(strcmp(argv[i]?“-db“)?==?0)
{?
doubleBuffer?=?GL_TRUE;?
}
else
{?
//printf(“%s?(Bad?option).\n“?argv[i]);?
return?GL_FALSE;?
}?
????}?
????return?GL_TRUE;?
}?
?
void?main(int?argc?char?**argv)?
{?
????GLenum?type;?
?
????if?(Args(argc?argv)?==?GL_FALSE)
{?
????auxQuit();?
????}?
?
????auxInitPosition(0?0?300?300);?
?
????type?=?AUX_RGB?|?AUX_ACCUM;?
????type?|=?(doubleBuffer)???AUX_DOUBLE?:?AUX_SINGLE;?
?
????auxInitDisplayMode(type);?
?
????if?(auxInitWindow(“Accum?Test“)?==?GL_FALSE)
{?
????auxQuit();?
????}?

printf(“1???Use?filled?polygon?mode.\n“);
printf(“2???Use?outlined?polygon?mode.\n“);?
?
????Init();?
?
????auxExposeFunc((AUXEXPOSEPROC)Reshape);?
????auxReshapeFunc((AUXRESHAPEPROC)Reshape);?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????278??2016-08-14?16:02??glTest22\glTAccum\glos.h

?????文件???????4308??2016-08-15?10:01??glTest22\glTAccum\glTAccum.dsp

?????文件????????539??2016-08-15?09:49??glTest22\glTAccum\glTAccum.dsw

?????文件??????41984??2016-09-02?09:58??glTest22\glTAccum\glTAccum.ncb

?????文件?????367616??2016-09-02?09:58??glTest22\glTAccum\glTAccum.opt

?????文件???????1442??2016-09-01?19:09??glTest22\glTAccum\glTAccum.plg

?????文件???????3094??2016-09-01?19:09??glTest22\glTAccum\TAccum.c

?????文件????????278??2016-08-14?16:02??glTest22\glTBitmap1\glos.h

?????文件???????4181??2016-08-14?18:37??glTest22\glTBitmap1\glTBitmap1.dsp

?????文件????????543??2016-08-14?18:21??glTest22\glTBitmap1\glTBitmap1.dsw

?????文件??????41984??2016-09-02?10:04??glTest22\glTBitmap1\glTBitmap1.ncb

?????文件?????367616??2016-09-02?10:04??glTest22\glTBitmap1\glTBitmap1.opt

?????文件???????1165??2016-09-02?10:03??glTest22\glTBitmap1\glTBitmap1.plg

?????文件???????5803??2016-09-02?10:03??glTest22\glTBitmap1\TBitmap1.c

?????文件????????278??2016-08-14?16:02??glTest22\glTBitmap2\glos.h

?????文件???????4328??2016-08-14?17:09??glTest22\glTBitmap2\glTBitmap2.dsp

?????文件????????543??2016-08-14?17:01??glTest22\glTBitmap2\glTBitmap2.dsw

?????文件??????41984??2016-09-02?10:03??glTest22\glTBitmap2\glTBitmap2.ncb

?????文件?????367616??2016-09-02?10:03??glTest22\glTBitmap2\glTBitmap2.opt

?????文件???????1302??2016-09-02?10:02??glTest22\glTBitmap2\glTBitmap2.plg

?????文件??????43331??2016-09-02?10:02??glTest22\glTBitmap2\TBitmap2.c

?????文件????????278??2016-08-14?16:02??glTest22\glTCopy\glos.h

?????文件???????4154??2016-08-14?18:57??glTest22\glTCopy\glTCopy.dsp

?????文件????????537??2016-08-14?18:40??glTest22\glTCopy\glTCopy.dsw

?????文件??????41984??2016-09-02?10:09??glTest22\glTCopy\glTCopy.ncb

?????文件?????367616??2016-09-02?10:09??glTest22\glTCopy\glTCopy.opt

?????文件???????1290??2016-09-02?10:09??glTest22\glTCopy\glTCopy.plg

?????文件??????60054??2016-08-14?19:27??glTest22\glTCopy\Play.bmp

?????文件???????4133??2016-09-02?10:09??glTest22\glTCopy\TCopy.c

?????文件????????278??2016-08-14?16:02??glTest22\glTdepth\glos.h

............此處省略155個文件信息

評論

共有 條評論