GLfloat vertices[] = { 0.0f, 1.0f, 0.0f,  
       -1.0f, -1.0f, 0.0f, 
       1.0f, -1.0f, 0.0f,};
 GLfloat colors[] = { 1.0f, 0.0f, 0.0f, 1.0f,     // Red
       0.0f, 1.0f, 0.0f, 1.0f,     // Green
       0.0f, 0.0f, 1.0f, 1.0f, };  // Blue 

 

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glFrontFace(GL_CW);

glVertexPointer(3, GL_FLOAT, 0, vertices);
glColorPointer(4, GL_FLOAT, 0, colors);

glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);

glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);

glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);

 

텍스쳐나 다른 건 다 되는데 제가 잘못한건지 ㅡㅡ......