Jump to content
  • Advertisement
Sign in to follow this  

OpenGL GL2 Vertex Shader Question

This topic is 2206 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to write a small specialized application which is supposed to do the following:
1.) Buffer n arrays of m values
2.) Render a path such that each vertex consists of one value of three of those arrays

So it's like:
(1, 2, 3, 4)
(4, 3, 2, 1)
(1, 3, 2, 4)
(4, 2, 3, 1)
Now three arrays are choosen,lets pick 1, 2 and 3 in that order, so the vertices for the path are:
((1,4,1), (2, 3, 3), (3, 2, 2), (4, 1, 4))

Since the choosen arrays should be picked dynamically, and without delay, the values need to be buffered.
The thing is I need to use Opengl 2, so I started using VBO's.
But then, I'd need to buffer every Permutation of three arrays..

So I thought I could save the values of each array in a different buffer,
prepare the required amount of vertices (0, 0, 0) in a VBO,
and, using a vertex shader add the values in the choosen buffers.

So my question is, wether this is possible with GL2 shaders, and how could I access the buffers.
Basically I don't know a lot about shader programming, so some ressource about this
particular problem would be very helpful.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!