diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-22 19:24:53 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-23 11:23:43 +0300 |
commit | a830280688b43e9c73e5a16dbe9d180720eb624f (patch) | |
tree | 3db9db2e88cd465af655f9346f58c3b97efebd78 /source/blender/gpu/intern | |
parent | a2669b0cbff0dc02729a7246ac29642aca84929e (diff) |
Support Vertex Color in GLSL viewport for Cycles
The title says it all actually.
Added special custom data type, because we don't know in advance
whether we're referencing UV or Color layer. Also made it so vertex
attributes are normalized.
TODO: Border render in viewport ignores the normalization of the
attribute array for some reason, will be looked into still.
Reviewers: mont29, brecht, campbellbarton
Reviewed By: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D2022
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 072ff5235bf..09d0a383426 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -823,7 +823,7 @@ void GPU_interleaved_attrib_setup(GPUBuffer *buffer, GPUAttrib data[], int numda for (i = 0; i < numdata; i++) { glEnableVertexAttribArray(data[i].index); glVertexAttribPointer(data[i].index, data[i].size, data[i].type, - GL_FALSE, elementsize, BUFFER_OFFSET(offset)); + GL_TRUE, elementsize, BUFFER_OFFSET(offset)); offset += data[i].size * GPU_typesize(data[i].type); attribData[i].index = data[i].index; |