Re: [osg-users] Blending two textures manualy

2010-11-15 Thread Aitor Ardanza

Ulrich Hertlein wrote:
 
 I believe your pixel address calculation is wrong; try this instead:
 
 // i==row/y, j==column/x
 unsigned char* pixel = texture-getImage(0)-data() + ((i * tex_width) + j) * 
 4;
 *(pixel+0) = r;
 *(pixel+1) = g;
 *(pixel+2) = b;
 *(pixel+3) = a;
 

I get the same result ... thanks for the reply!

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





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


Re: [osg-users] Lightweighted STL support for mobile development?

2010-11-15 Thread Robert Osfield
Hi Wang Rui,

My approach would be to do the ports and see just how big the
footprint is, and if it's OK then your job is done, no need to spend
extra time optimizing stuff that isn't an issue. Memory footprint is
an issue that I have been expecting to arise as a problem on the
embedded space, but so far I haven't heard from those doing ports
citing it as a problem.

We are early days of course, it may turn out to be an issue for enough
developers that effort in porting to an alternative to STL might be
warranted.  If it's relatively easy to do then the the threshold for
forcing one to move across needn't be so high.

There are lots of other things we could do to reduce footprint as
well.  However, I would recommend doing the port then accessing what
problems there are, then looking at the various approaches that might
be able to resolve these.

Robert.

On Mon, Nov 15, 2010 at 2:07 AM, Wang Rui wangra...@gmail.com wrote:
 Hi all,

 In the past few months I saw that OSG was ported to iPhone and worked
 well. It is also being prepared to be migrated to more mobile
 platforms like Android and Symbian (e.g. a new OpenThreads
 implementation with Qt). With these in mind, I'm now considering if we
 could provide a lightweighted STL library instead of the normal one
 while porting OSG to mobile devices.

 The STL library itself may be too large for developing with memory
 limitation. Although memory size is not so important in modern desktop
 and mobile platforms, we can still benifit from the maximum saving of
 resources, and make use of possibly cleaner and faster code,
 especially in the rendering back-end. I've had a glance of the uSTL
 library (http://ustl.sourceforge.net/) and thought it might be a good
 start.

 I haven't planned for any implementations about merging uSTL into OSG
 or implementing another one to replace the normal STL library when
 required for mobile developing, but just would like to start a
 discussion at present. One of my friend is working in Nokia and he
 provides me some useful information of the concept of uSTL, and a
 portable version of it under Symbian. I really hope somebody
 (including myself :-) can give more suggestions and solutions, and
 work out a usable mobile version of OSG in the future.

 Cheers,

 Wang Rui
 ___
 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] [build] OSG 2.8.3 with XCode 3.2 on 10.6.4

2010-11-15 Thread Philip Lamb
From memory, OpenThreads.framework needs to be added into the link phase of 
some of the other frameworks and libs.

If all you need is a working pre-compiled version of OSG 2.8.2 for Mac OS X, I 
have made an installer package available here:

www.artoolworks.com/dist/openscenegraph/2.8.2/

Regards,
Philip


