Hello Adam,
Reading your message, it seems to me that you don't have a clear idea of
what you need to do to get to your desired goal. Key phrases like
"obtain ... from somewhere" and "somehow cram..." scream to me that you
need to understand a bit more instead of just going from one site to
another trying to execute a list of steps someone might have posted
somewhere...
First, is there some reason why you want to compile OSG from source?
Version 2.8.3 is very recent, and there are prebuilt packages for Visual
Studio 8 (2005) which you say you use. See:
http://www.openscenegraph.org/projects/osg/wiki/Downloads
And see this page about how to install and use the binary packages:
http://dwightdesign.com/2009/05/installing-openscenegraph-280/
You should have no problem compiling osgOcean with OSG 2.8.3.
If you really want to compile from source, I can't force you not to
(it's what I do personally ;-) ) but using the binary packages would be
easier while you get your feet wet... You can always try to build from
source again later once you've gotten more experience.
------- Read below if you still want to go the source route -------
In order to be able to load png or jpeg images, you need three things:
1. OpenSceneGraph itself (specifically osgDB, but then you'll probably
want to display what was read from the file in which case you need the
rest too ;-) )
2. The OpenSceneGraph plugin for that file type (the osgdb_png.dll you
mentioned, but see below)
3. The plugin's dependencies, which can be needed at compile time and/or
at run time.
OSG and the plugin should be compiled together. Just getting
osgdb_png.dll from some site and putting it in the directory where you
put your compiled OSG DLLs is likely not to work (because the OSG or
compiler versions don't match), or worse, it may seem to work but crash
at random times.
The plugin's dependencies generally consist of includes (headers) and
libraries, which are needed at compile time, and may or may not include
dynamic libraries (DLLs) that will be needed at run time, if applicable.
If you were to compile the dependencies yourself you'd generally have
the choice to build either static or dynamic libraries, but you can
download a package that contains the most frequently used dependencies
for OSG (see link below) and in that package, some dependencies are
static and some dynamic (tiff and jpeg are static, whereas png is
dynamic, for example).
So, now that I've explained all that, I recommend you start over from
scratch. Follow the instructions at
http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio
Get the prebuilt dependencies from here:
http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies
and make sure you follow the directory structure that's suggested in the
PlatformSpecifics/VisualStudio link. If you do, CMake should find your
includes and libs for libpng, libjpeg, libtiff, freetype and other
dependencies that are needed to do anything useful at all with OSG...
And since CMake will find them, the project files it generates will
include these plugins (osgdb_png, osgdb_jpeg, osgdb_freetype, etc.) so
they will be built at the same time as OSG itself.
BTW, make sure you specify the directory where you want OSG to be
installed in the CMAKE_INSTALL_PREFIX variable in CMake, and that once
you've generated the project files, you build the INSTALL project in
both the Debug and Release configurations.
Then you can follow the latter few steps of the tutorial at
http://dwightdesign.com/2009/05/installing-openscenegraph-280/
Steps 1-7 only apply when you install binary packages - you built from
source so they don't apply to you. Step 8 is included in the
PlatformSpecifics/VisualStudio page. You do steps 9+10 to test the OSG
you just compiled, and steps 11+12 to set up a project of your own using
OSG.
Also, since libpng is compiled as a dynamic library in the prebuilt
depdendencies package I linked to above, you'll need to make sure the
program you want to read png images with will be able to get to
libpng13.dll. I recommend just copying it into your OSG bin directory,
i.e. the directory where osgXX-osg.dll, osgXX-osgDB.dll and others live.
At that point, if you want to compile osgOcean, again you should start
with a fresh source tree, start CMake to generate project files and
point it to your freshly compiled OSG. After compiling it, it should
work without any problems.
If you have any more questions, feel free to ask, but as I said at the
start, you should try to understand what you're doing instead of
whizzing from one step to the other trying things that possibly won't work.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org