From: Nigel S. <nig...@gm...> - 2014-12-24 06:17:45
|
I'd simply say that it violates the long established C ABI, requires recompiling the universe that depends on it, requires a C++ compiler, and a C++11 compiler, at that. (C++ runtime library dependency too, presumably) On the other hand, I'd be more than happy to use it in preference to function pointers. But I'd be amazed for FreeGLUT to suddenly break the ABI and be a C++ thing all of a sudden. I think a serious investigation needs to be made of reimplementing this as an optional wrapper. - Nigel On Dec 24, 2014 4:54 PM, "Diederick C. Niehorster" <dc...@gm...> wrote: > Hi Nigel, > > This pull request is not aiming to be a full featured wrapper, it is > simply to make it (optionally) easier (possible!) to use anything > other than static function pointers as callbacks when using FreeGLUT > in C++ code. As the changes are lightweight, and the new support > optional, I think this is a good aim and something within the scope of > FreeGLUT (others maybe feel differently, please voice your opinions!). > > Sepehr, thanks a lot for the hard work. It looks interesting, and > workable. Working pretty much exclusively with windows myself, its > hard to help you test. Though i do have this ubuntu vm around > somewhere... > > More importantly, some comments on the pull request: > - i see a lot of whitespace changes, please avoid those. I know the > freeglut source mixes tabs and spaces, but please stick with what the > surrounding code does when you edit, not convert everything to tabs. > You'll have to switch off the MSVC auto formatting for that. > - some of the changes should perhaps be separate pull requests. I saw > one case where you had to add a missing header (right indeed). There > are also many changes where you indicate the type to cast to before > the cast instead of just assigning a void* to any other pointer. I > believe this is good practice, and something that we should do anyway. > Could you split that off too? > - that way, all thats left in this pull request is the changes to > directly implement the C++ mode for state aware callbacks. > > I'll test when things are separated and cleaned up, and will probably > merge the other two pull requests immediately. > > Best and thanks! > Dee > > On Wed, Dec 24, 2014 at 9:13 AM, Nigel Stewart <nig...@gm...> > wrote: > > Oh, I should also express my enthusiasm for using a cxx11 FreeGLUT > wrapper! > > (But I still need a c-only FreeGLUT for all the stuff that is already > > working) > > > > -Nigel > > > > On Dec 24, 2014 12:09 PM, "Nigel Stewart" <nig...@gm...> wrote: > >> > >> My initial impression is that a C++11 oriented FreeGLUT ought to be a > >> wrapper, rather than integrated directly into a C codebase in this > >> disruptive kind of manner. Think of refactoring this into a header-only > >> freeglut_cx11.hpp or similar. > >> > >> - Nigel > >> > >> On Dec 24, 2014 5:10 AM, "S Laal" <sep...@gm...> wrote: > >>> > >>> Hello everyone, > >>> > >>> A while ago I opened an issue on Freeglut's Github fork and stated my > >>> purpose of implementing state-aware C++11 callbacks and I finished > >>> implementing it on Windows. You can view the implementation here: > >>> https://github.com/sepehr-laal/FreeGLUT/tree/state_aware_callbacks > >>> > >>> Since Freeglut is supporting a broad range of target platforms, I do > not > >>> have the ability to test out all of those. So I was wondering if you > guys > >>> can help me out to get this feature finalized. > >>> > >>> -- > >>> > >>> Sepehr Laal /* C++ developer, Downstream, Portland, OR */ > >>> [](auto o, auto e) { > >>> o << "Mobile " << "+1 (541) 556 6064" << e; > >>> o << "Desk " << "+1 (503) 496 7295" << e; > >>> }(std::cout, std::endl); > >>> > >>> > >>> > >>> > ------------------------------------------------------------------------------ > >>> Dive into the World of Parallel Programming! The Go Parallel Website, > >>> sponsored by Intel and developed in partnership with Slashdot Media, is > >>> your > >>> hub for all things parallel software development, from weekly thought > >>> leadership blogs to news, videos, case studies, tutorials and more. > Take > >>> a > >>> look and join the conversation now. http://goparallel.sourceforge.net > >>> _______________________________________________ > >>> Freeglut-developer mailing list > >>> Fre...@li... > >>> https://lists.sourceforge.net/lists/listinfo/freeglut-developer > >>> > > > > > ------------------------------------------------------------------------------ > > Dive into the World of Parallel Programming! The Go Parallel Website, > > sponsored by Intel and developed in partnership with Slashdot Media, is > your > > hub for all things parallel software development, from weekly thought > > leadership blogs to news, videos, case studies, tutorials and more. Take > a > > look and join the conversation now. http://goparallel.sourceforge.net > > _______________________________________________ > > Freeglut-developer mailing list > > Fre...@li... > > https://lists.sourceforge.net/lists/listinfo/freeglut-developer > > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Freeglut-developer mailing list > Fre...@li... > https://lists.sourceforge.net/lists/listinfo/freeglut-developer > |