gabyx wrote:
 Hi,
 
 I have a general build problem:
 -I downloaded the 2.8.3 stable version ZIP file.
 - Compiled (out of the box) the XCode Project (Release 32bit Cocoa)
 - Compiles fine, no errors, all frameworks  builded
 - Copied the Frameworks to /library/frameworks/
 - Made a new XCode Project from Template of the ZIP (2.8.3)
 
   - This Project does not compile:
   - Included only the osg/* headers in the prefix header
   - It cannot find several files, header in the framework I think, this is 
 strange:
 
 In file included from /Library/Frameworks/osg.framework/Headers/AlphaFunc:17,
  from .../Desktop/OSGTEST/OSGTEST_Prefix.pch:31:
 /Library/Frameworks/osg.framework/Headers/StateAttribute:19:38: error: 
 osg/StateAttributeCallback: No such file or directory
 In file included from ...Desktop/OSGTEST/OSGTEST_Prefix.pch:83:
 /Library/Frameworks/osg.framework/Headers/ImageStream:18:27: error: 
 osg/AudioStream: No such file or directory
 
 When I copy the missing headers in the frameworks, it compiles,but gives a 
 linking error with:
   OpenThreads::Atomic::operator--(), referenced from:
  osg::Referenced::unref() constin main.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 
 
 
 What is wrong here, I dont know really how to get this working?...
 Could anyone help?
 
 
 Thank you!
 
 Cheers,
 Gabriel[/b]


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





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


Re: [osg-users] OSG on IPhone

2010-11-15 Thread Philip Lamb
Hi all,

I've just checked out the OSG iOS (a.k.a. iPhone) port which several of you 
have been putting a lot of effort into. Congratulations on the achievements so 
far.

Am I correct in thinking that the branch at
https://github.com/stmh/osg/tree/iphone contains the most recent efforts?

I have two particular issues which I've encountered so far. The first is that 
on iOS retina-display devices (currently iPhone 4 and iPod Touch 4G) the 
graphics are being rendered only half-size. I saw some discussion on this in 
earlier posts, but I can't see any fixes for this in the current repo. Does 
anyone have a fix coded up waiting for testing?

The second issue is that I'm not seeing animation on some animated OSG models. 
Are there known issues with animation in the current port?

I'd like to help out where possible with this port, and I have a bunch of 
devices I can test on.

Regards,

Philip

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





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


Re: [osg-users] OSG on IPhone

2010-11-15 Thread Stephan Maximilian Huber
Hi Philip,

Am 15.11.10 12:03, schrieb Philip Lamb:
 I've just checked out the OSG iOS (a.k.a. iPhone) port which several of you 
 have been putting a lot of effort into. Congratulations on the achievements 
 so far.

thanks :)

 Am I correct in thinking that the branch at
 https://github.com/stmh/osg/tree/iphone contains the most recent efforts?

Yes.

 I have two particular issues which I've encountered so far. The first is that 
 on iOS retina-display devices (currently iPhone 4 and iPod Touch 4G) the 
 graphics are being rendered only half-size. I saw some discussion on this in 
 earlier posts, but I can't see any fixes for this in the current repo. Does 
 anyone have a fix coded up waiting for testing?

Thomas had a fix for that, which I didn't incorporate completely,
because it broke compatibility with iOS 3.2 on the iPad. Maybe a bug of
iOS 3.2.

AFAIK only a multiplier with the screen-scale is missing.

As I don't have any device with retina-display (yet) I can't fix it on
my end.

 The second issue is that I'm not seeing animation on some animated OSG 
 models. Are there known issues with animation in the current port?

Not that I am aware of. I do not use osgAnimation, so can't help here.
Do your models work with current svn? Perhaps static-linking is not
working properly for osgAnimation.

 I'd like to help out where possible with this port, and I have a bunch of 
 devices I can test on.

Your help is greatly appreciated! Feel free to send any modifications to
me or this list (or via pull request on github), I'll try to incorporate
them into the git-repository.

There a two main bugs remaining before I'll send the modifications to
Robert:

* display-size bug for retina-displays
* FBO-rendering is not working correctly

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


Re: [osg-users] [build] 3rd party libs and VS 2010

2010-11-15 Thread Sukender
Hi Brad, hi all,

Files available at http://sukender.free.fr/pvle/files/vc10/  (All are Windows 
x64 MSVC10 with Windows SDK 7.1, both release and debug). Help yourself!
Warning: these are dumb copies of my directories (less some files, such as 
.obj, .pdb, ...). If you plan to make a nice repository of binaries, please 
tell.

Important notes:
- If you feel some have to be compiled with options (dynamic, static, another 
version, etc.), please ask.
- I recently found that some libs changed their output directory. I thus 
updated my CMake finders. Please find my finders in the PVLE SVN trunk, at 
https://pvle.svn.sourceforge.net/svnroot/pvle/trunk/CMakeModules/ , or browse 
at http://pvle.svn.sourceforge.net/viewvc/pvle/trunk/CMakeModules/

Versions are:
- boost_1_44_0 (dynamic only)
- curl-7.21.1 without SSL (dynamic only, with zlib)
- freealut-1.1.0 (both static and dynamic)
- freeglut-2.6.0 (dynamic only)
- freetype-2.4.2 (static only, didn't found dynamic)
- jpeg-8b (static only)
- png 1.4.3 (dynamic only)
- ODE 0.11.1 (dynamic only, single precision only)
- ogg SVN rev. 17535 (dynamic only)
- OpenAL-Soft GIT rev. 4f81bce800c91bf0676cdff4267ce474d88ebf5a (dynamic only)
- osgAudio SVN rev. 67 (dynamic only)
- tiff-3.9.4 (static only)
- vorbis SVN rev. 17535 (dynamic only)
- zlib 1.2.5 (dynamic only)

Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Sukender suky0...@free.fr a écrit :

 Allright. I'll try doing it ASAP (tomorrow I guess).
 
 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 
 - Brad Christiansen brad.christian...@thalesgroup.com.au a
 écrit :
 
  Hi,
 
  I certainly am. I am not doing a 64bit build at the moment but it
 will
  save me (and others) some time compiling them. If you can get them
 to
  me I will package them up and post a link on the osg-wiki. I am not
  sure I will get it done in the next week or as I am off on holidays
 on
  Saturday for a week, but I will upload them once I get back if I run
  out of time.
 
  Cheers,
 
  Brad
 
  -Original Message-
  From: osg-users-boun...@lists.openscenegraph.org
  [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
  Sukender
  Sent: Wednesday, 10 November 2010 6:01 PM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] [build] 3rd party libs and VS 2010
 
  Hi Brad,
 
  I got some dependencies for VC10 64bits (WinSDK 7.1):
  - curl-7.21.1 without SSL
  - freetype-2.4.2
  - jpeg-8b
  - lpng143
  - zlib
 
  And some others:
  - Boost 1.44
  - freealut-1.1.0
  - libsquish
  - ode-0.11.1
  - ogg, vorbis
  - OpenAL-Soft
 
  Interested?
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
 
  - Brad Christiansen brad.christian...@thalesgroup.com.au a
  écrit :
 
   Hi,
  
   Ideally this shouldn't be necessary as the cmake find modules
  should
   be able to find what is needed once you have set the 3rdParty dir
  in
   cmake. I think I have not structured my dependencies correctly for
  the
   all to be found. It is on my to-do list to clean up the
 dependencies
  I
   have published, and if necessary modify the 'find module' cmake
  files
   so they are all automatically detected, but this task never seems
  to
   rise to the top to the list : )
  
   If anyone has built 64 bit dependencies using VS2010 I am happy to
   package them up and make them available too. It is also on my
 to-do
   list to publish 64bti binaries but that is another task that never
   quite seems to get done.
  
   Cheers,
   Brad
  
   -Original Message-
   From: osg-users-boun...@lists.openscenegraph.org
   [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
  Joel
   Graff
   Sent: Saturday, 6 November 2010 8:41 PM
   To: osg-users@lists.openscenegraph.org
   Subject: Re: [osg-users] [build] 3rd party libs and VS 2010
  
   Just as a follow-up (esp. for others who aren't greatly familiar
  with
   cmake), I discovered that most of my problems getting the various
   plugins to show up in the generated VS project were solved by
  clicking
   the Advanced checkbox in the upper right of the cmake gui.
  
   This exposes a whole bunch more variables for referencing
  libraries,
   not the least of which are the Freetype libraries.  I set the
   directory paths / lib locations and viola! freetype compiles!
  
   Hope it helps save someone else a week of work trying to get OSG
 to
   compile...
  
   --
   Read this topic online here:
   http://forum.openscenegraph.org/viewtopic.php?p=33554#33554
  
  
  
  
  
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  
  
 
 DISCLAIMER:---
   This e-mail transmission and any documents, files and previous
  

[osg-users] thread hangs when LineSegmentIntersector is used...

2010-11-15 Thread Shayne Tueller
All,

I have a two process application where one process loads the scenegraph for 
rendering via CompositeViewer while the other process loads a subset of the 
same scenegraph (terrain) for extracting database information. No rendering is 
going on in the second process. 

In the second process, I'm starting a thread using OpenThreads to perform 
intersection calculations with the terrain. The thread seems to start ok and go 
into the run() method until it requests an intersection with the terrain. Once 
LineSegmentIntersector is called, the thread hangs and seems to be in some sort 
of wait state that never comes back. I don't understand why the thread stops 
running when I do an intersection calculation. Is it possible that 
LineSegmentIntersector is modifying the scenegraph when it does its 
calculations? Would that cause the thread to stop running?

This is my first attempt at using OpenThreads so I'm probably missing 
something...

Thanks for any help in advance...

Shayne

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





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


Re: [osg-users] Semi-transparency

2010-11-15 Thread lucie lemonnier
Hi,

Thank you, it works well!

lucie

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





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


Re: [osg-users] [osgOcean] increase ocean view range

2010-11-15 Thread Shen Qing
are you worked it out? 
amigoface wrote:
 yes from the osgapp example
 
 
 Code:
 _oceanSurface = new osgOcean::FFTOceanSurface( 64, 256, 17, 
 windDirection, windSpeed, depth, reflectionDamping, waveScale, isChoppy, 
 choppyFactor, 10.f, 256 );  
 
 
 
 
 i tried before to increase some of these value but i got a very strange and 
 horrible effect since i don't know each parameter value correspondence
 
 for example i tried this before
 
 
 Code:
 _oceanSurface = new osgOcean::FFTOceanSurface( 128, 512, 33, 
 windDirection, windSpeed, depth, reflectionDamping, waveScale, isChoppy, 
 choppyFactor, 10.f, 256 );  
 
 
 
 
 i can't put screens now beacause i don't have my dev machine


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





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


[osg-users] OSG and FreeVr , using osgViewer

2010-11-15 Thread Mohammad Reza Shakouri
Hi,

Previously I posted a thread in this forum regarding integrating osgViewer with 
FreeVr . By the help of a friend in this forum, I integrated a scene in FreeVr. 
But still has some problems that I want to discuss about them : 

1- How can I get rid of the background of the model (usually blue) .. I mean I 
just want to load the model in the FreeVr world.

2-As I am newbie in the osg and freeVr, Would you guys tell me how does the 
event handling go ? Is it handled by freeVr or OsgViewer ? 

3- When I compile the code .. in the terminal i get this messages 
vrLockWriteRelease(): Something is wrong with the lock's wmutex
vrLockReadSet(): Can't set read lock: bad lock [0x83e2b40].  but the code is 
still doing fine ( i mean no crashes)


Below I put a sample shots of my codes, I hope you guys can help me.
Thank you!

Cheers,
Mohammad Reza Shakouri

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




Attachments: 
http://forum.openscenegraph.org//files/screenshot_4_196.png
http://forum.openscenegraph.org//files/screenshot_5_203.png


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


Re: [osg-users] thread hangs when LineSegmentIntersector is used...

2010-11-15 Thread Shayne Tueller
Hi Robert,

Thanks for the reply. 

If LineSegmentIntersector does nothing to the scenegraph, I'm definitely not 
modifying the scenegraph in the process that spawned the thread so there must 
be something else going on that is causing the thread to stop running.

I have gone into the debugger and the thread goes into a wait state which never 
returns. Obviously I will need to dig deeper to find out why. 

My purpose of inquiry to the forum was to make sure I wasn't forgetting 
something with using OpenThreads or in understanding how LineSegmentIntersector 
works on the scenegraph.

It is curious that the thead stops running when using LineSegmentIntersector to 
compute intersections. Otherwise it runs fine...

For the record, I'm currently using 64bit Linux Fedora core 13. This exact same 
software runs fine on Fedora core 10 and RedHat 5.4...weird.

Shayne

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





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


Re: [osg-users] [osgOcean] increase ocean view range

2010-11-15 Thread Kim Bale
If you modify the third parameter of FFTOceanSurface which is called numTiles 
you will be able to increase the number of tiles that make up the ocean surface 
and thus the range. Increasing the number of tiles will have a direct effect on 
performance. You may wish to try the new vbo technique in the trunk to reduce 
update times. 

Regards, 

Kim

Sent from my iPhone

On 15 Nov 2010, at 16:16, Shen Qing fl...@yahoo.cn wrote:

 are you worked it out? 
 amigoface wrote:
 yes from the osgapp example
 
 
 Code:
 _oceanSurface = new osgOcean::FFTOceanSurface( 64, 256, 17, 
 windDirection, windSpeed, depth, reflectionDamping, waveScale, isChoppy, 
 choppyFactor, 10.f, 256 );  
 
 
 
 
 i tried before to increase some of these value but i got a very strange and 
 horrible effect since i don't know each parameter value correspondence
 
 for example i tried this before
 
 
 Code:
 _oceanSurface = new osgOcean::FFTOceanSurface( 128, 512, 33, 
 windDirection, windSpeed, depth, reflectionDamping, waveScale, isChoppy, 
 choppyFactor, 10.f, 256 );  
 
 
 
 
 i can't put screens now beacause i don't have my dev machine
 
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=33751#33751
 
 
 
 
 
 ___
 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] [osgPlugins] OSG Plugins

2010-11-15 Thread Samuel Grant
Hi,

I can't seem to figure out where I have gone wrong...

I have compiled OSG, the plugins, and external libs (TIFF, JPEG, PNG, GDAL, 
etc)...but STILL cannot open certain file types like JPEG and PNG.

Can anyone point me to a step-by-step 'setup' procedure for getting OSG up and 
running with the plugins?

Thank you!

Cheers,
Samuel

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





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


Re: [osg-users] OSG on IPhone

2010-11-15 Thread Thomas Hogarth
Hi Phil, Stephan



  I have two particular issues which I've encountered so far. The first is
 that on iOS retina-display devices (currently iPhone 4 and iPod Touch 4G)
 the graphics are being rendered only half-size. I saw some discussion on
 this in earlier posts, but I can't see any fixes for this in the current
 repo. Does anyone have a fix coded up waiting for testing?


As Stephan rightly says I have a version with this working (attached) The
problem lies with the device screen size. Stephan seems to have to use
screen bounds (in points) where as for the retina displays we need to use
sceen size (in pixels). The problem lines are around line 77 of
IPhoneUtils.mm. Stephan if you could take a look at those changes and
possibly just add an if !3.2 statement or the like then I think we are ok,
but I think we need someone with both device types.



  The second issue is that I'm not seeing animation on some animated OSG
 models. Are there known issues with animation in the current port?



I've used basic animation exported from 3ds max into a .osg file
(haven't tried .ive) seems to work ok for me. I've also had software
skinning with osgAnimation working. Could the problem lie with your static
imports i.e. are you using .osg but not adding

   USE_DOTOSGWRAPPER(AnimationPath)


Just a guess.


 I'd like to help out where possible with this port, and I have a bunch of
 devices I can test on.

 * display-size bug for retina-displays
 * FBO-rendering is not working correctly


Having someone with a few devices would be great as I'm just doing this as a
hobby and it's getting rather expensive :). As Stephan says we still have
the above two problems, I've almost fixed the FBO problem so I recon if you
have mutliple devices (especially an IPad) it would be great if you could
help put with the retina display problems.

I assume this is for osgART (you work for ARToolWorks right). I've been
using the open source ARToolkit at the moment (ported a version myself, is
there anything else available). I'm getting great performance and almost
have time to use render to texture and some post processing (although with
out rtt the fps is sooo smooth).

I'd be really keen to help out with any problems you have with the AR side
of things, e.g You'll find there is a bug in versions  2.9.8 when using
subload callbacks for npot textures. Things I'd be keen to learn about are
the different camera res' on different devices, I have an IPod 4th gen and
although you can request 640x480 and 1280x720 explicitly the other res' are
just called things like PHOTO which I have no idea if it ends up the same
res on a 3gs for example.

Anyhow I guess those are less OSG related and more AR, so on that side of
things feel free to email me direct.

Cheers
Tom
/*
 *  IphoneUtils.h
 *  OpenSceneGraph
 *
 *  Created by Thomas Hogarth on 25.11.09.
 *
 * By default we create a full res buffer across all devices and if now viewContentScaleFator is given We use the screens ScaleFactor.
 * This means that for backward compatibility you need to set the windowData _viewContentScaleFactor to 1.0f and set the screen res to the
 * res that of the older gen device.
 * http://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/SupportingResolutionIndependence/SupportingResolutionIndependence.html#//apple_ref/doc/uid/TP40007072-CH10-SW11
 *
 */

