Hello there. This is from what I remember, I haven't programmed in a while.
@upermuk
I've ported a few WebGL to OpenGL before, most of the problems were about how to port javascript and c++. WebGL and OpenGL are essentially the same thing, they are just calls to hardware and the hardware is already specified and cannot be changed much. The huge difference is WebGL is OpenGL ES 2.0 and OpenGL can get up to 4.5.
So, if you try and port some big shader with modern functionality into the old one you might not be able to or you will get different results or no results. Getting an old GLSL shader to work on modern system may tell you that a function was deprecated or it would just ignore you.
Now it you are talking about openFrameworks use of GLSL you might bump into the floating point and integer texture problem when sending them as well as the POT texture problem (Power-Of-Two). Remember, you are porting WebGL to a system that can handle more modern openGL.
In any case your problem is not exactly porting WebGL/Javascript to OpenGL but porting Javascript to C++. In this case to OpenFrameworks. Otherwise I did this many years ago, ports of Orange Book examples for openFrameworks:
http://forum.openframeworks.cc/t/ofshader-example-port-from-orange-book-chapter-6-source-included/12310
Code was made to do exactly the same thing,