Move bezier functions to their own module. Keep the OpenGL specific code in render.cpp.