#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef GL_VERSION_1_1
#define POINTER 1
#define INTERLEAVED 2
#define DRAWARRAY 1
#define ARRAYELEMENT 2
#define DRAWELEMENTS 3
int setupMethod = POINTER;
int derefMethod = DRAWARRAY;
void setupPointers(void)
{
//define vertices
static GLint vertices[] = {25, 25,
100, 325,
175, 25,
175, 325,
250, 25,
325, 325};
//define colors
static GLfloat colors[] = {1.0, 0.2, 0.2,
0.2, 0.2, 1.0,
0.8, 1.0, 0.2,
0.75, 0.75, 0.75,
0.35, 0.35, 0.35,
0.5
OpenGL入门系列- 顶点数组的使用
于 2015-08-17 08:29:07 首次发布