Hi,
I want to have an example of how to use the Geometry shader to compute the length of line strip.
the example must be on Qt + openGL 4.1.
You will provided by list of vertices that describe the line strips.
The requirement are described bellow:
***First requirement, Computing the lines length:
1-We need three buffers (position buffer, color buffer and line strip length buffer).
2-As soon as we run the program it should:
A- compute the length of each line strip on the geometry shader and save the length into the line strip buffer.
B- normalize the line strip length buffer (loop through the buffer and find the maximum value, then loop through the buffer again and divide each value in the buffer by the maximum. this is called normalization). YOU can use mapped buffer in order to be able to update the buffer content.
***Second requirement:- Using transform feedback and rendering the data
1- By using (vertex shader and fragment shader -NO geometry shader here-) (we use three array attributes position, color and length), the user pass two numbers between 0.0 and 1.0 to the vertex shader . If the line strip length fall between the two values then we update the vertex color to read otherwise use green) .
2-Return the total of line strips that is fall between the user input (you might use glQuery, I'm not sure).
3-Finally, render the data.
***Third requirement:- Using the geometry shader to render double line strip. Ie you can double the geometry shader output vertices count to render double line strips. the original line strips should be rendered normally the other line strip must be translated by small value to make shours there is double line strips.
This first requirement must be submitted within 12 hours from the agreement.
i will finish your project within 10hours, i joined again. please hire me.
i am c/c++, opengl experter and have full experience for 10 years.
opengl, c++ language is my best skill.
i can provide high quality and most speed.
if you want to success, please contact me.
Then, I will give you good result to the proposals.
hire me.