OpenGl_View cannot be initialized (create OpenGL context) without providing a native window (OpenGl_View::SetWindow() called by V3d_View::SetWindow()). Although some systems might provide window-less OpenGL context, this workflow is not the way to use V3d_View.
However, this shouldn't be a problem in most cases - just create a window without mapping it onto the screen, and you'll be able to generate offscreen images. This approach is described in this article and you may find a code sample on GitHub.