Thanks for the post, very helpful. I just have some follow-up questions.

Skylark wrote:
> Hello Basil,
> 
> First piece of advice, take things one step at a time, it might seem 
> like a lot but it's all easy once you get through it once.
> 
> Also, you seem to be going at this blind. Do you know about OSG's main site?
> 
> 
> 
> From there, you can follow the Documentation link on the right, and you 
> can click "Getting Started" to get an intro with Linux/Unix-centric 
> build instructions, or you can go to "Platform Specifics" and then 
> "Windows - Visual Studio" to get Windows-specific build instructions. 
> Here's the direct link:
> 
> 
> 
> This is the CMake command-line tool. You seem to be building for Windows 
> (from what you say below) so I recommend you use the CMake GUI because 
> it will give you a list of the available settings you can modify. Until 
> you know what settings you need to modify, the GUI will be a good tool 
> to get your bearings.
> 
> Next, about those libs it says you're missing. You can get a prebuilt 
> dependencies package for Visual Studio 2008 here:
> 
> 
> 
> This will take care of the most important dependencies (IMHO the most 
> important are jpeg, png, gif, etc. to be able to load textures from 
> images, and freetype to be able to load fonts to display text). But all 
> in all, most dependencies are entirely optional. OpenAL, CURL, 
> WxWidgets, Qt, etc fall into that category. If you want to use them, you 
> can download binaries or build them from source, and then enter the 
> relevant paths to includes and libraries in the CMake GUI, but until you 
> know you need a specific dependency, you can assume you don't.
> 

I ran that and am now missing CURL_LIBRARY_DEBUG, FREETYPE_LIBRARY_DEBUG, 
GIFLIB_LIBRARY_DEBUG, GLUT_LIBRARY_DEBUG, JPEG_LIBRARY_DEBUG, 
TIFF_LIBRARY_DEBUG, and ZLIB_LIBRARY_DEBUG. Do you know where I can get these? 
A morning filled with googling and trying to build them myself proved 
fruitless...


> 
> 
> If you downloaded the OSG source, you need to compile the whole OSG, not 
> just an example. Here you're trying to compile an example without having 
> compiled OSG itself, so of course it won't find the libraries. This is 
> what I mean when I say to take things one step at a time. You're 
> skipping whole steps by opening one specific example's project file.
> 
> So, one step at a time.
> 
> 1. Open the CMake GUI
> 
> 2. Drag and drop the root CMakeLists.txt (in the root of your OSG source 
> tree) onto the CMake GUI window. This will fill the "where is the 
> source" and "where to build the binaries" fields, though I recommend you 
> change the "where to build the binaries" to some other directory so you 
> don't pollute your source tree. I generally add "/build_x86_vc9" or 
> something like that to identify which platform/compiler combination I'm 
> generating project files for.
> 
> 3. Click Configure a first time. CMake will ask you whether you want to 
> create the build directory if it doesn't yet exist, then it will ask you 
> for which platform/compiler you want to generate. I assume you'll want 
> to select "Visual Studio 9 (2008) (x86)" or something like that.
> 
> 4. You'll notice the center part of the window will be full of red 
> fields. First thing to change is to set "ACTUAL_3RDPARTY_DIR" to the 
> directory where you've put the prebuilt dependencies I linked to above. 
> Then you can click Configure again, CMake will try to find as many of 
> the dependencies as it can by itself.
> 


this would just be /OpenSceneGraph/bin correct?


> 
> 
> 5. At this point you can change settings as you see fit. Make sure you 
> show Advanced Settings at the top of the CMake window, otherwise some 
> important settings may be hidden, it's an annoying quirk of CMake. If 
> CMake didn't find some dependency you know you have, you can fill in its 
> *_INCLUDE_DIR and *_LIBRARY fields so it will be used. You can check 
> BUILD_EXAMPLES if you want it to generate project files for all the 
> examples. Look over the other options you have, but in the end you can 
> just click Configure until there are no red fields anymore.
> 
> I highly recommend you set CMAKE_INSTALL_PREFIX to some directory in 
> which you want to put your compiled binaries, again separate from your 
> source and build trees. That way you're sure where the different things 
> are, and you won't get files mixed up between the 3. The directory you 
> specify in CMAKE_INSTALL_PREFIX is the one you'll eventually use when 
> you want to develop an application that uses OSG - it will have an 
> include, a lib, and a bin subdirectories containing the files you expect.
> 
> 6. Click Generate. After a few seconds, it will have finished generating 
> the project files, and you can close the CMake GUI.
> 
> 7. Open the build directory you specified in "where to build the 
> binaries" in CMake, and you'll see an "OpenSceneGraph.sln" file. 
> Double-click that, and you'll see a solution file with a bunch of 
> projects, first for the OSG libs themselves, and all the examples, 
> applications, plugins etc. You can then select either Debug or Release, 
> right-click the INSTALL project and select Build.
> 
> That will start building OSG itself, the plugins, the applications and 
> the examples. Once all that is built, it will copy the relevant files 
> into the directory you specified in CMAKE_INSTALL_PREFIX.
> 
> You can, from that solution, open up one of the examples' source code 
> and experiment.
> 
> Chris mentioned the OpenSceneGraph Quick Start Guide, which you can find at
> 
> 
> 
> and is free to download as a PDF. It's a quick read and will give you a 
> good start. If you want a printed book, you can check out the 
> OpenSceneGraph Beginner's Guide at
> 
> 
> 
> The OSG web site has some tutorials, but unfortunately I find it's hard 
> to navigate and some tutorials are out of date. But you should still 
> have a look as you'll find some good info and explanations. The examples 
> that come with the source are great for learning, as long as you're 
> comfortable reading code. :-)
> 
> I think OSG is a good abstraction over OpenGL concepts. If you want a 
> lightweight framework you could make your own, but among the current 
> OpenGL-based frameworks I think it's hard to find something better than 
> OSG. It's a matter of taste though, try it out and see... What do you 
> expect us to say, you ask this question on a mailing list called 
> osg-users! :-)
> 
> Hope this helps, and if you have any more questions just ask!
> 
> J-S
> 


Thanks for the reply. I will take a look at the tutorials. I'm not trying to 
offend why my question on OSG. I'm not really doing anything super intensive. I 
wrote a C++ application to cluster 3d space trajectories, and I just want to 
output the generated clusters (from a plain text file).  I don't wanna be doing 
overkill on this, I just want something quick and easy I suppose.

Thanks once again.

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to