Re: [osg-users] Could someone removed the link to the hacked server from the downloads page?

2008-05-10 Thread Berg, Michael

Would it be worth while to link to the official Debian repository there?
<http://ftp.us.debian.org/debian/pool/main/o/openscenegraph/>
Between the stable, testing, and unstable branches, there are packages 
for OSG 1.2, 2.2, and 2.4 on multiple platforms.
These may always be the most up-to-date, but it's better than no link at 
all.


Robert Osfield wrote:

Hi Michael,

Thanks for reporting this.  When I updated the link for 2.4 binaries
openscenegraph.dachary.org was working, with Loic having just repaired
it from being hacked.  So depressing to see it hacked again within
days ;-|

Thanks to Jose for fixing this so quickly.

Robert.

On Sat, May 10, 2008 at 2:21 PM, Berg, Michael <[EMAIL PROTECTED]> wrote:

On the OSG downloads page
<http://www.openscenegraph.org/projects/osg/wiki/Downloads>
there is a link to <http://openscenegraph.dachary.org/> for "Debian
GNU/Linux binaries".

Going to openscenegraph.dachary.org shows a "hacked page" that has been
there for months now.  This was previously reported to the mailing list, and
since the server administrators for openscenegraph.dachary.org have not
corrected this issue, someone should remove that link from the OSG site.

Various versions of OpenSceneGraph for Debian GNU/Linux can be found in the
official Debian repository at
<http://ftp.us.debian.org/debian/pool/main/o/openscenegraph/>

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


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


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


[osg-users] Could someone removed the link to the hacked server from the downloads page?

2008-05-10 Thread Berg, Michael
On the OSG downloads page 

there is a link to  for "Debian 
GNU/Linux binaries".


Going to openscenegraph.dachary.org shows a "hacked page" that has been 
there for months now.  This was previously reported to the mailing list, 
and since the server administrators for openscenegraph.dachary.org have 
not corrected this issue, someone should remove that link from the OSG site.


Various versions of OpenSceneGraph for Debian GNU/Linux can be found in 
the official Debian repository at



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


Re: [osg-users] Development-system for Mac-OS

2007-12-12 Thread Berg, Michael
I don't think the problems weren't just 64-bit.  About a month ago (), I
posted a message with the subject "Undefined Symbols in OSG on Mac OS X"

The OSG binary installer for Mac OS X 10.4 (the 10.4u SDK) *mostly*
worked, but my applications would not compile if I made calls to
osg::Image::readPixels() or osg::StateSet::setMode().

E. Wing replied that:
=
Yeah, Apple screwed up and broke binary compatibility between 10.4 and
10.5 when using OpenGL and C++. I have notes and binaries coming on
this, but the short story is you can't use 10.4 built frameworks
against the 10.5 SDK or you get the linking problems you see. Either
switch to the 10.4u SDK on Leopard, or use a set of OSG frameworks
built against the 10.5 SDK.
=

Anyway, once the Mac OS X 10.5 SDK (32-bit only) was released and I
upgraded to it (http://www.openscenegraph.org/projects/osg/wiki/Downloads)
it solved the linking problems I was having.

If you look through the release notes for the 10.5 SDK, it mentions that
Apple changes some of the types in the OpenGL headers, so OSG had to be
rebuilt for that.

- Michael


Stephan Maximilian Huber wrote:
> Andreas Goebel schrieb:
>> I am about to buy a mac to port my osg-based application to mac-os. One 
>> simple question: I read about compatibility-problems with the new Mac-OS 
>> (10.5, I think).
>>   
> The reported problems are for 64bit only. If you stick with the 10.4-sdk 
> (which is 32bit) osg works out of the box on Leopard (10.5) and Tiger (10.4)
> 
>> Would it be better to buy a Mac running Mac-OS 10.4, and would programs 
>> compiled with this Mac more likely run on older and newer MacĀ“s?
>>   
> osg needs IMHO 10.4 at minimum, so osg-programs should run on every mac 
> with that system.
> 
> cheers,
> Stephan
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] screen capture with multiple cameras

