VC6 下载
http://blog.youkuaiyun.com/bcbobo21cn/article/details/44200205
opengl环境配置
http://blog.youkuaiyun.com/bcbobo21cn/article/details/51044614#t4
以下的demo工程
http://pan.baidu.com/s/1mhT1FIw
一 OpenGL 绘制一个立方体
代码#include<GL/glut.h>
// 绘制立方体
// 将立方体的八个顶点保存到一个数组里面
static const float vertex_list[][3] =
{
-0.5f, -0.5f, -0.5f,
0.5f, -0.5f, -0.5f,
-0.5f, 0.5f, -0.5f,
0.5f, 0.5f, -0.5f,
-0.5f, -0.5f, 0.5f,
0.5f, -0.5f, 0.5f,
-0.5f, 0.5f, 0.5f,
0.5f, 0.5f, 0.5f,
};
// 将要使用的顶点的序号保存到一个数组里面
static const GLint index_list[][2] =
{
{0, 1},
{2, 3},
{4, 5},
{6, 7},
{0, 2