I am trying to write a recursive lambda function and first of all I am trying to figure out if what I want to do is doable.
Vec color (1, 1, 1);
Vec path (1, 1, 1);
Vec SamplePath = [&path, &color](int vert)-> Vec { //lambda function
//do code
color += Vec(1, 1, 1) * SamplePath (vert + 1);
};
as you can understand I want my function to return a specific value, Vec, which is just a struct. It seems that the code above doesn't compile and would like to understand what I have to change in order to make it work. Thanks in advance