What're vertex shaders capable of?

Eeeeehhh... technically, but not in any practical sense.

If you want to do things efficiently [both in execution time, and in development time], you want to be leveraging the GPUs built in graphics pipeline. Once you're doing this, the three end up with fairly distinct roles in the process.

The CPU [ie the C++ code] is 100% required for deal with user input/output, networking, loading things from the hard-drive, etc., and is generally where you want to put any 'once-per-frame' or <once-per-frame code.

You then need to use the CPU to tell the GPU what scenes to render and which shaders to use. Feed it a scene, and it'll automatically convert your 3D coordinates into 'screen-space' ones. You can hook into this process using vertex shaders, which will run once for each vertex in the scene. Useful for transforming and deforming models, and for basic lighting.

After that, it'll render things out to a 2D image -- and you can hook into that using pixel shaders [which run once per pixel outputted.]. Most uses come under the umbrella of 'post processing effects', with some

/r/opengl Thread Parent