OpenGL glBufferSubData

This entry is part 3 of 4 in the series Learning OpenGL

I finally wrote the next beginner program which uses the OpenGL glBufferSubData function. The advantage with this function is that you don’t need to define a huge buffer upfront, but instead provide the graphics card small buffers piece by piece.

I added a little thread to my program and call the draw function every 200 milliseconds. The program is as the ones before fairly unspectacular. All you see is a moving rectangle.

For my next program, I’ll use the glMapBuffer function which is generally the better function to use. Why and how to use it will be described in my next post.

Series Navigation<< Simple Beginner OpenGL programsOpenGL glMapBuffer/glMapBufferRange >>

Leave a Reply

Your email address will not be published. Required fields are marked *