What is a good framework for OpenGL programming under Windows?

For a certain Windows application that involves OpenGL, I was suggested to use VTK by a friend, but the project seems to lack in good documentation.

What is a good OpenGL framework to create a medium-to-large sized Windows application using Visual Studio? I’ve played around with some freeGLUT but have no idea whether it is good for a large application.

Thanks!

a large application

Define large.

It is completely unclear what your requirements are and the scale is subjective. Some of us have everyday experience with actual large code-bases, code bases with thousands or even tens-of-thousands of files. I’m pretty sure you’re not aiming for that, are you? Also, Visual Studio has nothing to do with the choice. Literally all sensible options you have are supported on all major platforms and if there aren’t pre-compiled binaries, you can still compile them yourself.

Sorry, I could’ve been more precise. This would be a medical application that would do things like creating 3D objects of parts of human body from scanned images, etc. This would be a commercial application with lots of features for medical professionals, hence the term ‘large’.

Any help would be much appreciated. Please let me know if I need to elaborate more.

Well, for the OpenGL part, any toolkit that let’s you setup a GL context and a corresponding surface to render to will do. The more pressing requirements will probably be GUI features. If you need a fast and powerful GUI toolkit, FreeGLUT isn’t going to cut it. Qt4 or Qt5 are far superior in terms of GUI facilities. Another question is what you need for all the non-rendering stuff you’re going to do. If we’re talking medical vis., we’re necessarily talking CT, MRI, PET, ultra sound and so on. Reconstruction of data is a completely separate topic from rendering. Or do you only handle already reconstructed volumes or extracted polygonal data? Or point clouds? Or all of them?

[QUOTE=systemup;1254554]For a certain Windows application that involves OpenGL, I was suggested to use VTK by a friend, but the project seems to lack in good documentation.

What is a good OpenGL framework to create a medium-to-large sized Windows application using Visual Studio? I’ve played around with some freeGLUT but have no idea whether it is good for a large application.[/QUOTE]

First, ignore OpenGL and choose the framework based upon other factors. Viable options include MFC, Qt, or just using the Win32 API directly.

If your chosen framework has an OpenGL widget (e.g. QGLWidget for Qt), use that. Otherwise just use the base “child widget” class and create and manage the OpenGL aspects yourself using the WGL functions.

Yes, there’s some overhead to doing this yourself compared to getting some other toolkit to do it for you, but for a complex GUI application, it’s a negligible proportion of the project as a whole. OpenGL-specific frameworks such as GLUT or GLFW are far too limited for complex applications.

No, all the processing has to be written in the app (except for a few libraries provided).

Yes, it seems sensible to choose the GUI toolkit first. I’m considering Qt as the best candidate for the job and hope the OpenGL implementation in it is sufficient for my needs.

Thanks!

hope the OpenGL implementation in it is sufficient

Just to clarify: when talking about an OpenGL implementation, we usually refer to parts of a graphics driver or a pure software implementation of the OpenGL specification, like MESA. Qt doesn’t implement OpenGL, but I know what you mean. :wink:

I guess it will. And stuff Qt doesn’t offer can be easily extended. Also, Qt5 received a major overhaul in various places, including the OpenGL framework, to make it even more powerful.

So how do we call what Qt does here?

Awesome!

So how do we call what Qt does here?

Like any other windowing toolkit, Qt is layered on top of OS specific stuff like X11 or the Win32 API and window system bindings like GLX or WGL. So it simply wraps already existing functionality into common classes which can be used cross-platform. Which implementation of OpenGL is selected at runtime is platform dependent.

I see. Thanks a lot for clarifying!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.