2007-11-23 Thread Berg, Michael
sherman wilcox wrote:
> Ok. Thanks for the reply. Followup question: Is there an automagic way
> to determine what this last camera is or do I need to keep track of
> that myself?
> 
> Is it reasonable to attach a camera to the scenegraph set as the
> "last" camera just for capture purposes? I wouldn't think there would
> be much overhead incurred, but never hurts to ask.

Sherman,

I'm still learning how to fully use OSG myself, but here's the skeleton
code I wrote (based on the "osghud" and other examples).
[If anyone more experienced has any corrections/improvements to this
code, we'd all appreciate it].

This code "works for me" in my application, and will hopefully be easier
for you to get going with than the 3-styles-in-one osghud example (it
took me a few hours of testing settings and reading docs to figure out
exactly what was needed for each of the 3 display styles used in that
example).

The setRenderOrder(osg::Camera::POST_RENDER) on the HUD scene basically
makes it the "last" camera since all other scenes will be rendered
before this one.

I personally wouldn't bother with a screenshot-only camera as it will be
extra overhead and the HUD camera is basically IS that camera with some
display widgets in it.

[PS: and while the code below is from working code on my system, I did
strip out some app-specific parts for this email.  If it doesn't compile
as a result, my apologies, and I can help if the fix isn't obvious].

- Michael


// ==

osgViewer::CompositeViewer viewer;

// Main view
{
  osg::ref_ptr view = new osgViewer::View();
  view->setUpViewAcrossAllScreens();;
  view->setSceneData(root.get());  // root node of main scene here

  // black background for the main scene
  view->getCamera()->setClearColor(osg::Vec4(0.00, 0.00, 0.00, 1.00));

  view->addEventHandler(new osgViewer::WindowSizeHandler());
  view->addEventHandler(new osgViewer::StatsHandler());
  view->addEventHandler(new osgViewer::HelpHandler());

  viewer.addView(view.get());
}

// get window info from main view
osgViewer::Viewer::Windows windows;
viewer.getWindows(windows);
if (windows.empty()) {
  return 1;
}

// HUD view (overlaid on main view)
{
  osg::ref_ptr view = new osgViewer::View();
  view->setSceneData(hud.get());  // root node of hud scene here

  view->getCamera()->setGraphicsContext(windows[0]);
  view->getCamera()->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
  view->getCamera()->setProjectionMatrix
(osg::Matrix::ortho2D(0,1600,0,1200));
  view->getCamera()->setViewport(0, 0,
 windows[0]->getTraits()->width,
 windows[0]->getTraits()->height);
  view->getCamera()->setViewMatrix(osg::Matrix::identity());

  // draw this scene after the main scene (it's the "last" camera)
  view->getCamera()->setRenderOrder(osg::Camera::POST_RENDER);

  // no background (clear) so the main scene shows through
  view->getCamera()->setClearMask(GL_DEPTH_BUFFER_BIT);

  // Don't let the HUD camera grab event focus from the
  // main view's camera.
  view->getCamera()->setAllowEventFocus(false);

  // Attach your screen capture draw callback here
  drawcallback_screenshot = new DrawCallback_Screenshot("screenshot");
  view->getCamera()->setPostDrawCallback
(drawcallback_screenshot.get());

  viewer.addView(view.get());
}

return (viewer.run());

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


Re: [osg-users] screen capture with multiple cameras

2007-11-22 Thread Berg, Michael
sherman wilcox wrote:
> I want to capture my OSG screen and dump it to a jpeg or png file. My
> understanding is to attach a callback to the main osgViewer camera and
> perform a osg::Image::readPixels(...) from within the callback. That
> works in the simple case. But, if I have a basic HUD that is itself a
> camera alongside other nodes in the scenegraph, then I never see the
> HUD in my osg::Image::readPixels call. That would make sense since my
> callback is operating on the main camera and not my child node
> camerabut leaves the question of how do I perform a "complete"
> screen capture on a graph with multiple cameras?
> 
> Is there an example I missed?
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Sherman,

I recently ran into the same problem on this list.
Robert Osfield responded with some comments on how it might one-day be
done more cleanly, but that "Until these methods are added, you'll need
to make do with a post draw callback on the last camera to be drawn."

If your HUD is the last camera drawn, set the post draw callback on your
HUD camera, and it will be a complete screen capture.

- Michael

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


[osg-users] CompositeViewer Screenshots (was "picture-in-picture" view)

2007-11-17 Thread Berg, Michael
Robert,

Thanks for the tips.  After experimenting with the code in the osghud
example, I was finally able to get a basic version of what I wanted
working with the CompositeViewer.

However, I now have another question.  I want to be able to take a
screenshot of the entire screen.  I currently have a PostDrawCallback
that successfully takes a screenshot, but since this callback is set on
the main scene's camera, it only takes a screenshot of the main scene
(and doesn't include the contents of the additional view/camera in the
corner).  The setPostDrawCallback method is only available from osg::Camera

Is there a way to remedy this?

Or am I going to have to write code to individually screenshot every
camera in the CompositeViewer and then stitch together and overlay each
into a single screenshot?

Thanks again,
Michael


Robert Osfield wrote:
> Hi Michael,
> 
> osgViewer::CompositeViewer is the appropriate tool for this type of
> work, although you can use a slave camera in osgViewer::Viewer to as
> well, but this isn't as logically clean.  The osghud examples provide
> a range of examples of use of an iscene graph camera, a slave camera,
> and a separate view - its for doing a HUD but the ideas are similar.
> 
> As to why it isn't working for you, but best guess is that there is a
> rendering order issue with the cameras - the full screen view
> rendering after the insert view.  osg::Camera has support for
> specifying the rendering order, so try something like
> 
>insert_camera->setRenderOrder(osg::Camera::POST_RENDER);
> 
> You can also provide an int to setRenderOrder as a second parameter to
> help differentiate between multiple post/pre draw cameras.
> 
> Robert.

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


[osg-users] What is the correct way to create a "picture-in-picture" view?

2007-11-16 Thread Berg, Michael
I'm trying to use OSG 2.2 to create a main display of the primary scene
with a smaller "picture-in-picture"-style display of a completely
different scene in one of the corners.

The few examples that I've found so far have been for the older OSG 1.2
(using the old Producer interface).

I initially looked at using a slave camera, but got the impression from
some mailing list postings and the API that that was for a different
view of the same scene.

Based on that and other mailing list posts, I've been trying to use the
new CompositeViewer.
I've tried running the example "osgcompositeviewer" executable with
every combination of the -1, -2, and -3 flags possible from the code,
but I can only ever get it to show one scene on my single display.
http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osgcompositeviewer/osgcompositeviewer.cpp

If I use completely separate windows in my code, I can get each scene to
show up in a separate windows, but this isn't what I want.

By using an osg::GraphicsContext::Traits and
view->setUpViewOnSingleScreen(0), I've been able to get one scene to
show up in only the specified portion of the monitor, but I still can't
get two scenes on the monitor at the same time.

Below is a very stripped down skeleton of the basic code I've been
working with and trying to add different osg::GraphicsContext::Traits
and Viewports too.

==
#include 
#include 
#include 

#include 

#include 
#include 


int main (void)
{
  osg::ref_ptr cessna = osgDB::readNodeFile("cessna.osg");
  osg::ref_ptr cow = osgDB::readNodeFile("cow.osg");

  osgViewer::CompositeViewer viewer;

  // Main scene (fullscreen on a 1600x1200 screen)
  {
osg::ref_ptr view = new osgViewer::View();
view->setSceneData(cessna.get());

viewer.addView(view.get());
  }

  // Other scene in one corner ("picture-in-picture" style)
  {
osg::ref_ptr view = new osgViewer::View();
view->setSceneData(cow.get());
view->getCamera()->setViewport
  (new osg::Viewport(0, 512, 0, 512));

viewer.addView(view.get());
  }

  return (viewer.run());
}
==

I've tried putting the cessna in a viewport that doesn't overlap with
the cow viewport, but I only ever see either a fullscreen cessna.

Am I one the right track, or am I completely off base here?

Any pointers on how to achieve my desired picture-in-picture view of two
separate scenes would be greatly appreciated.

- Michael Berg

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


[osg-users] Undefined Symbols in OSG on Mac OS X

2007-11-04 Thread Berg, Michael
I have been developing an OSG application on Linux and recently began
making it cross-platform with OS X 10.5 (Leopard).

Either I'm not doing something correctly for an OS X compile or there is
a bug in the OpenSceneGraph-2.2.0.dmg found at
http://www.openscenegraph.org/files/OpenSceneGraph-2.2.0/OpenSceneGraph-2.2.0.dmg.

I'm using CMake for cross platform builds, and whether I generate a
Makefile or an Xcode build environment, the compile fails on OS X with
this message:
==
Undefined symbols:
  "osg::StateSet::setMode(unsigned int, unsigned int)", referenced from:
  _main in main.o
  _main in main.o
  "osg::Image::readPixels(int, int, int, int, unsigned int, unsigned
int)", referenced from:
  screenshot(osg::Camera const&) in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
==


The offending snippets of code are:
==
osg::ref_ptr root = new osg::Group();
osg::ref_ptr state = root->getOrCreateStateSet();
state->setMode(GL_LIGHTING, osg::StateAttribute::ON);
state->setMode(GL_LIGHT0, osg::StateAttribute::ON);
==
osg::ref_ptr image = new osg::Image();
image->readPixels(static_cast(viewport->x()),
  static_cast(viewport->y()),
  static_cast(viewport->width()),
  static_cast(viewport->height()),
  GL_RGBA, GL_UNSIGNED_BYTE);
==

This same code compiles and links without any problem on Linux.

On OS X, options passed to the compiler include:
-F/Library/Frameworks \
-framework osg -framework osgDB -framework osgGA \
-framework osgParticle -framework osgUtil \
-framework osgText -framework osgViewer

and I have followed the instructions for installing the OSG frameworks
into /Library/Frameworks.

If I comment out the code that triggers the linking errors, I can get
the code to compile, link, and run.
"otool -L" shows for following for the resulting executable:
==
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
111.0.0)
@executable_path/../Frameworks/osg.framework/Versions/A/osg
(compatibility version 0.0.0, current version 1.0.0)
@executable_path/../Frameworks/osgDB.framework/Versions/A/osgDB
(compatibility version 0.0.0, current version 1.0.0)
@executable_path/../Frameworks/osgGA.framework/Versions/A/osgGA
(compatibility version 0.0.0, current version 1.0.0)
@executable_path/../Frameworks/osgParticle.framework/Versions/A/osgParticle
(compatibility version 0.0.0, current version 1.0.0)
@executable_path/../Frameworks/osgUtil.framework/Versions/A/osgUtil
(compatibility version 0.0.0, current version 1.0.0)
@executable_path/../Frameworks/osgText.framework/Versions/A/osgText
(compatibility version 0.0.0, current version 1.0.0)
@executable_path/../Frameworks/osgViewer.framework/Versions/A/osgViewer
(compatibility version 0.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version
7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)
==

So executable is linked against the "osg" framework, and the application
runs successfully (with the features that I commented out to get it to
build disabled of course).

Any ideas?  Am I doing something wrong?  Or did osg::StateSet::setMode()
and osg::Image::readPixels() not make it into the OS X .dmg file (or not
in a form that can be linked against)?

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