Hello Jeremy,

I know it's been a while since the call was put out to start testing osgHUD, but
I've only recently been able to get around to it (eventual company needs also
motivated this of course!).

>From SVN updated today, here are the changed files to get it to compile
correctly on Windows.

First of all, some changes were needed to the CMakeLists.txt.
- Need to link to the OpenThreads library.
- Need to link to opengl32.lib or else the OpenGL symbols are not found.
- Need a define of OSG_LIBRARY so that the OSG_EXPORT stuff works. This needs
  to be defined *only* for the lib (osgHUD), not the examples, which is why I
  put it after the ADD_SUBDIRECTORY commands.
- Also, I added a second INSTALL line which will copy the DLL into the bin
  directory, only for Windows.
- I decided to group all the Win32 stuff together at the end of the file,
  since the define needs to be at the end, and for the rest it doesn't matter
  where it is in the file.

In the includes, I only had to remove OSG_EXPORT from one class. It seems it
causes problems for template classes. I don't know the details, only that there
was a linker error with OSG_EXPORT and removing it fixed it. I also checked the
OSG for this, for example TemplateArray, and there's no OSG_EXPORT there
either, so I guess it's OK. Perhaps someone else can fill us in on the details.

In src, I just fixed a couple warnings (using an int as a bool, and using
multiple '==' comparisons stringed together). You could choose not to merge
those, but I always prefer to fix warnings when possible, even when it's one
compiler's misguided warnings. Less visual noise in compiles that way.


Now, these changes get it to compile and link with 0 errors and 0 warnings for
me. As a general comment, it might be nice to adopt the OSG convention of
adding 'd' to libs, DLLs and executables when compiled in debug mode. Though
this requires a bit more CMake skills than I think I have, I'll try to submit
something for that soon.


The next step is actually running it... First of all, is there somewhere I can
download the images you use for your examples? And second of all, I'm getting
an std::bad_alloc when I run anything other than osghudversion, so I'll try to
dig into that a bit more tomorrow.

BTW, osghudversion prints

  OpenSceneGraph HUD Library ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦

is that normal?

Anyways, from your videos and the discussion here this really seems like osgHUD
is on the path to becoming a really useful nodekit. I hope I can help in some
small way. Good work.

J-S
--
______________________________________________________
Jean-Sebastien Guay     [EMAIL PROTECTED]
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to