資源簡介
本資源為OpenGL實現的源碼,可用于OpenGL框架的搭建及繪制簡單的圖形。
代碼片段和文件信息
//?cgtest.cpp?:?Defines?the?entry?point?for?the?console?application.
//
//?test.cpp?:?定義控制臺應用程序的入口點。
//
//#include?“stdafx.h“
#include?“glut.h“
#include?
#pragma?comment?(lib?“glu32.lib“)
void?myDisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glRectf(-0.5f?-0.5f?0.5f?0.5f);
glFlush();
}
void?drawPoints(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
glVertex2f(0.0f?0.0f);
glVertex2f(0.5f?0.0f);
glEnd();
glFlush();
}
void?drawLine(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_LINES);
glVertex2f(0.0f?0.0f);
glVertex2f(0.5f?0.8);
glEnd();
glFlush();
}
void?drawcircle()
{
int?n?=?200;
int?i;
GLfloat?R?=?0.5f;
GLfloat?Pi?=?3.1415926536f;
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POL
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1228??2017-10-25?19:47??opengl\cgtest.cpp
?????文件??????169984??1998-08-18?16:25??opengl\glut.dll
?????文件???????21440??1998-08-18?16:24??opengl\glut.h
?????文件???????79654??1998-08-18?16:25??opengl\glut.lib
?????文件??????169984??1998-08-18?16:25??opengl\glut32.dll
?????文件???????79898??1998-08-18?16:25??opengl\glut32.lib
?????目錄???????????0??2017-11-23?14:30??opengl\
- 上一篇:Jpcap.dll 64位
- 下一篇:Oracle11g_win64安裝包
評論
共有 條評論