Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-18 Thread Jean-Sébastien Guay

Hi Adam,


Got osgOcean (oceanExample) to work finally (yeah!) [Well, sort of as I am 
still having issues with the SkyDome not showing up].


Good to know you got your compilation and runtime issues worked out.

The skydome is loaded from images, so two obvious causes for it not 
working would be that it can't find the images, or that it can't load 
them once they're found. So set OSG_NOTIFY_LEVEL=DEBUG and see if it can 
find + load the images.


As I recall, it tries to find the images (and other resources) in a path 
relative to your current working directory when you run the 
oceanExampleé Perhaps you need to switch to the osgOcean directory (that 
has resources/ under it) before running it?


Good luck,

J-S
--
__
Jean-Sebastien Guayjean-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


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-18 Thread Adam Smith
Hi J-S,

Got osgOcean (oceanExample) to work finally (yeah!) [Well, sort of as I am 
still having issues with the SkyDome not showing up].  

As for the PNG file problem, seems there are some issues with the debug 
libraries I was using.

I appreciate your guidance as it was critical in getting me to this point.  I 
will now try to dig in deeper to become more knowledgable (and helpful to 
others!).

Thanks again.

Regards,

Adam

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29140#29140





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-14 Thread Adam Smith
Hi J-S,

As always, thank you for your helpful feedback.  I had downloaded this tool 
awhile ago and forgot I had it!! :-* 

Anyhow, your suggestion is a good one.  Let me see if that is the problem...

Will let you know.

Cheers,
Adam

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28902#28902





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-14 Thread Jean-Sébastien Guay

Hi Adam,


I still have a bit of a problem however, as I am still unable to run the 
osgOcean example.  I encounter:

DynamicLibrary::failed loading "osgPlugins-2.8.3/osgdb_png.dll"

(and then of course the subsequent "Could not find plugin..." messages).I'm 
baffled as to why it can't load but since the precompiled osgViewer code reads png files 
fine, I still have setup issue.

Perhaps the osgdb_png.dll dependencies are not all being found?   I am still 
working on it and I will prevail but I thought I'd update you folks.


That message generally means that it can find osgdb_png.dll itself, but 
can't load it for some reason. It's generally because it can't find its 
own dependencies (as you thought). So make sure libpng13.dll is on your 
PATH too (or just copy it to your OSG\bin directory alongside 
osgXX-osg.dll, osgXX-osgDB.dll, etc.


Another possibility is that it's finding libpng13.dll from some other 
program that's on your path before it can find the one in your OSG 
directory. That happened to me, an IM client called Pidgin had put 
itself on the PATH ahead of OSG and its version of libpng13.dll was 
being picked up, but it didn't match the version I had compiled 
osgdb_png.dll with so it couldn't load it. A tool that might help you 
see if this is your situation is Dependency Walker - download it, drag 
and drop the oceanExample.exe onto it, and then run it. Then find 
libpng13.dll in the window and it will tell you from which directory it 
has tried to load it, and you'll know if it's not the right one.


Hope this helps,

J-S

--
__
Jean-Sebastien Guayjean-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


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-14 Thread Adam Smith
Hi J-S ,

I started over went through the process you have pointed me towards and it is 
certainly a lot easier than building from source.  I made it much further 
quicker.   Thank you.

I still have a bit of a problem however, as I am still unable to run the 
osgOcean example.  I encounter:

DynamicLibrary::failed loading "osgPlugins-2.8.3/osgdb_png.dll" 

(and then of course the subsequent "Could not find plugin..." messages).I'm 
baffled as to why it can't load but since the precompiled osgViewer code reads 
png files fine, I still have setup issue.   

Perhaps the osgdb_png.dll dependencies are not all being found?   I am still 
working on it and I will prevail but I thought I'd update you folks.


Stay tuned part II :? 

Cheers,
Adam

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28899#28899





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Adam Smith
J-S,

Will definitely let you know! :D   I am working on it as we speak.  Thanks 
again and stay tuned


Cheers,
Adam

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28804#28804





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Jean-Sébastien Guay

Hello again Adam,


I need to take the extra time to understand what I am doing.


Just a note: it usually takes less time when you take it step by step 
and make sure you're doing it right, than when you just try tinkering 
until you get it right. This is true for anything, and I also have to 
watch myself sometimes. Whenever I'm writing shaders and I notice I'm 
tinkering with the code to get it to work, I force myself to take a step 
back and perhaps work things out on paper, and it's always helpful.



There is no need for me to compile from source, I just didn't know any better.


That's what I thought ;-)

Go with the binary packages, it'll be easier to get up and running, and 
you'll get results up on your screen faster, which will motivate you to 
go on with learning even more!



And I used 2.9.7 because is seemed like the latest version but 2.8.3 is fine.


The OSG release cycle is kind of like the Linux kernel: the second 
number in the version number is even for stable releases, and odd for 
development versions. So 2.9.x are the development versions on the road 
to 2.10 (or 3.0), and 2.8.3 is the latest stable release. Unless you 
really need the features / bug fixes in the development versions, you 
can stick to the stable releases. Besides, the development versions are 
kind of bleeding edge, so you might run into other problems along the way.


Oh, and you can usually switch back and forth between stable / 
development at will. So if in the future you want to compile a 
development version from source, your application's code shouldn't have 
to change much to work with the new OSG version.



You have expended a considerable amount of time and effort in crafting your 
response.  I GREATLY  appreciate your efforts


It's my pleasure, I enjoy helping the people on this mailing list since 
I think the community that exists around OSG is one of its strong 
points. And whenever I have questions others are always ready to help me 
too.



I will start over and try to ensure I know what is going on at each step.


I think that's the way to go. Let us know how it goes!

J-S
--
__
Jean-Sebastien Guayjean-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


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Adam Smith
J-S,

You are correct.  Other than getting my osgOcean demo to work, I am not clear 
on what I need to do.  I only have a vague idea of the build environment and 
can generally get things to work by tinkering(hacking).   This, fueled by a 
lack of patience on my part always ends in frustration and exhaustion. I need 
to take the extra time to understand what I am doing.

There is no need for me to compile from source, I just didn't know any better.  
As I am trying to become "competent", perhaps I need to take smaller steps 
before jumping in this world.   And I used 2.9.7 because is seemed like the 
latest version but 2.8.3 is fine.

You have expended a considerable amount of time and effort in crafting your 
response.  I GREATLY  appreciate your efforts so for my part,  I will do as you 
say: I will start over and try to ensure I know what is going on at each step.  
It will take the time to view each link you have provided and "hopefully" I 
will be a more enlightened 8)  osg person at the end of it. ;) 

Back to the drawing board for me and thanks yet again for your help!!!  Wish me 
luck


Cheers,
Adam

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28800#28800





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Jean-Sébastien Guay

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 Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
__