#ifdef __APPLE__ 
 
#ifndef IPHONE_UTILS_HEADER_
#define IPHONE_UTILS_HEADER_

#ifdef __OBJC__
@class UIScreen;
#else
class UIScreen;
#endif

#include osg/DeleteHandler
#include osg/GraphicsContext
#include osgViewer/GraphicsWindow

namespace osgIPhone {



struct IPhoneWindowingSystemInterface : public osg::GraphicsContext::WindowingSystemInterface
{
public:
	IPhoneWindowingSystemInterface();

	/** dtor */
	~IPhoneWindowingSystemInterface();


	/** @return count of attached screens */
	virtual unsigned int getNumScreens(const osg::GraphicsContext::ScreenIdentifier si) ;

	virtual void getScreenSettings(const osg::GraphicsContext::ScreenIdentifier si, osg::GraphicsContext::ScreenSettings  resolution);

	virtual void enumerateScreenSettings(const osg::GraphicsContext::ScreenIdentifier screenIdentifier, osg::GraphicsContext::ScreenSettingsList  resolutionList);
	
	virtual bool setScreenSettings (const osg::GraphicsContext::ScreenIdentifier  si, const osg::GraphicsContext::ScreenSettings  settings);

	/** returns screen-ndx containing rect x,y,w,h, not_tes...@tom */
	unsigned int getScreenContaining(int x, int y, int w, int h);

