Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: What is a good framework for OpenGL programming under Windows?

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    6

    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!
    Last edited by systemup; 09-02-2013 at 04:24 AM.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    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.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    6
    Quote Originally Posted by thokra View Post
    Define large.
    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.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    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?

  5. #5
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    474
    Quote Originally Posted by systemup View Post
    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.
    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.

  6. #6
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    6
    Quote Originally Posted by thokra View Post
    Or do you only handle already reconstructed volumes or extracted polygonal data? Or point clouds? Or all of them?
    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!

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    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.

    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.

  8. #8
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    6
    Quote Originally Posted by thokra View Post
    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.
    So how do we call what Qt does here?

    Quote Originally Posted by thokra View Post
    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.
    Awesome!

  9. #9
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    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.

  10. #10
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    6
    Quote Originally Posted by thokra View Post
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •