[osg-users] Fwd: [MailServer Notification]Wyle Laboratories, Inc. Attachment Blocking Notification

2007-07-05 Thread Harash Sharma
Hi Mr. Robert,
   
 I don't know why the attachment is being blocked in zip format. Is there 
any other way out.
   
  Harash

Note: forwarded message attached.

 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.---BeginMessage---
Per Wyle Laboratories, Inc. network security policy, an e-mail containing an 
attachment named osgDistortionMod.zip has been blocked and quarantined on 
7/5/2007 7:44:06 AM.

Message details:
Sender: [EMAIL PROTECTED];
Recipient:osg-users@openscenegraph.net;
Subject:Re: [osg-users] RenderToTexture Bug?
Attachment name:osgDistortionMod.zip
---End Message---
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

RE: [osg-users] New OSG website ideas

2007-07-05 Thread Harash Sharma
Hi Martin,
   
  I have a suggestion for the osg-users mail archives. Presently if I am 
not wrong, the mail archives are maintained monthwise and for a particular 
month we can organize the list threadwise or date wise. Having used this 
facility, I feel that there should be some sort of a search facility like 
Google desktop where if I give a particular keyword or a set of keywords, it 
should search the whole of archive and yield all the threads pertaining to the 
query. This would help the users who face some problems that have already been 
discussed in the forum earlier. I generally do this using Google itself, but 
then it also gives a huge list of  sites other than OSG. 
   
  Regards
   
  Harash

Schmidt, Richard, SDGE1 [EMAIL PROTECTED] wrote:
  Introduce osgForum (phpBB) and a modern wiki (mediawiki).

For phpBB, I think there a extensions for mailingslists as well as
extensions to use a subforum as the newspage.

Richard

Hi Guys,

Over the next couple of weeks I'm going to doing a complete revamp of 
the OpenSceneGraph website and we would really like some input from 
the community as to what you think the site needs, suggestions of 
areas that you think need rethought and improved and any examples of 
other projects that you think have great websites that we can take 
ideas from :-)

Look forward to hearing from you!

Kind Regards,
Martin
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


 
-
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] RenderToTexture Bug?

2007-07-04 Thread Harash Sharma
Hi Robert,
   
  I was trying the luminance component drawing and came across a strange 
problem. 
   
  1.   An osgViewer::View object is added to osgViewer::CompositeViewer. 
  2.   The GraphicsContext is created using createGraphicsContext for given 
traits.
  3.   Used View::GetCamera()-setGraphicsContext 
   
   
  Under the following three conditions, the RTT camera created, actually draws 
to the screen and to the texture attached:
   
  1. Texture Internal Format set to GL_LUMINANCE 
  2. Texture Rendering Camera Viewport set.
   
  I modified the osgDistortion Example to incorporate the above requirements 
and was able to reproduce the problem -- Monochrome Scene rendered in specified 
viewport and Colored scene rendered at (0,0) with the size equal to the 
specified texture size. The moment I make the Texture Internal format GL_RGBA, 
everything becomes normal. The same happens if I remove the association of 
GraphicsContext with View (removing the createGraphicsContext statement itself).
   
   I don't know if this really is a bug or something wrong in my 
understanding. I am really very sorry for troubling you in your busy schedule 
every now and then. I really appreciate your sound support. Please bear with 
me. Thanks
   
   
  Regards
   
  Harash 
   


   
-
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] RenderToTexture Bug?

2007-07-04 Thread Harash Sharma
Hi Robert, 
   
  Tomorrow morning I will send it to you.
   
  Regards
   
  Harash

Robert Osfield [EMAIL PROTECTED] wrote:
  Hi Harash,

Could you please send a modified example that reproduces this problem.

Robert.

On 7/4/07, Harash Sharma wrote:
 Hi Robert,

 I was trying the luminance component drawing and came across a strange
 problem.

 1. An osgViewer::View object is added to osgViewer::CompositeViewer.
 2. The GraphicsContext is created using createGraphicsContext for given
 traits.
 3. Used View::GetCamera()-setGraphicsContext


 Under the following three conditions, the RTT camera created, actually draws
 to the screen and to the texture attached:

 1. Texture Internal Format set to GL_LUMINANCE
 2. Texture Rendering Camera Viewport set.

 I modified the osgDistortion Example to incorporate the above requirements
 and was able to reproduce the problem -- Monochrome Scene rendered in
 specified viewport and Colored scene rendered at (0,0) with the size equal
 to the specified texture size. The moment I make the Texture Internal format
 GL_RGBA, everything becomes normal. The same happens if I remove the
 association of GraphicsContext with View (removing the createGraphicsContext
 statement itself).

 I don't know if this really is a bug or something wrong in my
 understanding. I am really very sorry for troubling you in your busy
 schedule every now and then. I really appreciate your sound support. Please
 bear with me. Thanks


 Regards

 Harash



 
 Park yourself in front of a world of choices in alternative vehicles.
 Visit the Yahoo! Auto Green Center.


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


 
-
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] RenderToTexture Bug?

2007-07-04 Thread Harash Sharma
Hi Robert, 
   
  Tomorrow morning I will send it to you.
   
  Regards
   
  Harash

Robert Osfield [EMAIL PROTECTED] wrote:
  Hi Harash,

Could you please send a modified example that reproduces this problem.

Robert.

On 7/4/07, Harash Sharma wrote:
 Hi Robert,

 I was trying the luminance component drawing and came across a strange
 problem.

 1. An osgViewer::View object is added to osgViewer::CompositeViewer.
 2. The GraphicsContext is created using createGraphicsContext for given
 traits.
 3. Used View::GetCamera()-setGraphicsContext


 Under the following three conditions, the RTT camera created, actually draws
 to the screen and to the texture attached:

 1. Texture Internal Format set to GL_LUMINANCE
 2. Texture Rendering Camera Viewport set.

 I modified the osgDistortion Example to incorporate the above requirements
 and was able to reproduce the problem -- Monochrome Scene rendered in
 specified viewport and Colored scene rendered at (0,0) with the size equal
 to the specified texture size. The moment I make the Texture Internal format
 GL_RGBA, everything becomes normal. The same happens if I remove the
 association of GraphicsContext with View (removing the createGraphicsContext
 statement itself).

 I don't know if this really is a bug or something wrong in my
 understanding. I am really very sorry for troubling you in your busy
 schedule every now and then. I really appreciate your sound support. Please
 bear with me. Thanks


 Regards

 Harash



 
 Park yourself in front of a world of choices in alternative vehicles.
 Visit the Yahoo! Auto Green Center.


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


   
-
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] RenderToTexture Bug?

2007-07-04 Thread Harash Sharma
Hi Robert, 
   
 As per your directions, I am sending the modified osgDistortion example to 
you. The file osgDistortionMod.cpp contains the modifications made and some 
of the parts of the program that were not required (I focussed only on the 
createDistortionSubgraph function) are commented out. To improve the program 
readability, osgDistortionMod_Trim.cpp has all these portions deleted.
   
 Sir, I was wondering if the drop in framerate when attaching an image 
instead of the texture itself may possibly be interlinked in some way to the 
above problem. Hence those modifications are also made but commented in the 
above program. 
   
I am using Visual C++ 8.0 to build the program -- Windows XP x64 OS, Intel 
Xeon Dual Core Processor, 8GB ECC FB RAM and nVidia Quadro FX4500 graphics card.
   
I am very grateful to you for sparing your precious time on my problem. 
Thank you very much.
   
  Regards,
   
  Harash Sharma.
  

[EMAIL PROTECTED] wrote:
Hi Robert, 
   
  Tomorrow morning I will send it to you.
   
  Regards
   
  Harash

Robert Osfield [EMAIL PROTECTED] wrote:
  Hi Harash,

Could you please send a modified example that reproduces this problem.

Robert.

On 7/4/07, Harash Sharma wrote:
 Hi Robert,

 I was trying the luminance component drawing and came across a strange
 problem.

 1. An osgViewer::View object is added to osgViewer::CompositeViewer.
 2. The GraphicsContext is created using createGraphicsContext for given
 traits.
 3. Used View::GetCamera()-setGraphicsContext


 Under the following three conditions, the RTT camera created, actually draws
 to the screen and to the texture attached:

 1. Texture Internal Format set to GL_LUMINANCE
 2. Texture Rendering Camera Viewport set.

 I modified the osgDistortion Example to incorporate the above requirements
 and was able to reproduce the problem -- Monochrome Scene rendered in
 specified viewport and Colored scene rendered at (0,0) with the size equal
 to the specified texture size. The moment I make the Texture Internal format
 GL_RGBA, everything becomes normal. The same happens if I remove the
 association of GraphicsContext with View (removing the createGraphicsContext
 statement itself).

 I don't know if this really is a bug or something wrong in my
 understanding. I am really very sorry for troubling you in your busy
 schedule every now and then. I really appreciate your sound support. Please
 bear with me. Thanks


 Regards

 Harash



 
 Park yourself in front of a world of choices in alternative vehicles.
 Visit the Yahoo! Auto Green Center.


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


-
  Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! 
