Changeset 8b7cfcf in opengl-game for test.vert


Ignore:
Timestamp:
Aug 5, 2017, 2:24:43 AM (8 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
d0b9596
Parents:
c40990d
Message:

Allow each vertex to have its own color

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test.vert

    rc40990d r8b7cfcf  
    11#version 410
    22
     3// using layout() doens't work on OSX, so use glBindAttribLocation() in the C++ code instead
     4// layout(position = 0) in vec3 vertex_position;
     5// layout(position = 1) in vec3 vertex_color;
     6
    37in vec3 vertex_position;
     8in vec3 vertex_color;
     9
     10out vec3 color;
    411
    512void main() {
     13  color = vertex_color;
    614  gl_Position = vec4(vertex_position, 1.0);
    715}
Note: See TracChangeset for help on using the changeset viewer.