Poll: C++ and GLM Support

Over the course of the last few months, I have received numerous emails and bug reports from people trying to compile the sample code as C++ code. So many, in fact, that I’m starting to think that the site may actually benefit from C++ code samples instead of C code samples.

To get a good idea of the consensus of C++ vs C in this case, I’ve opened up a little poll. Please take a second or so to select an option from the list and vote, I’d really like to hear your opinion on this. Also, if you have a comment on this, please post it as well.

This entry was posted in Other Things and tagged , , , . Bookmark the permalink.
  • Przemysław Lib

    I thought you are dead, or otherwise incapacitated…

    So long there where no word about this site….

    RSS is 8th world wonder :)

    • http://openglbook.com/ E. Luten

      Not dead, but very busy. I want to get this site back on track, it’s been too long since the last update.

  • Steen Rasmussen

    Happy to see you still want to continue updating the tutorial. As far as C vs C++ I personally didn’t have any issues with the code but if the majority is more comfortable with C++ I’m all for it.  Sadly I don’t know much about GLM except that it is being used in the OpenGL Superbible. I do believe it is a very useful library and to be able to take advantage of is definitely a plus in my book.

    • Przemysław Lib

       If somebody know fixed function OGL < 3.0 then GLM is familiar.

      Others can learn quickly by similarities with GLSL.

  • http://www.facebook.com/casperbhansen Casper B. Hansen

    As long as you explain, in detail, what the OpenGL calls do, I don’t really care – I think those who haven’t learned C or C++ should go elsewhere to learn that before even considering learning OpenGL.

    I am more of a C++ guy, but the linear approach with C-code is just so much more clear and straight-to-the-point, when learning an API like OpenGL.

    Good to see you back! :)

  • Krolli

    Although it is only my personal opinion, I think many new (OpenGL 3 and higher) concepts are easier to explain using C++ classes and their relations, rather than with sequential C code. Either way, I am looking forward to further additions to this book. :)

  • http://www.facebook.com/krzysztof.abramowicz Krzysztof Abramowicz

    First of all, I’m happy to see you again. The OpenGL Book is an extremely useful source of current information on OpenGL; especially while The OpenGL Programming Guide 8th edition haven’t been released yet, and there are hardly any up-to-date articles or tutorials on that topic.

    According to the poll, I’m a C++ guy and all my project eventually become C++ code. However, the structural approach with C is much more clear and closer to the C-like API and it’s basic concepts. For me, it is a great idea to start from plain C to get acquainted with the API within it’s primary context, and then start big project taking advantage of object-oriented and generic capabilities of C++.

    I suggest to continue The Book as it was started – in C. On the other hand, I would be great to see a few C++ examples in places where implementation may significantly differ, and especially where switching to C++ could explore new uses OpenGL, e.g., by exploring multi-threading or polymorphism.

    Best Regards! :-)

  • Sean

    There’s no particular reason to make the code pure modern C++ rather than just using the C subset that’s compatible with C++.  So far as GLM, I wouldn’t mind seeing it used for the math if it means you can spend more time focusing on the GL API and graphics approaches, so long as there is an appendix (updated as you add chapters) with the derivation and explanation of the math that GLM is doing.

    • Przemysław Lib

       When C is incompatible with C++?
      (mutter* damn I need to learn more *mutter)

  • David Martin

    First, thanks for a great resource, your book has been very helpful getting up to speed on OpenGL.
    My preference would be for more chapters rather than time spent revising the already excellent chapters to use C++.

    If you do choose to revise things to use C++ then please also use GLM.

    • http://www.facebook.com/krzysztof.abramowicz Krzysztof Abramowicz

      I totally agree: chapters written so far are almost perfect – we’re all looking forward to new ones! :-)

  • GrAndSE

    As for me I prefer the C code because it’s more cleaner and easy to understand and include in your own code. Using of C++ requires a lots of additional code to define a classes and declare a function as their members. Also when you trying to put some part from code into you own project you need to rewrite a lot of code the remove links to classes specified.

  • Vasiliy Sheredeko

    Not care about C or C++ calls for OpenGL is pure C, but GLM is excellent idea.

    By the way, deepest appreciation for the first book chapters, it’s realy helpful for me to move from old render pipeline.

  • Mathias

    I’m not using C or C++, I’m doing the tutorials in LWJGL (Java!). How you use the API should be about the same across the board so switching from C to C++ wouldn’t make much difference. I don’t know GLM but as someone trying to learn OpenGL I would rather have you explain only OpenGL and not add in extra helper libraries (the OpenGL Superbible uses extra libraries and that makes it hard for non C/C++ people to follow along).

    If many real world projects use GLM alongside OpenGL, go for it.

  • Optic

    Do we have an update on the next chapters progress?
    Been quite a while since we’ve heard anything :(

  • Rahul Kumar

    I have used your example from Chapter 4 and rewrote it using Qt and GLM.. I can share it with you if you would like to put it up on this site. Please let me know.

  • OpenGLprogrammer

    I want new lessons. Why a long? Author don’t sleep.

  • http://www.protranet.de/opengl-seminare.html OpenGL Seminare


    I have to admit that I visit always your blog to get information about OpenGL.
    Thanks for sharing your articles. I hope to hear from you soon..

  • http://blog.davor.se/ Davor Babic

    I would prefer it if you stick to C. It might be a good idea to drop a hint that “this example will not work if you try to compile it as C++”.