Search.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


   
-
Pinpoint customers who are looking for what you sell. /* OpenSceneGraph example, osgdistortion.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the Software), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/

#include osg/GLExtensions
#include osg/Node
#include osg/Geometry
#include osg/Notify
#include osg/MatrixTransform
#include osg/Texture2D
#include osg/Stencil
#include osg/ColorMask
#include osg/Depth
#include osg/Billboard
#include osg/Material
#include osg/Projection
#include osg/TextureCubeMap
#include osg/io_utils


#include osgGA/TrackballManipulator
#include osgGA/FlightManipulator
#include osgGA/DriveManipulator
#include osgGA/KeySwitchMatrixManipulator
#include osgGA/StateSetManipulator
#include osgGA/AnimationPathManipulator
#include osgGA/TerrainManipulator

#include osgUtil/SmoothingVisitor

Re: [osg-users] Luminance Component Drawing / Camera Defocussing effect

2007-07-03 Thread Harash Sharma
Hi Mr. Robert. 
   
 Thanks for the guidance on this issue. I have gone through the 
osgDistortion example and was able to render the monochrome image. But my 
requirement to process the captured image remained as it is. What I tried was:
  1. Two Cameras were created -- one that renders the scene to a texture, and a 
second one that renders the texture on to the screen. 
   
 But in this case, the accessibility to the image was not available. Next I 
attached an image object to the rendering camera. This image was set as the 
texture image and used by the second camera to render the processed image on to 
the screen. Camera-setPostDrawCallback was used to grab the image at every 
frame. When I did this, to my amazement, the framerate dropped from around 70 
fps to 1 fps. 
   
 I don't know if what I am doing is proper. If so, then is this drop in 
framerate expected. I am using 1024x1024 image size and to test I have applied 
no processing at all. 
   
Further, I am using a osgViewer::CompositeViewer. In this I want to have 2 
views -- one that renders the usual colored scene while the other one that 
displays the processed monochrome scene. I am able to create the two views, but 
would like to take your guidance as to how to dynamically make one of them 
active while disabling the other one. 
   
 Thanks in advance.
   
  Regards
   
  Harash
   
 

   
-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. ___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Luminance Component Drawing / Camera Defocussing effect

2007-07-03 Thread Harash Sharma
Hi Mr. Robert,
   
  I understand your plausibility of time, but at least can you indicate if 
the reduction in frame rate to 1fps when rendering to an image expected.
   
 Thanks
   
  Regards
   
  Harash

Robert Osfield [EMAIL PROTECTED] wrote:
  Hi Harash,

I'm afraid I can't walk you through this, I have time to point you in
the direction but no more than this.

Robert.

On 7/3/07, Harash Sharma wrote:
 Hi Mr. Robert.

 Thanks for the guidance on this issue. I have gone through the
 osgDistortion example and was able to render the monochrome image. But my
 requirement to process the captured image remained as it is. What I tried
 was:
 1. Two Cameras were created -- one that renders the scene to a texture, and
 a second one that renders the texture on to the screen.

 But in this case, the accessibility to the image was not available. Next
 I attached an image object to the rendering camera. This image was set as
 the texture image and used by the second camera to render the processed
 image on to the screen. Camera-setPostDrawCallback was used to grab the
 image at every frame. When I did this, to my amazement, the framerate
 dropped from around 70 fps to 1 fps.

 I don't know if what I am doing is proper. If so, then is this drop in
 framerate expected. I am using 1024x1024 image size and to test I have
 applied no processing at all.

 Further, I am using a osgViewer::CompositeViewer. In this I want to have 2
 views -- one that renders the usual colored scene while the other one that
 displays the processed monochrome scene. I am able to create the two views,
 but would like to take your guidance as to how to dynamically make one of
 them active while disabling the other one.

 Thanks in advance.

 Regards

 Harash



 
 Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games.


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Altitude information at any point (X,Y) on the terrain

2007-06-27 Thread Harash Sharma
Hi Mr. Robert, 
   
  Thanks a lot. Your help on drawing Luminance image was immense and the 
pointer to appropriate examples has helped me a lot. Through your help I was 
ultimately able to render monochromatic scene. Once again thanks a lot.
   
  Next I was trying to make a vehicle move on the terrain. The terrain as 
well as vehicle exist in the OpenFlight format. I am able to load and render 
both. My problem is that I want to access the altitude information of the 
terrain at any point (X,Y), so that I can precisely place the vehicle at that 
point, along with associated normal. One method that comes to my mind is to use 
the line segment intersector for the line (X, Y, MaxAltitude) - (X, Y, 0) and 
get the appropriate plane information.
   
 Is there any other direct method or if you can suggest an appropriate 
example.  
   
  Regards
   
  Harash
   

   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Luminance Component Drawing / Camera Defocussing effect

2007-06-25 Thread Harash Sharma
Hi All,
   
  I have a very simple query. I have a 3D Scene that I want to render as 
monochrome image. In openGL I used to achieve this as follows:
1. Render the scene in RGB color
2. Use GL_LUMINANCE pixel format with glReadPixels to read the monochrome 
image,
3. Put back this Buffer using glDrawPixels.

Do I have to follow the same route in OSG or is there any mechanism using 
which I can directly render the Luminance component. 
   
Another doubt. Is there any construct to model the defocussing / blurring 
effect of a camera or do we have to apply the same Image Processing techniques 
(applying a Gaussian filter on the captured image) to model these. 
   
  I am sorry if the queries are too simplistic, but OSG is so vast that it 
is difficult to know everything in a short duration, since I am still a novice 
and at the same time I don't want to redo something. 
   
  Regards
   
  Harash

   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Trouble with text font loading

2007-06-21 Thread Harash Sharma
Hi all,
   
 I was trying out the osgText based text rendering and noticed the 
following error in console window : 
 { Could not find plugin to read objects from file Fonts/Arial.ttf }
   
 The text gets rendered but has a different font. I further tried the 
osgText Example. It too gives the same error. Also the text rendered has a low 
resolution. The 3 texts rendered with different resolutions appear to be alike. 
   
  Can you please suugest some solutions. I am using VS 8.0 on WinXP x64 OS.
 Thanks in advance.
   
  Regards
   
  Harash
   

 
-
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Trouble with text font loading

2007-06-21 Thread Harash Sharma
Hi Robert,
   
  Thanks for the reply. I will apply your suggestions first thing in the 
morning. 
  Meanwhile, I checked up the cause. I had earlier downloaded 
3rdParty_Win32binaries_2005_05_10.zip  tarball file containing the prepackaged 
binaries as I wanted to keep the dependencies separate from the OSG. Going 
through the files I found that the Zip file contains 3 directories: lib, 
include and bin. Even though the lib and include directories contain the 
freetype files, the bin folder does not have the FreeType DLL file. I think it 
may just have slipped out. 
   
 Once again Thanks a lot
   
  Regards
   
  Harash

Robert Osfield [EMAIL PROTECTED] wrote:
  Hi Harash,

You need to have compiled the freetype plugin to be able to read true
type text, the blocky font is a fallback for when the freetype plugin
isn't available.

Mike Weiblen's 3rd party dependency package has freetype in it. Just
place the dependency package alongside the OpenSceneGraph source
package and re-run CMakeSetup.

Robert.

On 6/21/07, Harash Sharma wrote:
 Hi all,

 I was trying out the osgText based text rendering and noticed the
 following error in console window :
 { Could not find plugin to read objects from file Fonts/Arial.ttf }

 The text gets rendered but has a different font. I further tried the
 osgText Example. It too gives the same error. Also the text rendered has a
 low resolution. The 3 texts rendered with different resolutions appear to be
 alike.

 Can you please suugest some solutions. I am using VS 8.0 on WinXP x64
 OS.
 Thanks in advance.

 Regards

 Harash


 
 Finding fabulous fares is fun.
 Let Yahoo! FareChase search your favorite travel sites to find flight and
 hotel bargains.


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


 
-
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] OpenSceneGraph-2.0 released!!!

2007-06-16 Thread Harash Sharma
Hi all
   
A Hearty Congratulations to Robert and all the others who have contributed 
towards OSG 2.0. 

  regards
   
  Harash.
  
Robert Osfield [EMAIL PROTECTED] wrote:
  Hi All,

I am delighted to announce the OpenSceneGraph-2.0!

Binaries for OSX have already been uploaded. Binaries for other
platforms are pending.

Press release:
http://www.openscenegraph.com/osgwiki/pmwiki.php/News/News

Downloads:
http://www.openscenegraph.com/osgwiki/pmwiki.php/Downloads/Downloads

SVN tag
http://www.openscenegraph.com/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.0

OpenSceneGraph-Data has also been updated for the release:
http://www.openscenegraph.com/osgwiki/pmwiki.php/Downloads/SampleDataset

Contributors:
http://www.openscenegraph.com/osgwiki/pmwiki.php/Contributors/TwoPointZero

Many many thanks to all those who have contributed to the project over
the years, this release is the culmination of all these hard work.

Have fun!! ;-)

Robert Osfield.
OpenSceneGraph Project Lead.
15th June 2007.

---
OpenSceneGraph 2.0 release improves ease-of-use and scalability,
introducing new osgViewer, osgShadow and osgManipulator libraries, new
build system, improved multi-core, multi-GPU support.

PERTHSHIRE, Scotland - 15th June 2007 - OpenSceneGraph Professional
Services announces the release of OpenSceneGraph 2.0, the industry's
leading open-source scene graph technology, designed to accelerate
application development and improve 3D graphics performance.
OpenSceneGraph 2.0, written entirely in Standard C++ and built upon
OpenGL, offers developers working in the visual simulation, game
development, virtual reality, scientific visualization and modeling
markets a real-time visualization tool which rivals established
commercial scene graph toolkits in functionality and performance.
OpenSceneGraph 2.0 runs on all Microsoft Windows platforms, Apple
OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating
systems.

Open-source development delivers industry-leading features and performance
The OpenSceneGraph 2.0 release is the culmination of 8 years of work
by the lead developers and the open-source community that has grown up
around the project. The real-time graphics industry and academia
embraced it from the very beginning, deploying it in real-world
applications, and actively participating in its development, testing
and refinement. The end result is a high-quality library with a
feature set relevant to application developers' needs.

The theme for the 2.0 release has been making the OpenSceneGraph
easier to use, yet more flexible and powerful.

Features include:

* New unified build system using CMake, which simplifies the build
process, automatically detecting installed dependencies and providing
build configuration as well as support for a wide range of development
tools.
* New libraries:
o osgViewer - provides native windowing support and viewer
functionality that scales from a single view embedded in a window to
multi-thread, multi-gpu, multi-screen viewers and can handle multiple
scene graphs at one time. The new viewer architecture also provides
support for novel display systems that require distortion correction,
such as hemispheres and full domes as well as power-walls and CAVEs.
It replaces the osgProducer/Producer combo as viewer toolkit.
o osgManipulator - provides a set of interactive
manipulators for scaling, rotating and moving objects in the scene.
o osgShadow - provides an extensible framework for adding
dynamic shadows to your scene.
* New low-level extensible intersection framework that includes
support for line, plane and polytope intersections.
* New high-level intersection classes that support paged
databases, LineOfSight, HeightAboveTerrain and ElevationSlice.
* View-dependent overlay - provides ability to overlay text,
country boundaries etc. directly on to terrain, even paged databases.
* Plugins
o Improvements to the OpenFlight, COLLADA, AC3D, DDS plugins
and many more
o New TXF texture font reader.
o New VRML2 reader (using the OpenVRML library).
* Easier 3rd party windowing integration
o With examples showing integration with GLUT, SDL, Qt,
WxWidgets and MFC
* External dependencies removed simplifying build and distribution
o OpenThreads is moved into the core of OpenSceneGraph and
is no longer an external dependency
o Thanks to the integration of windowing support in
osgViewer, Producer is no longer a dependency.

Downloads and Licensing
OpenSceneGraph is open-source so full source code is provided, and can
be copied, modified and used free of charge for commercial and
non-commercial use. Access to the source allows end users greater
flexibility in how they develop, debug and deploy their applications.
They gain productivity and freedom by being able to leverage the tool
chain in accordance with their own release cycles. Downloads of
binaries and source can be found in the Downloads section of the
openscenegraph.org website.

OpenSceneGraph is released under the OpenSceneGraph 

Re: [osg-users] Building a list of all textures

2007-06-13 Thread Harash Sharma
Hi Robert,
   
Following your advice, today I was able to write the code to do the 
above job. Thanks a lot. 
   
  Regards
   
  Harash

Robert Osfield [EMAIL PROTECTED] wrote:
  You'll need to write yourself a NodeVisitor. In
src/osgUtil/Optimizer.cpp you'll find several examples of NodeVisitor
that go through processing StateSet's in the scene including ones that
target just Textures.

On 6/12/07, Harash Sharma wrote:
 Hi Robert,

 I have a peculiar problem. Given a model file in .osg format or .flt
 format, I want to generate a list of all textures being used in the model. I
 wonder if we can traverse the scene graph and search for the texture image
 being used by each object in the file. Is it possible to accomplish the task
 in this fashion? Is there any simpler/direct way of doing this? What happens
 if the current model file references some external models? Can we get the
 texture resources of those files too?

 Thanks for the support and guidance.

 Regards

 Harash

 
 Don't be flakey. Get Yahoo! Mail for Mobile and
 always stay connected to friends.


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


   
-
Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Building a list of all textures

2007-06-12 Thread Harash Sharma
Hi Robert,
   
 I have a peculiar problem. Given a model file in .osg format or .flt 
format, I want to generate a list of all textures being used in the model. I 
wonder if we can traverse the scene graph and search for the texture image 
being used by each object in the file. Is it possible to accomplish the task in 
this fashion? Is there any simpler/direct way of doing this? What happens if 
the current model file references some external models? Can we get the texture 
resources of those files too? 
   
 Thanks for the support and guidance.
   
  Regards
   
  Harash

 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] FrameBuffer read support in osgViewer::CompositeViewer

2007-05-17 Thread Harash Sharma
Hi Robert,
   
The application I am developing, I need to take a screen shot every cycle. 
Earlier using osgUtil::SceneView, I used to create an Image object and grab the 
frame buffer.
   
  osg::ref_ptrosg::Image Img = new osg::Image;
  Img-readPixels();
   
  Now after I have modified the project to osgViewer::CompositeViewer, I am not 
able to read the frame buffer. Is it some mistake on my part in some linking 
etc. related issues or is the support withdrawn. In either case can you please 
guide me to the simplest method that can be adopted to grab the image from the 
framebuffer memory,
   
   
  Thanks in advance( I know you will help me taking a clue from the past ;-)).
   
  Regards
   
  Harash

 
-
TV dinner still cooling?
Check out Tonight's Picks on Yahoo! TV.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Dynamic Window addition / Deletion (MFC -- Win32)

2007-05-11 Thread Harash Sharma
Hi Robert,
   
  Thanks a lot for your help and support. Overwhelmingly, I was able to 
achieve dynamic windo insertion / deletion using the suggested Idea. What I 
have done is that I have added a new class NewCompositeViewer derived from 
CompositeViewer. I have overridden the addView member function in which I first 
stop the running threads, add a new view, re-initialize and re-realize the 
viewer and re-start the threads. 
   
 The Sample is working fine. If you suggestI can post this sample program. 
It is not a very jazzy one but only an MFC MDI Application where windows can be 
opened and closed dynamically and all the windows share the same document.
   
 Once again, thanks a lot. I will be troubling you every now and then 
whenever I am in trouble ;-). 
   
  Regards
   
   
  Harash.

Robert Osfield [EMAIL PROTECTED] wrote:
  Hi Harash,

Once the view is running its threads it isn't appropriate to
dynamically add a new View, so what you need to do is call
viewer.stopThreading(), add the view then call startThreading().

There is one proviso though, I haven't actually tried this with
CompositeViewer yet, is still a pretty new class. If it doesn't work
we'll need to modify the osgmultiplecameras example to do dynamic
addition/removal of Views, then I can pick up the case at my end and
tweak things so they work, be it modifications to the example or
perhaps to the CompositeViewer implementation itself.

Robert.

On 5/10/07, Harash Sharma wrote:





 Hi Robert,

 Moving on the lines you had suggested, I have now been able to get a
 working MFC MDI Application with osgViewer::CompositeViewer. But there is an
 observation on this issue. The application I am developing requires a window
 to be dynamically opened / closed. The CompositeViewer class is expecting
 all the Views to be added before a call to frame() is made. If I make a call
 to osgViewer::CompositeViewer::frame(), then add a view
 using osgViewer::CompositeViewer::addView(), and again call
 frame(), the program hangs. Debugging, I found that this happens in

 osgViewer::renderingTraversal()
 

 if ( _startRenderingBarrier.valid())
 _startRenderingBarrier-block();

 The debugger gives the message: This process seems to be deadlocked.
 I don't know if it is a bug or if the class is not supposed to be used
 in this manner. Please Help.

 Thanks in Advance.

 Regards

 Harash.

 Robert Osfield wrote:

 Hi Harash,

 On 5/8/07, Harash Sharma wrote:

 As you had suggested, I tried creating the osgViewer::CompositeViewer
 object and to it attached the osgViewer::View. Further, as shown in
 osgMultipleCameras example, the traits structure was filled accordingly. The
 problem I am now facing is how to attach the MFC Window to the
 GraphicsContext / osgViewer. OSGMFC achieved this by passing the window
 handle using GetSafeHwnd() to Producer::RenderSurface. But I could not
 locate a mechanism of passing any such information to the osgViewer::View or
 CompositeViewer or Viewer. One Win32WindowingSystemInterface class I could
 locate, but there too I could not find a way out.

 I don't have the code to hand, but if your browse through the osg-users
 email archives for the last week you'll see how to use the
 osg::GraphicsContext::Traits::inheritedWindowData set to
 osgViewer::GraphicsWindowWin32::WindowData(hwnd) to tell
 the viewer to realize a window adopting the passed in window. The approach
 is roughly the same as done in Producer::RenderSurface previous, only the
 architecture is a bit different in osgViewer.

 Robert.



 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/


 

 Ahhh...imagining that irresistible new car smell?
 Check out new cars at Yahoo! Autos.
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

 
 Ahhh...imagining that irresistible new car smell?
 Check out new cars at Yahoo! Autos.
 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/

 
 Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail
 Beta.___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org/


 
 Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.


 ___
 osg-users mailing list
 osg-users@openscenegraph.net
 http://openscenegraph.net/mailman/listinfo/osg-users
 http://www.openscenegraph.org

RE: [osg-users] Multiple Camera Support on Windows (MFC)

2007-05-10 Thread Harash Sharma
Hi Mike,
   
 Thanks a lot. I tried a minor trick in PIXELFORMATDESCRIPTOR by setting 
the PFD_DOUBLEBUFFER Flag. This has set the things rolling. Now I have an MFC 
MDI application running with osgViewer::CompositeViewer. Thanks a lot.
   
  Regards
   
  Harash.
  

Harash Sharma [EMAIL PROTECTED] wrote:
Hi Mike,
   
  Thanks. Your suggestion did work. But now there is another problem. The 
window is getting drawn, The window is getting cleared with the specified 
color, the scene is getting loaded. But the window appears blank. I have called 
the osgViewer::CompositeViewer::frame() function in the CView::OnDraw / OnPaint 
functions. 
   
  Just for fun when I changed this to osgViewer::CompositeViewer::run(), I 
found a flickerring image of the loaded scene. I have the feeling that 
somewhere swapBuffers need to be called. Am I right? If yes, then can you guide 
me which function to call for this. 
   
  Thanks
   
  Regards
   
  Harash

Hartman, Michael W. (MSFC-NNM06AA05Z)[PEOPLETEC] [EMAIL PROTECTED] wrote:
v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}  
w\:* {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}
st1\:*{behavior:url(#default#ieooui) }Harash,
   
  This is from an earlier response that I had written that concerned the same 
problem you are having.   Please give it a try and see if it allows you to 
create the graphics context.  
   
  Thanks,
  Mike Hartman
   
   
  What I have found working with osgViewer and Windows, is that if you are 
assigning OSG to use an existing window/control is that you must set the 
pixelformat for that window/control before OSG can render to it.   I’m not 
familiar with QWidget but it sounds like the same problem.
   
  Below is how I am setting the pixel format for the window that I want OSG to 
render to.
  m_hWnd is the handle to the window/control/QWidget.
   
  //
  // We must set the pixelformat before we can create the OSG Rendering Surface
  //
  PIXELFORMATDESCRIPTOR pixelFormat =
  {
 sizeof(PIXELFORMATDESCRIPTOR),
 1,
 PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL,
 PFD_TYPE_RGBA,
 24,
 0, 0, 0, 0, 0, 0, 0, 0,
 0, 0, 0, 0, 0,
 24,
 0,
 0,
 PFD_MAIN_PLANE,
 0,
 0, 0, 0
  };
   
  HDC hdc = ::GetDC(m_hWnd);
  if (hdc==0)
  {
 ::DestroyWindow(m_hWnd);
 return 0;
  }
   
  int pixelFormatIndex = ::ChoosePixelFormat(hdc, pixelFormat);
  if (pixelFormatIndex==0)
  {
 ::ReleaseDC(m_hWnd, hdc);
 ::DestroyWindow(m_hWnd);
 return 0;
  }
   
  if (!::SetPixelFormat(hdc, pixelFormatIndex, pixelFormat))
  {
 ::ReleaseDC(m_hWnd, hdc);
 ::DestroyWindow(m_hWnd);
 return 0;
  }
   
   
 

  Michael W Hartman
  Senior Software Engineer
  Supporting:
  VP33 – Exploration Systems Development Office
  Science  Missions Systems Office
   
  Phone: (256) 544-5250
  Email: [EMAIL PROTECTED]
   

  People-Tec, Inc.
  1900 Golf Rd., Suite A-B
  Huntsville, AL 35802
   
   
   
   
   
   
   
  

 


  
-
  
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harash Sharma
Sent: Wednesday, May 09, 2007 6:22 AM
To: osg users
Subject: Re: [osg-users] Multiple Camera Support on Windows (MFC)

   
Hi all,

 

Thanks to Robert for his help and support. Following his suggestions I 
found the blunder I was making was that somehow I had messed up the library 
versions. The versions I was using did not have the inheritedWindowData member 
in the osg::GraphicsContext::Traits structure. Anyway, I was able to set things 
right on this front by reinstalling OSG1.2 and updating it to 1.9.3 with the 
CMake utility. 

 

   The problem that I am now facing seems beyond me. The 
osg::GraphicsContext is not getting created. I am using the following set of 
statements for the purpose:

 

osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;


  traits-x = 0;
  traits-y = 0;
  traits-width = Rect.Width();
  traits-height = Rect.Height();

  traits-windowDecoration = false;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;


 osg::ref_ptrosgViewer::GraphicsWindowWin32::WindowData wdata = new

osgViewer::GraphicsWindowWin32::WindowData( 
GetSafeHwd() );


  traits-inheritedWindowData = wdata.get();

 

  osg::ref_ptrosg::GraphicsContext gc =  
osg::GraphicsContext::createGraphicsContext(traits.get());

  

  if ( gc-valid() )  {

  gc-setClearColor(osg::Vec4f(0.2f,0.2f,0.6f,1.0f));
  gc-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  m_view-getCamera()-setGraphicsContext(gc.get());

  m_view-getCamera()-setViewport(new osg::Viewport(0,0, 
traits-width, traits-height));
  }

 

  The program compiles properly, but tracing through the program I found 
the GraphicsContext

RE: [osg-users] Multiple Camera Support on Windows (MFC)

2007-05-10 Thread Harash Sharma
Hi Robert,



Moving on the lines you had suggested, I have now been able to get a 
working MFC MDI Application with osgViewer::CompositeViewer. But there is an 
observation on this issue. The application I am developing requires a window to 
be dynamically opened / closed. The CompositeViewer class is expecting all the 
Views to be added before frame() is called. If I make a call to 
osgViewer::CompositeViewer::frame(), then add a view 
osgViewer::CompositeViewer::addView(), and again call frame(), the program 
hangs. Debugging, I found that this happens in 
   
  osgViewer::renderingTraversal() 
  
   
  if ( _startRenderingBarrier.valid())
 _startRenderingBarrier-block();
   
  The debugger gives the message: This process seems to be deadlocked. 
  I don't know if it is a bug or if the class is not supposed to be used in 
this manner. Please Help.
   
 Thanks in Advance.
   
  Regards
   
  Harash.
  
Robert Osfield [EMAIL PROTECTED] wrote:
Hi Harash,
On 5/8/07, Harash Sharma [EMAIL PROTECTED] wrote: 
As you had suggested, I tried creating the osgViewer::CompositeViewer 
object and to it attached the osgViewer::View. Further, as shown in 
osgMultipleCameras example, the traits structure was filled accordingly. The 
problem I am now facing is how to attach the MFC Window to the GraphicsContext 
/ osgViewer. OSGMFC achieved this by passing the window handle using 
GetSafeHwnd() to Producer::RenderSurface. But I could not locate a mechanism of 
passing any such information to the osgViewer::View or CompositeViewer or 
Viewer. One Win32WindowingSystemInterface class  I could locate, but there too 
I could not find a way out. 


  
I don't have the code to hand, but if your browse through the  osg-users email 
archives for the last week you'll see how to use the 
osg::GraphicsContext::Traits::inheritedWindowData  set to 
osgViewer::GraphicsWindowWin32::WindowData(hwnd)  to tell the viewer to realize 
a window adopting the passed in window.  The approach is roughly the same as 
done in Producer::RenderSurface previous, only the architecture is a bit 
different in osgViewer. 

Robert.



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
   


-
  
  Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos. 
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

-
  Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos. 
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

 
-
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Dynamic Window addition / Deletion (MFC -- Win32)

2007-05-10 Thread Harash Sharma
  Hi Robert,



Moving on the lines you had suggested, I have now been able to get a 
working MFC MDI Application with osgViewer::CompositeViewer. But there is an 
observation on this issue. The application I am developing requires a window to 
be dynamically opened / closed. The CompositeViewer class is expecting all the 
Views to be added before a call to frame() is made. If I make a call to 
osgViewer::CompositeViewer::frame(), then add a view using 
osgViewer::CompositeViewer::addView(), and again call frame(), the program 
hangs. Debugging, I found that this happens in 
   
  osgViewer::renderingTraversal() 
  
   
  if ( _startRenderingBarrier.valid())
 _startRenderingBarrier-block();
   
  The debugger gives the message: This process seems to be deadlocked. 
  I don't know if it is a bug or if the class is not supposed to be used in 
this manner. Please Help.
   
 Thanks in Advance.
   
  Regards
   
  Harash.
  
Robert Osfield [EMAIL PROTECTED] wrote:
Hi Harash,
On 5/8/07, Harash Sharma [EMAIL PROTECTED] wrote: 
As you had suggested, I tried creating the osgViewer::CompositeViewer 
object and to it attached the osgViewer::View. Further, as shown in 
osgMultipleCameras example, the traits structure was filled accordingly. The 
problem I am now facing is how to attach the MFC Window to the GraphicsContext 
/ osgViewer. OSGMFC achieved this by passing the window handle using 
GetSafeHwnd() to Producer::RenderSurface. But I could not locate a mechanism of 
passing any such information to the osgViewer::View or CompositeViewer or 
Viewer. One Win32WindowingSystemInterface class  I could locate, but there too 
I could not find a way out. 


  
I don't have the code to hand, but if your browse through the  osg-users email 
archives for the last week you'll see how to use the 
osg::GraphicsContext::Traits::inheritedWindowData  set to 
osgViewer::GraphicsWindowWin32::WindowData(hwnd)  to tell the viewer to realize 
a window adopting the passed in window.  The approach is roughly the same as 
done in Producer::RenderSurface previous, only the architecture is a bit 
different in osgViewer. 

Robert.



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
   


-
  
  Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos. 
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

-
  Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos. 
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


-
  Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

 
-
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

RE: [osg-users] Multiple Camera Support on Windows (MFC)

2007-05-09 Thread Harash Sharma
Hi Mike,
   
  Thanks. Your suggestion did work. But now there is another problem. The 
window is getting drawn, The window is getting cleared with the specified 
color, the scene is getting loaded. But the window appears blank. I have called 
the osgViewer::CompositeViewer::frame() function in the CView::OnDraw / OnPaint 
functions. 
   
  Just for fun when I changed this to osgViewer::CompositeViewer::run(), I 
found a flickerring image of the loaded scene. I have the feeling that 
somewhere swapBuffers need to be called. Am I right? If yes, then can you guide 
me which function to call for this. 
   
  Thanks
   
  Regards
   
  Harash

Hartman, Michael W. (MSFC-NNM06AA05Z)[PEOPLETEC] [EMAIL PROTECTED] wrote:
v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}  
w\:* {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}
st1\:*{behavior:url(#default#ieooui) }Harash,
   
  This is from an earlier response that I had written that concerned the same 
problem you are having.   Please give it a try and see if it allows you to 
create the graphics context.  
   
  Thanks,
  Mike Hartman
   
   
  What I have found working with osgViewer and Windows, is that if you are 
assigning OSG to use an existing window/control is that you must set the 
pixelformat for that window/control before OSG can render to it.   I’m not 
familiar with QWidget but it sounds like the same problem.
   
  Below is how I am setting the pixel format for the window that I want OSG to 
render to.
  m_hWnd is the handle to the window/control/QWidget.
   
  //
  // We must set the pixelformat before we can create the OSG Rendering Surface
  //
  PIXELFORMATDESCRIPTOR pixelFormat =
  {
 sizeof(PIXELFORMATDESCRIPTOR),
 1,
 PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL,
 PFD_TYPE_RGBA,
 24,
 0, 0, 0, 0, 0, 0, 0, 0,
 0, 0, 0, 0, 0,
 24,
 0,
 0,
 PFD_MAIN_PLANE,
 0,
 0, 0, 0
  };
   
  HDC hdc = ::GetDC(m_hWnd);
  if (hdc==0)
  {
 ::DestroyWindow(m_hWnd);
 return 0;
  }
   
  int pixelFormatIndex = ::ChoosePixelFormat(hdc, pixelFormat);
  if (pixelFormatIndex==0)
  {
 ::ReleaseDC(m_hWnd, hdc);
 ::DestroyWindow(m_hWnd);
 return 0;
  }
   
  if (!::SetPixelFormat(hdc, pixelFormatIndex, pixelFormat))
  {
 ::ReleaseDC(m_hWnd, hdc);
 ::DestroyWindow(m_hWnd);
 return 0;
  }
   
   
 

  Michael W Hartman
  Senior Software Engineer
  Supporting:
  VP33 – Exploration Systems Development Office
  Science  Missions Systems Office
   
  Phone: (256) 544-5250
  Email: [EMAIL PROTECTED]
   

  People-Tec, Inc.
  1900 Golf Rd., Suite A-B
  Huntsville, AL 35802
   
   
   
   
   
   
   
  

 


  
-
  
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harash Sharma
Sent: Wednesday, May 09, 2007 6:22 AM
To: osg users
Subject: Re: [osg-users] Multiple Camera Support on Windows (MFC)

   
Hi all,

 

Thanks to Robert for his help and support. Following his suggestions I 
found the blunder I was making was that somehow I had messed up the library 
versions. The versions I was using did not have the inheritedWindowData member 
in the osg::GraphicsContext::Traits structure. Anyway, I was able to set things 
right on this front by reinstalling OSG1.2 and updating it to 1.9.3 with the 
CMake utility. 

 

   The problem that I am now facing seems beyond me. The 
osg::GraphicsContext is not getting created. I am using the following set of 
statements for the purpose:

 

osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;


  traits-x = 0;
  traits-y = 0;
  traits-width = Rect.Width();
  traits-height = Rect.Height();

  traits-windowDecoration = false;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;


 osg::ref_ptrosgViewer::GraphicsWindowWin32::WindowData wdata = new

osgViewer::GraphicsWindowWin32::WindowData( 
GetSafeHwd() );


  traits-inheritedWindowData = wdata.get();

 

  osg::ref_ptrosg::GraphicsContext gc =  
osg::GraphicsContext::createGraphicsContext(traits.get());

  

  if ( gc-valid() )  {

  gc-setClearColor(osg::Vec4f(0.2f,0.2f,0.6f,1.0f));
  gc-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  m_view-getCamera()-setGraphicsContext(gc.get());

  m_view-getCamera()-setViewport(new osg::Viewport(0,0, 
traits-width, traits-height));
  }

 

  The program compiles properly, but tracing through the program I found 
the GraphicsContext is not getting created. I have confirmed the validity of 
the window Handle m_hWnd. It is not null. I tried another thing, If I comment 
the statement that links the GraphicsContext Traits to the MFC Window :  

   traits-inheritedWindowData = wdata.get();

The GraphicsContext gets created. Can

Re: [osg-users] Multiple Camera Support on Windows (MFC)

2007-05-08 Thread Harash Sharma
Hi Robert,

  As you had suggested, I tried creating the osgViewer::CompositeViewer 
object and to it attached the osgViewer::View. Further, as shown in 
osgMultipleCameras example, the traits structure was filled accordingly. The 
problem I am now facing is how to attach the MFC Window to the GraphicsContext 
/ osgViewer. OSGMFC achieved this by passing the window handle using 
GetSafeHwnd() to Producer::RenderSurface. But I could not locate a mechanism of 
passing any such information to the osgViewer::View or CompositeViewer or 
Viewer. One Win32WindowingSystemInterface class  I could locate, but there too 
I could not find a way out.
   
  Regards
   
  Harash. 

Robert Osfield [EMAIL PROTECTED] wrote:
  HI Harash,

The lastest dev versions (SVN and 1.9.x series) of the OSG have support for 
multiple views onto one or more scenes, this is supported by the 
osgViewer::CompositeViewer class.  To use this you'll create a osgViewer::View 
for each view you have and this to the CompostiteViewer object (you'll maintain 
one per app).  

For each View you'll probably just have one master Camera, and to this you need 
to attach what it'll be rendering to - a GraphicsContext/GraphicsWindow.  To 
attach a GraphicsWindow you'll need to create it, and in your case most likely 
attaching it to a pre-existing MFC window, this is possible by the 
inheritedWindowData filed in osg::GraphicsContext::Triats structure used to 
describe the window you want to create. 

This is a lot to take in, so take it bit by bit, first up familiarise yourself 
with the osgcamera and osgmultiplecamera examples, the later uses 
CompositeViewer.

I wouldn't recommend looking too long at OSGMFC as this is very old now, long 
before the new osgViewer library included with the OSG. 


Robert.

  On 5/4/07, Harash Sharma [EMAIL PROTECTED] wrote:Hi Robert,
   
  I have started using OSG the previous month. It is fantastic. But I have 
a lot of queries which I intend to clear through you. I am using VS-2005. My 
application uses the standard Document - View Architecture provided by MFC. The 
application is of Multiple Document Interface type. The software is supposed to 
load a scene graph database and use multiple views to render this scene with 
each view attached to a different camera position. I downloaded the recommended 
OSGMFC sample application for the purpose of learning the mechanism to do so. 
Now my doubts: 
   
  1. The osgDB reads the file in the view class, which means that each time I 
open a new window, the database is reloaded. Is it true that due to 
maintainence of multiple copies of the scene, the memory consumption increases? 
   
  2. Next I tried to move the reference pointer to the scene node to the 
document class and read the scene database once and for all in the Document 
class. The program works fine as long as only one view window is opened. The 
moment we open another window, the whole texture disappears. Why does this 
happen? What is the best way to achieve what I am doing with high efficiency 
and minimum memory utilisation. 
   
   
  Regards
   
   
  Harash


  
  
-
  Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos.   

___
osg-users mailing list
osg-users@openscenegraph.net 
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

  
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Pixel - object mapping

2007-05-08 Thread Harash Sharma
Hi Robert,
   
  I have another problem. Hence I am starting a new thread. In my project I 
need to map each pixel of the rendered scene back to the 3-D world Co-ordinate 
system. Further If possible, can I identify the pixel with the object it 
represents and can I further go down the tree to identify the polygon it 
represents. Say for example, can I say if a pixel (x,y) has really come from an 
object -- a House and it represents the window or door or wall of the 
house  Say if it represents the wall and is being rendered as a polygon, 
what is the direction of the surface normal.
 
 Eagerly waiting for your answer
   
  Regards
   
   
  Harash
   
  

   
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Multiple Camera Support on Windows (MFC)

2007-05-05 Thread Harash Sharma
Hi Robert,
   
 Thanks for the reply. Its a lot of work to be done. I will slowly try the 
things you suggested and get back to you.
   
   
  Thanks once again
   
  Harash

Robert Osfield [EMAIL PROTECTED] wrote:
  HI Harash,

The lastest dev versions (SVN and 1.9.x series) of the OSG have support for 
multiple views onto one or more scenes, this is supported by the 
osgViewer::CompositeViewer class.  To use this you'll create a osgViewer::View 
for each view you have and this to the CompostiteViewer object (you'll maintain 
one per app).  

For each View you'll probably just have one master Camera, and to this you need 
to attach what it'll be rendering to - a GraphicsContext/GraphicsWindow.  To 
attach a GraphicsWindow you'll need to create it, and in your case most likely 
attaching it to a pre-existing MFC window, this is possible by the 
inheritedWindowData filed in osg::GraphicsContext::Triats structure used to 
describe the window you want to create. 

This is a lot to take in, so take it bit by bit, first up familiarise yourself 
with the osgcamera and osgmultiplecamera examples, the later uses 
CompositeViewer.

I wouldn't recommend looking too long at OSGMFC as this is very old now, long 
before the new osgViewer library included with the OSG. 


Robert.

  On 5/4/07, Harash Sharma [EMAIL PROTECTED] wrote:Hi Robert,
   
  I have started using OSG the previous month. It is fantastic. But I have 
a lot of queries which I intend to clear through you. I am using VS-2005. My 
application uses the standard Document - View Architecture provided by MFC. The 
application is of Multiple Document Interface type. The software is supposed to 
load a scene graph database and use multiple views to render this scene with 
each view attached to a different camera position. I downloaded the recommended 
OSGMFC sample application for the purpose of learning the mechanism to do so. 
Now my doubts: 
   
  1. The osgDB reads the file in the view class, which means that each time I 
open a new window, the database is reloaded. Is it true that due to 
maintainence of multiple copies of the scene, the memory consumption increases? 
   
  2. Next I tried to move the reference pointer to the scene node to the 
document class and read the scene database once and for all in the Document 
class. The program works fine as long as only one view window is opened. The 
moment we open another window, the whole texture disappears. Why does this 
happen? What is the best way to achieve what I am doing with high efficiency 
and minimum memory utilisation. 
   
   
  Regards
   
   
  Harash


  
  
-
  Ahhh...imagining that irresistible new car smell?
Check out new cars at Yahoo! Autos.   

___
osg-users mailing list
osg-users@openscenegraph.net 
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

   
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Multiple Camera Support on Windows (MFC)

2007-05-04 Thread Harash Sharma
Hi Robert,
   
  I have started using OSG the previous month. It is fantastic. But I have 
a lot of queries which I intend to clear through you. I am using VS-2005. My 
application uses the standard Document - View Architecture provided by MFC. The 
application is of Multiple Document Interface type. The software is supposed to 
load a scene graph database and use multiple views to render this scene with 
each view attached to a different camera position. I downloaded the recommended 
OSGMFC sample application for the purpose of learning the mechanism to do so. 
Now my doubts:
   
  1. The osgDB reads the file in the view class, which means that each time I 
open a new window, the database is reloaded. Is it true that due to 
maintainence of multiple copies of the scene, the memory consumption increases? 
   
  2. Next I tried to move the reference pointer to the scene node to the 
document class and read the scene database once and for all in the Document 
class. The program works fine as long as only one view window is opened. The 
moment we open another window, the whole texture disappears. Why does this 
happen? What is the best way to achieve what I am doing with high efficiency 
and minimum memory utilisation.
   
   
  Regards
   
   
  Harash



  
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Multiple Camera Support on Windows (MFC)

2007-05-04 Thread Harash Sharma
Hi Edgar,
   
 Thanks for your quick reply. I will just try these things out and come 
back to you.
   
  Harash

Edgar Ellis [EMAIL PROTECTED] wrote:
  I'm not familiar with OSGMFC, but I do use osg in MFC apps.

 1. The osgDB reads the file in the view class, which means that each 
 time I open a new window, the database is reloaded. Is it true that 
 due to maintainence of multiple copies of the scene, the memory 
 consumption increases?

Multiple loads of the same file may be cached, depending on the 
ReaderWriter::Options.
You can change the default options with Registry::getOptions().

 2. Next I tried to move the reference pointer to the scene node to the 
 document class and read the scene database once and for all in the 
 Document class. The program works fine as long as only one view window 
 is opened. The moment we open another window, the whole texture 
 disappears. Why does this happen? What is the best way to achieve what 
 I am doing with high efficiency and minimum memory utilisation.


Sounds like osg is trying to use the same openGL objects in multiple 
openGL contexts.
Sharing the contexts should solve this problem, I'm not sure how things 
are setup in OSGMFC but wglShareLists is the windows call for sharing them.

Alternatively if you have multiple osg::SceneViews you can assign each a 
unique context id:
myOsgSceneView-getState()-setContextID(
osg::GraphicsContext::createNewContextID() );
This will cause osg to compile OpenGL objects separately for each context.

(This is all based on osg 1.2, things may have changed a bit since then)

Hope this helps,
- Edgar

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


   
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] 64-bit windows

2007-04-30 Thread Harash Sharma
Dear Zach,
 
 I am successfully running 32 bit OSG Applications on Windows XP x64 
edition. The performance is very satisfactory. Since I have very recently 
ported the code to the new x64 workstation, I am yet to try building 64 bit 
applications. Will look into it and come back to you.
   
   
  Regards,
   
  Harash.

Zach Deedler [EMAIL PROTECTED] wrote:
  Hello osg-bit-hoggers

Has anyone tried OSG on 64-bit windows xp with any luck? I am running on
64-bit linux, but I'd also like to try 64-bit windows. If so, can you also
run 32-bit programs?

Thanks.

Zach

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


   
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

[osg-users] Compiling Samples through Visual Studio 2005

2007-04-03 Thread Harash Sharma
Dear Robert,
I was compiling the Downloaded OSG Source using Visual Studio 2005. All the 
projects (except 3) compiled successfully. But when I am trying to run some of 
the examples given, they are giving a runtime error due to non availability of 
MSVCR80D.dll. The downloaded 3rdParty dependency files do not include this file 
either. Only MSVCR71.dll and MSVCP80.dll are available. Can you please suggest 
on the necessary action.
   
  Thanks
   
  Harash

 
-
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/