Colour mapping on meshes working
This commit is contained in:
@@ -14,10 +14,17 @@ int main(int argc, char** argv) {
|
||||
|
||||
GLfloat vertices[] = {
|
||||
// positions // colors // texture coords
|
||||
0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, // top right
|
||||
0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, // bottom right
|
||||
-0.5f,-0.5f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // bottom left
|
||||
-0.5f, 0.5f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f // top left
|
||||
0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, // 1.0f, 1.0f, // top right
|
||||
0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, // 1.0f, 0.0f, // bottom right
|
||||
-0.5f,-0.5f, 0.0f, 0.0f, 0.0f, 1.0f, // 0.0f, 0.0f, // bottom left
|
||||
|
||||
0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, // 1.0f, 1.0f, // top right
|
||||
-0.5f,-0.5f, 0.0f, 0.0f, 0.0f, 1.0f, // 0.0f, 0.0f, // bottom left
|
||||
-0.5f, 0.5f, 0.0f, 1.0f, 1.0f, 0.0f // 0.0f, 1.0f // top left
|
||||
|
||||
// 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, // bottom right
|
||||
//-0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, // bottom left
|
||||
// 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, 1.0f // top
|
||||
};
|
||||
|
||||
unsigned int indices[] = {
|
||||
|
||||
Reference in New Issue
Block a user