Re: How to modify algorithm to return a triangle with different colors of vertices?
Posted by
elect on
Apr 02, 2017; 8:45pm
URL: https://forum.jogamp.org/How-to-modify-algorithm-to-return-a-triangle-with-different-colors-of-vertices-tp4037830p4037833.html
You need to put your vertex positions and colors into a buffer and upload it to the gpu, like
here.
You also need to say to OpenGL how it should read your data, like
here.
And then your vertex shader will fetch
attribute_Position and
attirbute_Color accordingly.
If completely newbie, consider following a tutorial, like this
one.