Hi!

Check out Jan's extremely useful GLIM library (search for Immediate Mode for OpenGL 3.0 here on the forum ).

Been using it for over 2 years to render debug primitives. Adapting it for 3.3+...