	//IPhone specific

	//
	//return the UIScreen object asscoiated with the passed ScreenIdentifier
	//returns nil if si isn't found
	UIScreen* getUIScreen(const osg::GraphicsContext::ScreenIdentifier si);
	
	//
	//Get the contents scale factor of the screen, this is the scale factor required
	//to convert points to pixels on this screen
	bool getScreenContentScaleFactor(const osg::GraphicsContext::ScreenIdentifier si, float scaleFactor);
	
	//
	//Get the 

[osg-users] [build] dylib and install name os x

2010-11-15 Thread Gabriel Nützi
Hi,

I builded, 2.8.3  with Cmake on OS X 10.5 and
I have the problem that all my library which build successfully have install 
names like:


Code:
user10-164:lib username$ otool -L libosg.2.8.3.dylib
libosg.2.8.3.dylib:
/Users/username/Desktop/OpenSceneGraph283/Build/FirstBuild/lib/libosg.2.8.3.dylib
 (compatibility version 65.0.0, current version 2.8.3)
/Users/username/Desktop/OpenSceneGraph283/Build/FirstBuild/lib/libOpenThreads.11.dylib
 (compatibility version 11.0.0, current version 2.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
123.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 
1.0.0, current version 1.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility 
version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)




How can I change the Cmake Variables that my install names are changed so that, 
I can move the libraries (all together in a folder /lib) around, and linking 
against them with out getting  dyld: Reason image not found  problems?


Thanks a lot for any help!

Cheers,
Gabriel[/code]

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





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


[osg-users] Viewing angle 180 degrees

2010-11-15 Thread Bolstad, Mark
I've dug around in the lists and various other areas and have yet to come up 
with a solution.

We have a cylindrical display using 3 projectors with a viewing angle of 225 
degrees. Most of the code is based off of osgdistortion, but I can't seem to 
get a very large FOV. I've tried several approaches:
1. Setting the viewing angle of the master camera to perspective with the large 
FOV. Works up to 140 degrees but after that the perspective is to distorted (as 
would be expected). Interestingly, at FOV  180, the up vector flips and the 
FOV gets smaller (somewhat expected if you think about the math).
2. Setting the offset parameters in addSlave (strange results)

What I think I need is to set each one of the three views to have a viewing 
angle of 75 degrees,  and to rotate two of the views +/- 75 degrees from the 
center.

Any help/hints on setting this up would be appreciated.

Mark

Mark A. Bolstad
Scientific Computing
Janelia Farm Research Campus
Howard Hughes Medical Institute
19700 Helix Drive, Ashburn, VA  20147
email: bolst...@janelia.hhmi.org
office: +1.571.209.4623
web: http://www.hhmi.org/janelia/






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


Re: [osg-users] Viewing angle 180 degrees

2010-11-15 Thread Paul Martz

On 11/15/2010 6:04 PM, Bolstad, Mark wrote:

2. Setting the offset parameters in addSlave (strange results)

What I think I need is to set each one of the three views to have a viewing
angle of 75 degrees, and to rotate two of the views +/- 75 degrees from the 
center.

Any help/hints on setting this up would be appreciated.


It appears you've answered your own question here, as all you need to do is set 
slave camera view matrix offsets (rotations, actually).


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Viewing angle 180 degrees

2010-11-15 Thread Bolstad, Mark
If I set the master camera's FOV, do the slaves inherit that value?


Mark A. Bolstad
Scientific Computing
Janelia Farm Research Campus
Howard Hughes Medical Institute
19700 Helix Drive, Ashburn, VA  20147
email: bolst...@janelia.hhmi.org
office: +1.571.209.4623
web: http://www.hhmi.org/janelia/






On Nov 15, 2010, at 8:13 PM, Paul Martz wrote:

