101
104
glActiveTexture(GL_TEXTURE0);
103
glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(!temp);
106
glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(!tempBool);
104
107
glEnableClientState(GL_VERTEX_ARRAY);
105
glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(temp);
108
glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool);
107
110
GLuint arrayBuffer, elementBuffer;
108
111
glGenBuffers(1, &arrayBuffer);
185
188
glNormalPointer(GL_BYTE, 32, (void*)12);
186
189
glColorPointer(4, GL_UNSIGNED_BYTE, 32, (void*)28);
188
glGetPointerv(GL_VERTEX_ARRAY_POINTER, &temp); assert(temp == 0);
189
glGetPointerv(GL_COLOR_ARRAY_POINTER, &temp); assert(temp == 28);
190
glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &temp); assert(temp == 16);
191
glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &temp); assert(temp == 3);
192
glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &temp); assert(temp == GL_FLOAT);
193
glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &temp); assert(temp == 32);
194
glGetIntegerv(GL_COLOR_ARRAY_SIZE, &temp); assert(temp == 4);
195
glGetIntegerv(GL_COLOR_ARRAY_TYPE, &temp); assert(temp == GL_UNSIGNED_BYTE);
196
glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &temp); assert(temp == 32);
197
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &temp); assert(temp == 2);
198
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &temp); assert(temp == GL_FLOAT);
199
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &temp); assert(temp == 32);
200
glGetBooleanv(GL_VERTEX_ARRAY, &temp); assert(temp);
191
glGetPointerv(GL_VERTEX_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)0);
192
glGetPointerv(GL_COLOR_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)28);
193
glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)16);
194
glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &tempInt); assert(tempInt == 3);
195
glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT);
196
glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
197
glGetIntegerv(GL_COLOR_ARRAY_SIZE, &tempInt); assert(tempInt == 4);
198
glGetIntegerv(GL_COLOR_ARRAY_TYPE, &tempInt); assert(tempInt == GL_UNSIGNED_BYTE);
199
glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
200
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &tempInt); assert(tempInt == 2);
201
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT);
202
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
203
glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool);
202
205
glBindTexture(GL_TEXTURE_2D, texture); // diffuse?
203
206
glActiveTexture(GL_TEXTURE0);