起点0615的个人主页

http://www.qtcn.org/bbs/u/145133  [收藏] [复制]

起点0615

与时具进,掌握最新技术!!

  • 8

    关注

  • 7

    粉丝

  • 10

    访客

  • 等级:新手上路
  • 总积分:48
  • 男,1992-07-15

最后登录:2021-11-20

更多资料

日志

2013-08-17 20:28

void GLWidget::drawCube()
{
GLfloat vertex_list[8][3] = {
{-1.0, -1.0, 1.0},
{1.0, -1.0, 1.0},
{1.0, 1.0, 1.0},
{-1.0, 1.0, 1.0},
{-1.0, -1.0, -1.0},
{1.0, -1.0, -1.0},
{1.0, 1.0, -1.0},
{-1.0, 1.0, -1.0}
};

GLint vertex_index_list[6][4] = {
{0, 1, 2, 3}, // front
{4, 7, 6, 5}, // back
{7, 3, 2, 6}, // top
{4, 5, 1, 0}, // bottom
{5, 6, 2, 1}, // right
{4, 0, 3, 7} // left
};

static const GLfloat texCoord_list[4][2] = {
{0.0, 0.0},
{1.0, 0.0},
{1.0, 1.0},
{0.0, 1.0}
} ..

阅读全文»分类:opengl|回复:1|浏览:2030

Powered by phpwind v8.7 Certificate Copyright Time now is:04-27 00:44
©2005-2016 QTCN开发网 版权所有 Gzip disabled