 On 11/15/2010 6:04 PM, Bolstad, Mark wrote:
 2. Setting the offset parameters in addSlave (strange results)
 
 What I think I need is to set each one of the three views to have a viewing
 angle of 75 degrees, and to rotate two of the views +/- 75 degrees from the 
 center.
 
 Any help/hints on setting this up would be appreciated.
 
 It appears you've answered your own question here, as all you need to do is 
 set slave camera view matrix offsets (rotations, actually).
 
 -- 
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
 ___
 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] Viewing angle 180 degrees

2010-11-15 Thread Ulrich Hertlein
On 16/11/10 12:54 , Bolstad, Mark wrote:
 If I set the master camera's FOV, do the slaves inherit that value?

Yes, slave cameras inherit the master camera's view *and* projection matrices 
(with
optional offsets).

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


Re: [osg-users] Viewing angle 180 degrees

2010-11-15 Thread Bolstad, Mark
I must be missing something then. When I set the master camera's view to be 95 
degrees, I get a 95 degree field of view across all three cameras. 

Also, whatever I set the offsets to, I just get really wacky results ( with an 
offset of 10 degrees, I get no overlap between cameras, and trackball rotations 
go in opposite directions for 2 out of the three camera ) 

Maybe someone with better eyes can see my mistake:

void
ViewingWindowQt::initializeCameras( int nCameras )
{
   numCameras = nCameras;
   widgets = new QWidget*[ numCameras ];
   
   _x_focal_length.resize( numCameras );
   _y_focal_length.resize( numCameras );
   _use_distortion.resize( numCameras );
   _bottom_texcoord.resize( numCameras );
   
   // Just added here to see what would happen
   // 95 degree view *across* all three cameras, not per camera
   getCamera()-setProjectionMatrixAsPerspective( 95.0f, 1.0, 0.1, 1.0 );
   
   for ( int i = 0; i  numCameras; i++ )
   {
   _x_focal_length[i] = 1.0f;
   _y_focal_length[i] = 1.0f;
   _bottom_texcoord[i] = osg::Vec2( -0.5f, -0.5f );
   _use_distortion[i] = true;
  widgets[ i ] = addViewWidget( multipleWindowWithDistortion( true, i, 
numCameras ) );
   }
   
   for ( int i = 0; i  numCameras; i++ )
  widgets[ i ]-show();

   connect( _timer, SIGNAL( timeout() ), this, SLOT( paintEvent() ) );
   _timer.start( 10 );
}



osg::Camera* 
ViewingWindowQt::multipleWindowWithDistortion( bool multipleScreens, int i, int 
numCameras )
{
   osg::GraphicsContext::WindowingSystemInterface* wsi = 
osg::GraphicsContext::getWindowingSystemInterface();

   osg::Node* sceneData = getSceneData();

   wsi-getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), _width, 
_height);

   double aspectRatioScale = (double)numCameras;
   double translate_x = double(numCameras)-1 + i * -2.0;

   osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;
   traits-screenNum = multipleScreens ? i+1 : 0;
   traits-x = (i*_width)/numCameras;
   traits-y = 0;
   traits-width = _width/numCameras;
   traits-height = _height;

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

   osg::ref_ptrosg::Camera camera = new osg::Camera;
   GraphicsWindowQt* gwqt = new GraphicsWindowQt( traits.get() );
   camera-setGraphicsContext( gwqt );
   camera-setClearColor( _clearColor );
   gwqt-setClearColor( _clearColor );
   gwqt-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

   camera-setViewport(new osg::Viewport(0,0, (_width/numCameras), _height));
   GLenum buffer = traits-doubleBuffer ? GL_BACK : GL_FRONT;
   camera-setDrawBuffer(buffer);
   camera-setReadBuffer(buffer);
   osg::Node* data = createDistortionSubgraph( i, sceneData, _clearColor );
   camera-addChild( data );

   // Original
   addSlave(camera.get(), osg::Matrix::scale(aspectRatioScale, 1.0, 1.0)*
osg::Matrix::translate(translate_x, 0.0, 0.0), osg::Matrix(), false 
);

   // Tried this and various other combinations
//   addSlave(camera.get(), osg::Matrix::scale(aspectRatioScale, 1.0, 1.0), 
//  osg::Matrix::rotate(-10.f + i*10.f, 0.f, 1.f, 0.f ), 
false );

   return camera.release();
}

Mark A. Bolstad
Scientific Computing
Janelia Farm Research Campus
Howard Hughes Medical Institute
19700 Helix Drive, Ashburn, VA  20147
email: bolst...@janelia.hhmi.org
office: +1.571.209.4623
web: http://www.hhmi.org/janelia/






On Nov 15, 2010, at 9:09 PM, Ulrich Hertlein wrote:

 On 16/11/10 12:54 , Bolstad, Mark wrote:
 If I set the master camera's FOV, do the slaves inherit that value?
 
 Yes, slave cameras inherit the master camera's view *and* projection matrices 
 (with
 optional offsets).
 
 /ulrich
 ___
 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] Viewing angle 180 degrees

2010-11-15 Thread Ulrich Hertlein
On 16/11/10 14:01 , Bolstad, Mark wrote:
 I must be missing something then. When I set the master camera's view to be 95
 degrees, I get a 95 degree field of view across all three cameras.
 
 Also, whatever I set the offsets to, I just get really wacky results ( with 
 an offset
 of 10 degrees, I get no overlap between cameras, and trackball rotations go 
 in opposite
 directions for 2 out of the three camera )
... 

One thing to remember is to set the reference frame for the slave cameras to 
RELATIVE_RF
in order to use the master camera's matrices with offset.

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


Re: [osg-users] Intel GMA giving me fits with OSG 2.8.2

2010-11-15 Thread ted morris
Hi Chris,

The version I have been using is 8.15.10.2202 (8/25/2010) on Win7 6.1.7600
Home Premium.

Actually, that was the latest from Micro$oft's updater but I just installed
8.15.10.2226 (10/28/2010) off the Intel driver support. I haven't had a
chance to reboot (being occupied at the moment; my son can't use the 'dad
ate my homework' excuse tonight).

It came pre-installed with 'Intel Control Center' which had settings to
force v-synch, and enable-software-vertex update, but when I run stats I was
still getting crazy frame rates.
Something definitely is not right with the drivers. ...

thnx,
t


On Thu, Nov 11, 2010 at 11:14 AM, Chris 'Xenon' Hanson xe...@alphapixel.com
 wrote:

 On 11/11/2010 2:20 AM, Robert Osfield wrote:
  I do also wonder if we as community need to start kicking up a fuss
  about how crap the Intel drivers are and that they need to fix them.
  Bad PR sometimes can force companies to get off there backside.

   Last I knew, the Intel GMA drivers, while not great, did usually work. I
 pestered
 friends at Intel into fixing most of the worst bugs a few years ago.

  Are you 100% sure you're using a current Intel GMA driver? What exact
 driver version do
 you have, and what OS is it under?





 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting.
 Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist.
 - Xen
 ___
 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] [osgPlugins] OSG Plugins

2010-11-15 Thread Torben Dannhauer
Hi,

Which OS, which architecture?

Thank you!

Cheers,
Torben

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





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