Re: [osg-users] OS X 10.9 Segmentation fault OSG 3.2.1

2014-09-18 Thread Stephan Maximilian Huber
Hi,

check your standard-lib / libc-settings. You must use the same settings you 
used when compiling osg.

cheers,

Stephan


Am 18.09.2014 um 13:29 schrieb Alessio G. B. alessiogiovanni.bar...@gmail.com:

 Hi,
 
 the following simple program raise SEGFAULT, why?
 
 
 Code:
 
 int main (int argc, char **argv)
 {
osg::ArgumentParser ap (argc, argv);
osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer (ap);
osg::ref_ptrosg::Camera camera = new osg::Camera;
 
return viewer-run ();
 }
 
 
 
 
 Thank you!
 
 Cheers,
 Alessio
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=61077#61077
 
 
 
 
 
 ___
 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] Texture2D Image updating

2014-08-29 Thread Stephan Maximilian Huber

Am 29.08.2014 um 11:28 schrieb Fabrizio Bazzurri il.papero@hotmail.it:

 Hi,
 
 I'm having a problem in my custom shader while updating my texture2D using 
 image-dirty() function. Following there is the relevant code snippet. 
 
 
 Code:
 
 osg::StateSet* stateset = geom1-getOrCreateStateSet();
 
 osg::ref_ptrosg::Program program = new osg::Program;
 osg::ref_ptrosg::Shader vertexSource = new osg::Shader(osg::Shader::VERTEX);
 osg::ref_ptrosg::Shader fragmentSource = new 
 osg::Shader(osg::Shader::FRAGMENT);
 
 vertexSource-setShaderSource(vert);
 fragmentSource-setShaderSource(frag);
 
 program-addShader(vertexSource);
 program-addShader(fragmentSource);
 
 stateset-setAttributeAndModes(program.get());
 stateset-setDataVariance(osg::Object::DYNAMIC);
 
 
 osg::ref_ptrosg::Image diffuseImage = osgDB::readImageFile(.\\img0.png);
 std::cout   File   diffuseImage-getFileName() std::endl; // 
 it prints img0
 
 osg::ref_ptrosg::Texture2D diffuseTex = new osg::Texture2D;
 diffuseTex-setDataVariance(osg::Object::DYNAMIC);
 diffuseTex-setImage(diffuseImage.get());
 
 stateset-setTextureAttributeAndModes(0, diffuseTex.get(), 
 osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);
 
 osg::ref_ptrosg::Uniform cDiffTex = new 
 osg::Uniform(osg::Uniform::SAMPLER_2D, cDiffTex);
 cDiffTex-set(0);
 stateset-addUniform(cDiffTex.get());
 

Here you create a new image, your texture refers still to the old one. Load the 
file into a second image and copy the data into your diffuseImage. Compare the 
pointer of texture-getImage and diffuseImage, they point to different objects. 

 diffuseImage = osgDB::readImageFile(.\\img1.jpg);
 diffuseImage-dirty();
 std::cout   File   diffuseImage-getFileName() std::endl; // 
 it prints img1-GOOD the diffuseImage is updated
 std::cout   Tex   diffuseTex-getImage()-getFileName() 
 std::endl; // it prints img0-BAD the image object of texture is not updated
 // NEED TO TELL TEXTURE TO SET THE IMAGE TO HAVE IT UPDATED
 //diffuseTex-setImage(diffuseImage);
 //std::cout   Tex   diffuseTex-getImage()-getFileName() 
 std::endl;
 

Ressource-wise it’s better to have one texture holding one image as using 
multiple textures using one image.

cheers,

Stephan

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


Re: [osg-users] GraphicsWindowCocoa Sample

2014-06-24 Thread Stephan Maximilian Huber
Hi Yu,

here’s a snippet of an app using osg inside a classic Cocoa-app. The trick is 
to let osg create a view only and then add this view into your 
NSView-hierarchy. 

osg::ref_ptrosgViewer::GraphicsWindowCocoa::WindowData win_data = new 
osgViewer::GraphicsWindowCocoa::WindowData(
osgViewer::GraphicsWindowCocoa::WindowData::CreateOnlyView |
osgViewer::GraphicsWindowCocoa::WindowData::CheckForEvents
);

// self is a NSWindow/NSView

osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits();
traits-inheritedWindowData = win_data;
traits-x = 0;
traits-y = 0;
traits-width = [self frame].size.width;
traits-height = [self frame].size.height;
traits-doubleBuffer = true;
traits-vsync = true;
traits-windowDecoration = false;
traits-supportsResize = false;

// the following steps are deep inside my own app and it’s to cumbersome to 
quote them here. 
// 1. create the graphics-context with the traits-object
// 2. create a osg::Viewer or a osg::View and set the gc accordingly.
// 3. realize the graphics-context
// 4. after realizing the GraphicsContext you can get the created view via the 
win_data-object.


openglView = win_data-getCreatedNSView();
[self addSubview: openglView];

[openglView setFrame: NSMakeRect(0, 0, [self frame].size.width, [self 
frame].size.height)];


Another approach is the usage of GraphicsWindowEmbedded, here you’ll create and 
control the OpenGL graphics-context by yourself. 

HTH,

Stephan


On 20 Jun 2014, at 18:08, Yu Zhang sciro...@163.com wrote:

 Hi Experts,
 
 Could you please provide a OS X sample in using GraphicsWindowCocoa?
 
 I need bind a cocoa window to an osgview.
 
 BTW, the osgviewerCocoa example works, it used setUpViewerAsEmbeddedInWindow 
 and seems only works in single draw/cull thread mode.
 
 I tried 

 osgViewer::GraphicsWindowCocoa::WindowData(osgViewer::GraphicsWindowCocoa::WindowData::PoseAsStandaloneApp);
 
 In a new window and displays the node but hanged, and 
 osgViewer::GraphicsWindowCocoa::WindowData(osgViewer::GraphicsWindowCocoa::WindowData::CreateOnlyView);
  looks not work in my side.
 
 Macbook pro 13 late 1013, OS X 10.9.3 XCode 5.02
 
 Thank you!
 
 Cheers,
 Yu
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=59836#59836
 
 
 
 
 
 ___
 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] osg's git-mirror out of sync

2014-05-05 Thread Stephan Maximilian Huber
Hi all,

It seems that the git-mirror is not in sync with the svn-repository anymore. it 
stopped on 30th April. Can anybody fix this? 

Thanks,

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


Re: [osg-users] Openscenegraph iOS Development

2014-03-18 Thread Stephan Maximilian Huber
HI Sebastian,

Am 18.03.2014 um 09:58 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:

 I'm still struggling with the issue. Could you (or someone else) try to link 
 the curl plugin in a iOS-Simulator project and check if the linker complains?
 As said before I'm not familiar with the MacOS/iOS platform, so I don't know 
 the tools to check the dependencies neither I know which SSL library could be 
 appropriate to link.

All I can say is that it’s working for me. I don’t use any SSL-stuff with 
libcurl. I am just using the osgdb_curl plugin and the libcurl.a Have a look at 
the Present3D-Control-app how the linking etc is setup, maybe there are some 
differences. 

And please: Post the exact error-messages, the complete output of the 
linking-stage. 

cheers,

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


Re: [osg-users] Openscenegraph iOS Development

2014-03-16 Thread Stephan Maximilian Huber
Hi Sebastian,

there’s no need for macports or something similar (as they build only for OS X 
not for iOS) and I use lib curl successfully w/o any additional 3rdparty lib.

What error-messages do you get?

cheers,

Stephan


 
Am 14.03.2014 um 19:43 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:

 Hi Stephan,
 
 The builds for the simulator are working fine with a customized CMake file.
 There is one remaining problem however. It seems the libcurl distributed on 
 the github seem to need libssl or openssl. 
 I didn't have any success linking to macport built targets.
 
 Any hints from your side?
 
 Cheers
 Sebastian 
 hi sebastian,
 
 good to hear its’ working on your end. There’s a simple iOS example, you’ll 
 have to enable BUILD_OSG_EXAMPLES in cmake / build-script. 
 
 cheers, 
 Stephan
 
 Am 11.03.2014 um 10:52 schrieb Sebastian Messerschmidt 
 sebastian.messerschm...@gmx.de:
 
 And again,
 
 cleaning the project and rebuilding it came up with a clean build.
 Thank you so much. :-)
 
 Now I need to build a small project using it.
 
 
 
 ___
 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


Re: [osg-users] Openscenegraph iOS Development

2014-03-11 Thread Stephan Maximilian Huber
hi sebastian,

good to hear its’ working on your end. There’s a simple iOS example, you’ll 
have to enable BUILD_OSG_EXAMPLES in cmake / build-script. 

cheers, 
Stephan

Am 11.03.2014 um 10:52 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:

 And again,
 
 cleaning the project and rebuilding it came up with a clean build.
 Thank you so much. :-)
 
 Now I need to build a small project using it.

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


Re: [osg-users] Openscenegraph iOS Development

2014-03-10 Thread Stephan Maximilian Huber
HI,
Am 10.03.2014 um 10:43 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:

 I've tried the trunk too, with the same results. But thank you for your 
 advise.
 Maybe one of the iOS experts can give me some hints regarding the iOS 7.0 SDK.

What’s your cmake setup? You can’t create a configuration for the simulator and 
then compile osg for the device or vice versa, both must match. A more detailed 
error-description might be useful.

cheers,

Stephan

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


Re: [osg-users] Openscenegraph iOS Development

2014-03-10 Thread Stephan Maximilian Huber
HI,

osg should work with SDK 7.0 (it does work on my end)

Make sure IPHONE_SDKVER is set to the right sdk-version. „7.0

I pushed my build-scripts to github. perhaps they work on your end: 
https://github.com/stmh/osg-ios-build


Am 10.03.2014 um 10:57 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:

 Also, due to my missing experience: When do I build for the Simulator? If I 
 want to test it exclusively on the Mac? 

Yes. If you want to test your app on the mac from within the simulator you’ll 
need to build for the simulator. The compile-link-test cycles are much faster 
on the simulator, but you’ll experience some opengl-glitches.

If you use my build-scripts, you can switch between device/simulator from 
within xcode for your own project.

cheers,

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


Re: [osg-users] Openscenegraph iOS Development

2014-03-05 Thread Stephan Maximilian Huber
Hi Sebastian,

Am 05.03.2014 um 08:42 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:

 I've been requested to explore the options of OpenSceneGraph development 
 under iOS.
 There are some starter tutorials, but I still have some questions (without 
 having touched the toolchain right now)
 
 1. Depending on the device I guess I'm bound to OpenGL ES 1 and 2?

You are bound to ES1 OR ES2. It depends on the context you create. And you’ll 
have to setup cmake accordingly. 

 2. What about external dependencies, are there all available resource to get 
 my favourites like curl, tif, freetype going?

It’s hard to find the dependencies, I have some precompiled libs for curl and 
freetype. The hard part is to compile them for both the devices and the 
simulator.

 3. How are plugins handled? Is there some delay load mechanism, or do they 
 have to be compiled statically into the application?

iOS require static linking.

 4. Last of all: How well does it work? Is the setup/building/deploy working 
 smoothly?

If you master the hurdle of setup and compilation of osg and its dependencies 
its working w/o problems. The linking times are relatively high because of the 
static linking requirements.

One major annoyance is cmake’s inability to compile socalled universal libs. 
These libs contain code for the simulator and the devices (arm6, arm7, arm64). 
I can open source my build-scripts which creates 2 cmake-projects in different 
folders, compile osg and afterwards create universal libs. If there’s any 
interest I can setup a git repository.

Here’s an example of a working ios-app, which may guide as a blueprint: 

https://github.com/Present3D/present3d-control (it contains also freetype + 
curl 3rdparty-libs)

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] Cannot generate Xcode project (OSX 10.9/Xcode 5)

2013-12-16 Thread Stephan Maximilian Huber
Hi,

have you setup the cmake according to the read me? It looks like you haven’t 
setup OSG_BUILD_PLATFORM_IPHONE or OSG_BUILD_PLATFORM_IPHONE_SIMULATOR.

cheers,

Stephan

Am 16.12.2013 um 11:33 schrieb Alessandro Terenzi a.tere...@gmail.com:

 Hi,
 just downloaded the latest sources from GIT but I am facing some issues when 
 I try yo generate the Xcode project for iOS, I am using Mac OS X 10.9 and 
 Xcode 5...I set CMake variables in order to build of OpenGLES 2 (as suggests 
 here: http://trac.openscenegraph.org/projects/osg//wiki/Community/OpenGL-ES), 
 but I get an error regarding the variable OPENGL_INCLUDE_DIR not being set 
 (in the past I did not touched that variable in any way and always managed to 
 generate the Xcode project), am I missing something new now? Any suggestion?
 
 Thanks.
 Alessandro
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=57683#57683
 
 
 
 
 
 ___
 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] iOS OSG

2013-12-09 Thread Stephan Maximilian Huber
HI,

don’t know what’s wrong on your end. osg starts the dylib loading dance because 
it can’t resolve all loaders/extensions. Here’s my configuration which loads 
osgt w/o problems:

USE_GRAPICSWINDOW_IMPLEMENTATION(IOS)

USE_OSGPLUGIN(imageio)
USE_OSGPLUGIN(rgb)
USE_OSGPLUGIN(osg)
USE_OSGPLUGIN(osg2)
USE_OSGPLUGIN(freetype)

USE_SERIALIZER_WRAPPER_LIBRARY(osg)
USE_SERIALIZER_WRAPPER_LIBRARY(osgAnimation)
USE_SERIALIZER_WRAPPER_LIBRARY(osgFX)
USE_SERIALIZER_WRAPPER_LIBRARY(osgManipulator)
USE_SERIALIZER_WRAPPER_LIBRARY(osgParticle)
USE_SERIALIZER_WRAPPER_LIBRARY(osgSim)
USE_SERIALIZER_WRAPPER_LIBRARY(osgText)
USE_SERIALIZER_WRAPPER_LIBRARY(osgTerrain)
USE_SERIALIZER_WRAPPER_LIBRARY(osgShadow)
USE_SERIALIZER_WRAPPER_LIBRARY(osgVolume)

HTH,
Stephan

Am 09.12.2013 um 11:16 schrieb Mike Krus m...@mve.com:

 Hi
 
 I just tried with an .osgt file (cow.osgt) and it's still trying to do the 
 dylib plugin loading dance…
 
 
 Mike
 
 
 On 9 Dec 2013, at 07:52, Stephan Maximilian Huber 
 lis...@stephanmaximilianhuber.com wrote:
 
 Hi,
 
 any chance you are opening osg-files stored with the deprecated format? 
 (Usually *.osg). The new serializer handle files with the extension osgt, 
 osgb and osgx. 
 
 To support the deprecated osg-file-format have a look into the source of 
 osgstaticviewer.
 
 cheers,
 
 Stephan
 Am 08.12.2013 um 18:18 schrieb Mike Krus m...@mve.com:
 
 Hi
 
 have OSG statically built for iOS but for some reason it's still trying to 
 use dylibs when opening .osg files?
 
 I've added the correct macros (I think):
 
 USE_OSGPLUGIN(osg)
 USE_SERIALIZER_WRAPPER_LIBRARY(osg)
 
 but I get the errors below.
 
 
 any ideas?  cheers,
 
 
 Mike
 
 
 FindFileInPath() : trying 
 /private/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/glider.osg
  ...
 FindFileInPath() : USING 
 /private/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/glider.osg
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns/osgPlugins-3.2.0/osgdb_osg.so
  ...
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns/osgPlugins-3.2.0/osgdb_osg.so ...
 itr='/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Library/Application 
 Support/OpenSceneGraph/PlugIns/osgPlugins-3.2.0/osgdb_osg.so ...
 itr='/Network/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Network/Library/Application 
 Support/OpenSceneGraph/PlugIns/osgPlugins-3.2.0/osgdb_osg.so ...
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns/osgdb_osg.so
  ...
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns/osgdb_osg.so ...
 itr='/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Library/Application 
 Support/OpenSceneGraph/PlugIns/osgdb_osg.so ...
 itr='/Network/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Network/Library/Application 
 Support/OpenSceneGraph/PlugIns/osgdb_osg.so ...
 Warning: dynamic library 'osgPlugins-3.2.0/osgdb_osg.so' does not exist (or 
 isn't readable):
 dlopen(osgPlugins-3.2.0/osgdb_osg.so, 9): image not found
 DynamicLibrary::failed loading osgPlugins-3.2.0/osgdb_osg.so
 No data loaded
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] iOS OSG

2013-12-08 Thread Stephan Maximilian Huber
Hi,

any chance you are opening osg-files stored with the deprecated format? 
(Usually *.osg). The new serializer handle files with the extension osgt, osgb 
and osgx. 

To support the deprecated osg-file-format have a look into the source of 
osgstaticviewer.

cheers,

Stephan
Am 08.12.2013 um 18:18 schrieb Mike Krus m...@mve.com:

 Hi
 
 have OSG statically built for iOS but for some reason it's still trying to 
 use dylibs when opening .osg files?
 
 I've added the correct macros (I think):
 
 USE_OSGPLUGIN(osg)
 USE_SERIALIZER_WRAPPER_LIBRARY(osg)
 
 but I get the errors below.
 
 
 any ideas?  cheers,
 
 
 Mike
 
 
 FindFileInPath() : trying 
 /private/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/glider.osg
  ...
 FindFileInPath() : USING 
 /private/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/glider.osg
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns/osgPlugins-3.2.0/osgdb_osg.so
  ...
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns/osgPlugins-3.2.0/osgdb_osg.so ...
 itr='/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Library/Application 
 Support/OpenSceneGraph/PlugIns/osgPlugins-3.2.0/osgdb_osg.so ...
 itr='/Network/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Network/Library/Application 
 Support/OpenSceneGraph/PlugIns/osgPlugins-3.2.0/osgdb_osg.so ...
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/osgText.app/PlugIns/osgdb_osg.so
  ...
 itr='/var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying 
 /var/mobile/Applications/D186F562-109C-4D92-9CD6-777C1256E566/Library/Application
  Support/OpenSceneGraph/PlugIns/osgdb_osg.so ...
 itr='/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Library/Application 
 Support/OpenSceneGraph/PlugIns/osgdb_osg.so ...
 itr='/Network/Library/Application Support/OpenSceneGraph/PlugIns'
 FindFileInPath() : trying /Network/Library/Application 
 Support/OpenSceneGraph/PlugIns/osgdb_osg.so ...
 Warning: dynamic library 'osgPlugins-3.2.0/osgdb_osg.so' does not exist (or 
 isn't readable):
 dlopen(osgPlugins-3.2.0/osgdb_osg.so, 9): image not found
 DynamicLibrary::failed loading osgPlugins-3.2.0/osgdb_osg.so
 No data loaded
 ___
 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] github-mirror not in sync anymore

2013-11-25 Thread Stephan Maximilian Huber
Hi,

it seems that the github-mirror is out of sync with the current svn-trunk. Can 
somebody fix this? 

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] Build Problem with osgGA at MacOS with Xcode 5

2013-11-25 Thread Stephan Maximilian Huber
Hi,

try a more recent version from trunk or the 3.2-branch, a fix for this issue 
was added last week. It seems that clang/llvm does some too optimistic 
optimizations. I could fix the bug by adding a explicit destructor (this got 
committed to trunk) or by reducing the optimization-setting for the serializer 
(this got committed to the 3.2-branch as it does not break ABI-compatibility)

Note that the github-mirror is currently not in sync with the subversion 
repository so try svn instead.

cheers,

Stephan


Am 25.11.2013 um 17:47 schrieb Jean-Claude Monnin jc_mon...@emailplus.org:

 Hi,
 
 I had exactly the same issue than Jan Klimke when trying to compile the 
 latest osg with Xcode 5, 64-bit dylib build (not frameworks) with libc++ as 
 standard library.
 Could anyone successfully build a recent osg with Xcode 5?
 
 The problem is that the linker can't find the destructor of GUIEventHandler 
 when building the serializers:
   Undefined symbols for architecture x86_64:
osgGA::GUIEventHandler::~GUIEventHandler(), referenced from:
construction vtable for 
 osgGA::GUIEventHandler-in-osgGA::KeySwitchMatrixManipulator in 
 KeySwitchMatrixManipulator.cpp.o
   
 
 I found following workarounds, but none of them is good:
 1) Remove the file 
 src/osgWrappers/serializers/osgGA/KeySwitchMatrixManipulator.cpp
 2) Define an empty virtual destructor in GUIEventHandler (eg. virtual 
 ~GUIEventHandler() {}). 
 
 Looks like a linker issue. KeySwitchMatrixManipulator is used at other places 
 sucessfully, it's just in the serializers that the issue shows up.
 
 Any hints welcome.
 
 Thanks
 Jean-Claude
 ___
 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] OpenSceneGraph and Mac OS X

2013-11-13 Thread Stephan Maximilian Huber
Hi Ron,

there might be a bug in osg, but I don’t think so, as loading files and 
displaying them is a core feature, and more people would have stumbled over it. 
It works perfectly on my end BTW.

I am using currently OS X 10.9 and xcode 5 to build OpenSceneGraph. But I have 
used everything since 10.4 and the various xcode-versions.

Is there a chance that you have an old/multiple installations of OpenSceneGraph 
anywhere on your computer (in one of your Lirbary folders for example)? Or old 
release-builds mixed with newer debug-builds?


To narrow your problem down I’d start with one of the official examples like 
osgviewer. If the example can open an osg-file and display it then osg works as 
expected, so the problem is with your app or because of conflicting 
build-settings.

These are my CMake-settings for OpenSceneGraph:

OSG_COMPILE_FRAMEWORKS:BOOL=ON
OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR:STRING=@executable_path/../Frameworks
OSG_CXX_LANGUAGE_STANDARD:STRING=C++11
OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX:STRING=imageio
OSG_WINDOWING_SYSTEM:STRING=Cocoa

I do usually out-of-source-builds, setting the build-binarys-folder to 
something different than the source-folder in cMake.

When using osg-frameworks and plugins from within my app, I make sure that I 
use the same standard lib, copy the frameworks and plugins to the correct 
locations of my bundle and set  the following compile-flags for my app:

Inline Methods Hidden (GCC_INLINES_ARE_PRIVATE_EXTERN) to 0
Symbols Hidden by Default (GCC_SYMBOLS_PRIVATE_EXTERN) also to 0

To test osgviewer I select the target from the popup, hit Cmd  and add an 
argument to the run-schema, basically the full path to an osgt-file for 
example. Then I hit run. If the console reports that it can’t find the plugin 
I’ll check the osgPlugins-folder. (This may be necessary when compiling dylibs) 

That’s what I did this morning: 

1. git clone https://github.com/openscenegraph/osg.git
2. start cmake, chooses xcode, set the variables, use a different build-folder, 
hit configure multiple times and then generate
3. open xcode-file in xcode hit „Cmd-B“, wait 15 minutes
4. Locate the osgviewer-target in the drop down, select it
5. Hit Cmd „ select the „Arguments“-tab, add a new argument and drop an 
osgt-file into it (or paste the full-path to a osgt-file into it)
6. Hit „Cmd R“
7. Now I can see the osg-model fullscreen.

Note, that this works only for the debug-build. If you switch over to release 
make sure, that you build the INSTALL-target, as this target sets up the 
dependencies-paths of the frameworks and plugins. This is mandatory to bundle 
the osg-frameworks + plugins with your app.

cheers,

Stephan


Am 13.11.2013 um 04:26 schrieb Ronald Aldrich raldr...@mac.com:

 Stephan,
 
 I think I've found the issue - it seems that the 
 AvailableReaderWriterIterator isn't being used safely.
 
 In ReaderWriter::ReadResult Registry::read(const ReadFunctor readFunctor) 
 you'll find:
 
 // first attempt to load the file from existing ReaderWriter's
 AvailableReaderWriterIterator itr(_rwList, _pluginMutex);
 for(;itr.valid();++itr)
 {
 ReaderWriter::ReadResult rr = readFunctor.doRead(*itr);
 if (readFunctor.isValid(rr)) return rr;
 else results.push_back(rr);
 }
  
 and later on…
 
 // now look for a plug-in to load the file.
 std::string libraryName = 
 createLibraryNameForFile(readFunctor._filename);
 if (loadLibrary(libraryName)!=NOT_LOADED)
 {
 for(;itr.valid();++itr)
 {
 ReaderWriter::ReadResult rr = readFunctor.doRead(*itr);
 if (readFunctor.isValid(rr)) return rr;
 else results.push_back(rr);
 }
 }
 
 
 
 The first loop runs through the iterator until itr.valid() returns false.
 
 The second loop never runs because itr.valid() immediately returns false, or 
 because a compiler optimization assumed that it would return false.
 
 I suspect that when loadLibrary is called, the library is inserted into 
 _rwList, which would cause itr.valid() to return true, but it appears that 
 the second call (and the loop it's in) were optimized away.
 
 The following code
 
 // now look for a plug-in to load the file.
 std::string libraryName = 
 createLibraryNameForFile(readFunctor._filename);
 if (loadLibrary(libraryName)!=NOT_LOADED)
 {
  AvailableReaderWriterIterator itr(_rwList, _pluginMutex);
 for(;itr.valid();++itr)
 {
 ReaderWriter::ReadResult rr = readFunctor.doRead(*itr);
 if (readFunctor.isValid(rr)) return rr;
 else results.push_back(rr);
 }
 }
 
 appears to fix the issue.
 
 There's probably a way to tell the compiler that it can't optimize that call 
 away (careful placement of a volatile keyword?) but someone more familiar 
 with that aspect of C++ would have to do it.
 
 This all begs the question: How does one submit a bug report for 
 openscenegraph?
 
 - Ron
 
 On Nov 

Re: [osg-users] OpenSceneGraph and Mac OS X

2013-11-12 Thread Stephan Maximilian Huber
 
 On Nov 10, 2013, at 11:36 PM, Stephan Maximilian Huber 
 lis...@stephanmaximilianhuber.com wrote:
 
 HI,
 
 have you tried the cmake-setting  OSG_BUILD_APPLICATION_BUNDLES? Haven’t 
 tried this, as for me all example apps run from within xcode when compiling 
 for debug and setting the osgPlugins-folder correctly.
 
 OS X is a hard to track development platform as it changes a lot over the 
 years. Basically every year you’ll get a new version of xcode, new APIs, 
 new blablabla. The os x offers so many options in regard of development: do 
 you want to use frameworks, or dylibs, do you want to bundle it with your 
 app or just install it to the usual locations? 32bit, 64bit? Two years ago 
 there was even Carbon around the corner. And now IOS-development. 
 Hand-maintaining the xcode-project files were error-prone and a mess. Cmake 
 is not perfect but when setup correctly delivers xcode-project-files which 
 work for iOS and OS X.
 
 There are different ways to integrate osg with an existing os-x app. One 
 approach is using an GraphicsWindowEmbedded and do the context-setup by 
 yourself. 
 
 Another approach is to setup a osgViewer::GraphicsWindowCocoa::WindowData 
 and feed it into osg::GraphicsContext::Traits-object and create an 
 osg::GraphicsContext manually. After the viewer is realized you can get 
 back the created view via osgViewer::GraphicsWindowCocoa::WindowData:: 
 getCreatedNSView or [osgVIewer:: GraphicsWindowCocoa::getContext() view]
 
 I haven’t tried the osgViewerCocoa-example in years and can’t speak for it.
 
 cheers,
 
 Stephan
 
 
 Am 11.11.2013 um 01:31 schrieb Ronald Aldrich raldr...@mac.com:
 
 Thanks, Robert - I'll check that out.
 
 I'm wondering if there's a simple example application for cocoa, which 
 actually compiles and runs.  So far, I've gotten osgviewercocoa to compile 
 and link, but it doesn't run because it's not being packaged as an 
 application.
 
 I've gotten my own program to display an OSG window, with a lovely blue 
 background, but adding scene data to it doesn't seem to do anything, so I 
 find myself looking for a better starting point.
 
 It all feels like OSG has taken a huge step backward from where it was 
 several years ago when I first experimented with it, at least with regard 
 to Mac.  Back when, there were xcode project files which allowed you to 
 build a complete sample application and run it - now, you get tossed into 
 a morass of CMake settings, and spend a lot of time exploring dead ends 
 and configuration mistakes before you get anything at all to work.
 
 - Ron
 
 On Nov 10, 2013, at 1:39 AM, Robert Osfield robert.osfi...@gmail.com 
 wrote:
 
 Hi Ron,
 
 Apple keep moving the goal posts on their platform so it's a case of keep 
 trying to catch up with whatever the new flavour of the month is.  In OSG 
 svn/trunk I have checked in a submissions that allows one toggle which 
 libs to link against, look out for the OSG_CXX_LANGUAGE_STANDARD option, 
 set it to either C++98 or C++11.
 
 Robert.
 
 
 On 9 November 2013 19:25, Ronald Aldrich raldr...@mac.com wrote:
 It appears that the issue is that OpenSceneGraph is linked against 
 libstdc++, while my application was being linked against libc++.
 
 According to the documentation for libc++ ( http://libcxx.llvm.org ), the 
 two are not ABI compatible, and with the amount of inline code used in 
 OpenSceneGraph, it's not surprising that the two don't co-exist.
 
 Linking my application against libstdc++ stopped it from crashing, which 
 should solve the issue for now, but I'd really like to be using libc++ 
 instead, because it brings C++11 compatibility as well as performance 
 improvements.
 
 So, what would it take to configure OpenSceneGraph's build environment to 
 link against libc++, rather than libstdc++?
 
 - Ron
 
 On Nov 8, 2013, at 10:37 PM, Ronald Aldrich raldr...@mac.com wrote:
 
 Hello All,
 
 I'm new to OpenSceneGraph, so please bear with me.
 
 I'm attempting to write a Mac OS X native (cocoa) application that uses 
 OpenSceneGraph, and I'm having some difficulty.
 
 I created an XCode project to build OpenSceneGraph as a set of 
 frameworks (Using CMake), and I think I was mostly successful at that.
 
 Now, I'm trying to use those frameworks within my own application, and 
 having some difficulty.
 
 I've created a class (OSGView) along the lines of the OSGViewerCocoa 
 OSGViewer class - simplified, and modified for ARC.  That class doesn't 
 populate the scene data, and when the application runs,  a view filled 
 with blue is displayed - so good, so far.
 
 Next, I tried to create a triangle mesh to populate the scene data with, 
 and that's where my problem occurs - when one of the array objects I 
 created is deleted, the application crashes.
 
 I can simplify the problem down to the following:
 
 - (void) test
 {
  osg::ref_ptrosg::Vec3Array theVertices = new osg::Vec3Array(0);
 }
 
 When the Vec3Array is deleted, it crashes at the end of 
 Object::~Object(), with the code

Re: [osg-users] OpenSceneGraph and Mac OS X

2013-11-12 Thread Stephan Maximilian Huber
HI,

Am 12.11.2013 um 09:00 schrieb Stephan Maximilian Huber 
lis...@stephanmaximilianhuber.com:

 I am using a similar bundle-layout as yours, I usually don’t use the 
 osgPlugins-3.x-folder at all. All plugins are sitting in Plugins/

as a followup: here’s a screenshot of the bundle-layout of a working app:

http://scrups.cefix.org//cr/thxi3jv74sc40.png

cheers,

Stephan


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


Re: [osg-users] OpenSceneGraph and Mac OS X

2013-11-10 Thread Stephan Maximilian Huber
HI,

have you tried the cmake-setting  OSG_BUILD_APPLICATION_BUNDLES? Haven’t tried 
this, as for me all example apps run from within xcode when compiling for debug 
and setting the osgPlugins-folder correctly.

OS X is a hard to track development platform as it changes a lot over the 
years. Basically every year you’ll get a new version of xcode, new APIs, new 
blablabla. The os x offers so many options in regard of development: do you 
want to use frameworks, or dylibs, do you want to bundle it with your app or 
just install it to the usual locations? 32bit, 64bit? Two years ago there was 
even Carbon around the corner. And now IOS-development. Hand-maintaining the 
xcode-project files were error-prone and a mess. Cmake is not perfect but when 
setup correctly delivers xcode-project-files which work for iOS and OS X.

There are different ways to integrate osg with an existing os-x app. One 
approach is using an GraphicsWindowEmbedded and do the context-setup by 
yourself. 

Another approach is to setup a osgViewer::GraphicsWindowCocoa::WindowData and 
feed it into osg::GraphicsContext::Traits-object and create an 
osg::GraphicsContext manually. After the viewer is realized you can get back 
the created view via osgViewer::GraphicsWindowCocoa::WindowData:: 
getCreatedNSView or [osgVIewer:: GraphicsWindowCocoa::getContext() view]

I haven’t tried the osgViewerCocoa-example in years and can’t speak for it.

cheers,

Stephan


Am 11.11.2013 um 01:31 schrieb Ronald Aldrich raldr...@mac.com:

 Thanks, Robert - I'll check that out.
 
 I'm wondering if there's a simple example application for cocoa, which 
 actually compiles and runs.  So far, I've gotten osgviewercocoa to compile 
 and link, but it doesn't run because it's not being packaged as an 
 application.
 
 I've gotten my own program to display an OSG window, with a lovely blue 
 background, but adding scene data to it doesn't seem to do anything, so I 
 find myself looking for a better starting point.
 
 It all feels like OSG has taken a huge step backward from where it was 
 several years ago when I first experimented with it, at least with regard to 
 Mac.  Back when, there were xcode project files which allowed you to build a 
 complete sample application and run it - now, you get tossed into a morass of 
 CMake settings, and spend a lot of time exploring dead ends and configuration 
 mistakes before you get anything at all to work.
 
 - Ron
 
 On Nov 10, 2013, at 1:39 AM, Robert Osfield robert.osfi...@gmail.com wrote:
 
 Hi Ron,
 
 Apple keep moving the goal posts on their platform so it's a case of keep 
 trying to catch up with whatever the new flavour of the month is.  In OSG 
 svn/trunk I have checked in a submissions that allows one toggle which libs 
 to link against, look out for the OSG_CXX_LANGUAGE_STANDARD option, set it 
 to either C++98 or C++11.
 
 Robert.
 
 
 On 9 November 2013 19:25, Ronald Aldrich raldr...@mac.com wrote:
 It appears that the issue is that OpenSceneGraph is linked against 
 libstdc++, while my application was being linked against libc++.
 
 According to the documentation for libc++ ( http://libcxx.llvm.org ), the 
 two are not ABI compatible, and with the amount of inline code used in 
 OpenSceneGraph, it's not surprising that the two don't co-exist.
 
 Linking my application against libstdc++ stopped it from crashing, which 
 should solve the issue for now, but I'd really like to be using libc++ 
 instead, because it brings C++11 compatibility as well as performance 
 improvements.
 
 So, what would it take to configure OpenSceneGraph's build environment to 
 link against libc++, rather than libstdc++?
 
 - Ron
 
 On Nov 8, 2013, at 10:37 PM, Ronald Aldrich raldr...@mac.com wrote:
 
 Hello All,
 
 I'm new to OpenSceneGraph, so please bear with me.
 
 I'm attempting to write a Mac OS X native (cocoa) application that uses 
 OpenSceneGraph, and I'm having some difficulty.
 
 I created an XCode project to build OpenSceneGraph as a set of frameworks 
 (Using CMake), and I think I was mostly successful at that.
 
 Now, I'm trying to use those frameworks within my own application, and 
 having some difficulty.
 
 I've created a class (OSGView) along the lines of the OSGViewerCocoa 
 OSGViewer class - simplified, and modified for ARC.  That class doesn't 
 populate the scene data, and when the application runs,  a view filled with 
 blue is displayed - so good, so far.
 
 Next, I tried to create a triangle mesh to populate the scene data with, 
 and that's where my problem occurs - when one of the array objects I 
 created is deleted, the application crashes.
 
 I can simplify the problem down to the following:
 
 - (void) test
 {
 osg::ref_ptrosg::Vec3Array theVertices = new osg::Vec3Array(0);
 }
 
 When the Vec3Array is deleted, it crashes at the end of Object::~Object(), 
 with the code
 
 Thread 1: EXC_BAD_ACCESS (code=1, address= 0xfff8)
 
 I then thought I'd go back to basics, and build the 

Re: [osg-users] [osgPlugins] OSG 3.2.x slower than OSG 3.0.1??

2013-11-08 Thread Stephan Maximilian Huber
HI,

The forum2mail-gateway ate part of Tims message. Here’s the full message quoted 
from the forum:

 just a simple textured cube: 
 
 Event_Update_Cull_Draw_GPU 
 0.01__0.00__0.01__0.08__0.28 
 0.02__0.01__0.05__0.13__0.28 

cheers,

Stephan

Am 08.11.2013 um 12:02 schrieb Tim Rambau osgfo...@tevs.eu:

 Sorry,
 
 first line times from osgviewer 3.0.1
 second line times from osgviewer 3.2.1-rc1
 
 Same simple cube model with colored sides for both...
 
 Tim
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=57133#57133
 
 
 
 
 
 ___
 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] Build Problem with osgGA at MacOS with Xcode 5

2013-10-18 Thread Stephan Maximilian Huber
Hi Jan,

Curious, I had linking errors when compiling osg with c++11 for IOS, so I added 
the c++98-flags to cmake. The best we can do is to make it configurable via 
cmake.

cheers,

Stephan

Am 18.10.2013 um 10:25 schrieb Jan Klimke osgfo...@tevs.eu:

 Hi Robert,
 
 thanks for you reply.
 
 I am pretty sure that the settings did not change. But what i noticed is that 
 the build is running better when libc++ and the c++11 standard is used when 
 compiling.
 
 Currently if there is a clang compiler, the standard used is still c++98. 
 This is currently hard coded and not configurable from cmake. Since dependent 
 projects use the c++11 standard and libc++ as standard library 
 implementation, there are linking issues if osg is not build with libc++ due 
 to incompatibilities of std::string in libstdc++ and libc++
 
 
 I had to adapt some plugins (added some casts to remove compiling errors) in 
 oder to make osg compile. Do you think it is useful to switch the c++ 
 versions in CMAKE at least for newer CLANG versions. 
 
 The current Xcode provides the clang 5 as default compiler.
 
 Do you think these changes could be integrated into osg and the defaults can 
 be changed to libc++ and c++11 for clang compiling ?
 
 Thank you!
 
 Cheers,
 Jan
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=56849#56849
 
 
 
 
 
 ___
 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] OSG Multi-Touch input. TouchData [SEC=UNCLASSIFIED]

2013-09-11 Thread Stephan Maximilian Huber
Hi Mitch,

There is an implementation for WM_TOUCH in GraphicsWindowWin32, haven’t tested 
it personally. 

It should be easy to add support for TUIO-touch-events to the existing 
OscDevice, as TUIO is transported via OSC-messages. 

There’s also a recipe for intercepting TUIO-events via 
https://github.com/xarray/osgRecipes/wiki, haven’t worked with it. 

The multitouch-trackball-manipulator is not specific to the Apple trackpad, as 
it works with the TouchData of an osg-event and should be device-independent 
(I’ve tested it it on IOS and OS X). But as Christian already noted, the 
mt-manipulator is more a proof of concept than a stable working one. It’s hard 
to extend the existing manipulators, as they are all modeled with a single 
pointer device in mind.

As you can see multitouch is still in its early stages :-) so any help is very 
appreciated!

cheers,

Stephan


Am 11.09.2013 um 02:29 schrieb Doran, Mitchell (Student) 
mitchell.do...@dsto.defence.gov.au:

 UNCLASSIFIED
 
 Thanks for the reply, This example seems specific to the Apple Trackpad.
  
 It may prove useful yet; though there appears to be no bindings to get either 
 TUIO (touch protocol over UDP) data or WM_TOUCH (Windows) or ABS_MT (Ubuntu) 
 touch events into the osg environment.
  
 Its looking like I may have to write my own bindings to get TUIO events 
 recognized. 
 
 I think I remember seeing somewhere that Stephan had worked on something 
 similiar.
  
 Anybody else with any ideas how to get say TUIO events into osg land, what 
 would I need to implement?
 
 Mitch.
 
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christian 
 Buchner
 Sent: Tuesday, 10 September 2013 7:45 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] OSG Multi-Touch input. TouchData [SEC=UNCLASSIFIED]
 
 
 there is a MultiTouch camera manipulator in OSG 3.1 and OSG 3.2 which isn't 
 truly practical (zoom is way to sensitive), but it is a good sample on how to 
 process multi touch events.
 
 Christian
 
 
 
 2013/9/10 Doran, Mitchell (Student) mitchell.do...@dsto.defence.gov.au
 UNCLASSIFIED
  
  
 Hi All,
  
 I'm new to Open Scene Graph but have started looking into it in hopes that I 
 can manipulate a scene/camera using touch input; things like rotating  and 
 zooming. I've noticed the TouchData class which seems to provide some 
 underlying support for touch based input but I haven't seen much else  
 related to touch. Has the touch within OSG been fully implemented or is this 
 a work in progress?
  
 I haven't seen any code that attempts to bridge WM_TOUCH (Windows) or 
 ABS_MT_POS (Ubuntu) to allow these native touch events to be used within OSG  
 projects. Have I missed something, how are we meant to make use of TouchData?
  
 Are there any resources or discussions beside the following two? I would like 
 to make use of TouchData and eventually contribute to the OSG  project.
  
 http://forum.openscenegraph.org/viewtopic.php?t=7702
 http://forum.openscenegraph.org/viewtopic.php?t=7137
  
  
  
 Regards,
 Mitch Doran
  
 IMPORTANT: This email remains the property of the Department of Defence and 
 is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you 
 have received this email in error, you are requested to contact the sender 
 and delete the email.
  
  
 I'm new to Open Scene Graph but have started looking into it in hopes that I 
 can manipulate a scene/camera using touch input; things like rotating  and 
 zooming. I've noticed the TouchData class which seems to provide some 
 underlying support for touch based input but I haven't seen much else  
 related to touch. Has the touch within OSG been fully implemented or is this 
 a work in progress?
  
 I haven't seen any code that attempts to bridge WM_TOUCH (Windows) or 
 ABS_MT_POS (Ubuntu) to allow these native touch events to be used within OSG  
 projects. Have I missed something, how are we meant to make use of TouchData?
  
 Are there any resources or discussions beside the following two? I would like 
 to make use of TouchData and eventually contribute to the OSG  project.
  
 http://forum.openscenegraph.org/viewtopic.php?t=7702
 http://forum.openscenegraph.org/viewtopic.php?t=7137
  
  
  
 Regards,
 Mitch Doran
  
 IMPORTANT: This email remains the property of the Department of Defence and 
 is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you 
 have received this email in error, you are requested to contact the sender 
 and delete the email.
  
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 IMPORTANT: This email remains the property of the Department of Defence and 
 is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you 
 have received this email in error, you are requested to 

Re: [osg-users] Build problems on OSX - VideoFrameDispatcher.cpp

2013-09-11 Thread Stephan Maximilian Huber
Hi,any chance you are using a case-sensitive file-system? There seems to be a typo in one of the CMakeList-files which does not show up on case-insensitive file-systems (which are defacto standard on OS X)Can you try the attachedCMakeList.txtfile? It should be saved into src/osgPlugins/avfoundationcheers,StephanAm 11.09.2013 um 14:24 schrieb Edward Moyse edward.mo...@cern.ch:




Hi all,


I've been trying for a while to compile v3.2.0, but I keep running into the same problem:

CMake Error at CMakeModules/OsgMacroUtils.cmake:278 (ADD_LIBRARY):
 Cannot find source file:
  ../QTKIt/VideoFrameDispatcher.cpp



I think I followed the directions correctly (and in fact I tried many different approaches). An example of what I tried was:

  mkdir build
  cd build
  cmake ../OpenSceneGraph -DCMAKE_BUILD_TYPE=Release



I'm running on OSX 10.8.4.Any advice would be much appreciated!


Cheers,


Ed




___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.orgINCLUDE_DIRECTORIES( ${AV_FOUNDATION_INCLUDE_DIR} )

SET(TARGET_SRC
OSXAVFoundationVideo.mm
OSXAVFoundationVideo.h
../QTKit/VideoFrameDispatcher.h
../QTKit/VideoFrameDispatcher.cpp
OSXAVFoundationCoreVideoTexture.h
OSXAVFoundationCoreVideoTexture.cpp
ReaderWriterAVFoundation.cpp
)

SET(TARGET_LIBRARIES_VARS AV_FOUNDATION_LIBRARY COCOA_LIBRARY COREVIDEO_LIBRARY 
COREMEDIA_LIBRARY QUARTZCORE_LIBRARY)
SET(TARGET_ADDED_LIBRARIES osgViewer )

 end var setup  ###
SETUP_PLUGIN(avfoundation)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem loading RGB values when alpha = 0 on mac osx

2013-08-04 Thread Stephan Maximilian Huber
Hi Paulo,

Am 02.08.2013 um 21:14 schrieb Paulo Silva paulo.jn...@gmail.com:

 Somewhere in the loading some sort of alpha pre-multiplying is going on.

Unfortunately the imageio-plugin load its files with premultiplied alpha, as 
you discovered already. The image-io-plugin does demultiply the alpha again, 
but can't restore rgb-values with alpha 0 and there are some rounding 
differences. Between 3.0 and 3.2 I added an optimization to use apples 
optimized demultipliying-algorithm instead of the prior home cooked version.

If you are in need for exact rgba-values use libpng (just edit the cmake-files) 
or another image-plugin like rgba. 

cheers,

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


Re: [osg-users] [osgPlugins] Unable to compile resthhtp

2013-07-18 Thread Stephan Maximilian Huber
Hi Torben,

the rest-http-plugin needs the separate asio-lib (technically only the 
headers).It can work with asio packaged by boost, but then you'll need the 
boost library files. With the current setup the resthttp plugin does only need 
the asio- and boost-headers, no libs needed. This was easier to setup, 
especially on windows.

Point the ASIO_INCLUDE_DIR to the include-folder of asio, e.g. 
my-asio-folder/include

I don't know why the var is named Boost_INCLUDE_DIRS, this is a var provided by 
cmake, so I used that. Point it to the root-folder of your boost-download.

HTH,

Stephan



Am 18.07.2013 um 13:05 schrieb Torben Dannhauer tor...@dannhauer.info:

 Hi,
 I tried to compile restHHTP plugin and failed with lots of compilation errors.
 
 The documentation is very spare, so I tried to get some infos here, then I 
 will pimp the CMAke files.
 
 What kind of asio do I need?
 the boost version or standalone?
 
 Which CMake variables do I have to set? There are some Boost related 
 variables, but it is not clear which are required for the httprest plugin.
 
 The CMakeLists.txt uses these variables:
 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
 INCLUDE_DIRECTORIES(${ASIO_INCLUDE_DIR})
 
 - Why is Boost_INCLUDE_DIRS plural? What list of directories should be 
 contained in this variable?
 - Where should Boost_INCLUDE_DIRS piont to? to the folder _containing_ the 
 boost directory (parent folder of boost) with all headers in it, or shoult 
 it contain the boost directory itself?
 - If the first points to the boost includes at all, why is a second variable 
 ASIO_INCLUDE_DIR required? 
 - What kind of ASIO do I need, boost or standalone?
 - Where should ASIO_INCLUDE_DIR point to in details?
 
 
 Thanks for your clarifications.
 
 Cheers,
 Torben
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=55247#55247
 
 
 
 
 
 ___
 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] Problems building OSC plugin on VS2008

2013-01-07 Thread Stephan Maximilian Huber
Hi Chris,

the osc-plugin compiles fine on my end with VS 2005. Is this a 64bit build?

cheers,
Stephan

Am 05.01.13 20:35, schrieb Chris Hanson:
 Anyone else encountering this? I have no clue, we're just trying to
 batch-build.
 
 d:\osg\trunk_vs9_x64_debug\src\osg\trunk\build\product\src\osgplugins\osc\osc\OscOutboundPacketStream.h(101)
 : error C2535: 'osc::OutboundPacketStream
 osc::OutboundPacketStream::operator (osc::int32)' : member function
 already defined or declared
 ... 
 d:\osg\trunk_vs9_x64_debug\src\osg\trunk\build\product\src\osgplugins\osc\osc\OscOutboundPacketStream.h(97)
 : see declaration of 'osc::OutboundPacketStream::operator '
 
 .\daeReader.cpp(298) : error C2039: 'data' : is not a member of
 'std::vector_Ty'
 ... with
 ... [
 ... _Ty=char
 ... ]
 
 
 
 
 
 ___
 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] Video textures on iOS (and audio)

2012-12-19 Thread Stephan Maximilian Huber
Hi all,

just a short heads-up: the recent introduced avfoundation-plugin works
now an IOS 6, so you can playback videos on your ios-device.

There may be some bugs lurking around, and fast texture-upload via
CoreVideo is not implemented yet, will come in a future version,

cheers,

Stephan

Am 01.10.12 17:47, schrieb Bruno Ronzani:
 Steph,
 
 Thank you ! Can't wait to see that :)
 
 Please keep us informed !
 
 Cheers,
 
 Bruno
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=50364#50364
 
 
 
 
 
 ___
 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] timestamp in movie

2012-12-07 Thread Stephan Maximilian Huber
Hi David,
Am 07.12.12 09:53, schrieb DavidHornung:

 Currently I am playing around with example osgmovie
 how is it possible to get the timevalue of a video from the start of the
 video to now ?

what about osg::ImageStream::getCurrentTime() ? May not be implemented
by all movie-plugins.


cheers,
Stephan

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


Re: [osg-users] osgmovie seek/jump

2012-11-29 Thread Stephan Maximilian Huber
Hi David,

Am 29.11.12 13:55, schrieb DavidHornung:
 I am playing around with the osgmovie with ffmpeg example and was not
 able to seek with '' or to increase/decrease the speed with ± in the
 osgmovie examle from version 3.0.1 from July.
 
 I would like to know if it is possible now to jump to a specific
 position of videofile by an exact time value ?

This functionality depends on the used plugin. avfoundation/qtkit can
seek to a specific time, or change the playback-speed.

Don't know if the ffmpeg plugin can do this, have a look at the code ;-)

cheers,

Stephan

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


Re: [osg-users] IOS Linking error Undefined symbols for architecture i386: _graphicswindow_IOS

2012-11-29 Thread Stephan Maximilian Huber
Hi,

you'll have to add all needed libs to your ios-app. Most notably
libOpenThreads, libosg, libosgGA, libosgDB, libosgUtil, libosgViewer.

_graphicsWindow_IOS should be part of the osgViewer-lib.

Sorry, getting osg compiling running on ios is a bit rough. If you have
a working set of libs and includes the experience is getting better :-)

There's a helper script to compile all libs for debug/release and
device/simulator and combine them to universal libs at
https://github.com/stmh/osg/tree/iphone/PlatformSpecifics/iOS This
script will create two xcode-project-files (simulator / device), compile
all libs + plugins and bundle the libs. I think I submitted it to
osg.submission, but it's not merged yet to osg-trunk.

cheers,

Stephan
Am 29.11.12 13:05, schrieb Koduri Lakshmi:
 Hi,
 
 I added libOpenThreads.a file to BuildPhases-Link Binary With Libraries. 
 Then I am getting the following error
 
 
 Code:
 Command 
 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ 
 failed with exit code 1
 
 
 
 I am getting the same error for Debug/Release builds. I created both 
 Debut/Release .a files to OSG. I got these .a files from BUILD-lib folder.
 
 Can you please any one help how to solve this linker error.
 
 ... 
 
 
 Thank you!
 
 Cheers,
 Koduri
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=51289#51289
 
 
 
 
 ___
 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] OSC plugin on Windows?

2012-11-20 Thread Stephan Maximilian Huber
Hi all,

attached cmakelist.txt fixes the build for windows. There was an
additional missing lib.

Can you test it on your end?

cheers,
Stephan
Am 20.11.12 11:38, schrieb Robert Osfield:
 Hi Paul, Christian, Stephan et. al,
 
 On 20 November 2012 07:36, Christian Schulte 
 christian.schu...@onera.frwrote:
 
 looking at the errors the missing windows lib would be the one containing
 the network features, as I know it is the basic WinSock library ws2_32.dll.

 
 I've just copied in the include of ws2_32.dll as is done in the osgcluster
 example, could you do an svn update and let me know if this fixes the build?
 
 Robert.
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR})

SET(TARGET_SRC
ip/IpEndpointName.cpp
osc/OscOutboundPacketStream.cpp
osc/OscPrintReceivedElements.cpp
osc/OscReceivedElements.cpp
osc/OscTypes.cpp
OscDevice.cpp
OscProxyEventHandler.cpp
ReaderWriterOscDevice.cpp
)

SET(TARGET_H
ip/IpEndpointName.h
ip/NetworkingUtils.h
ip/PacketListener.h
ip/TimerListener.h
ip/UdpSocket.h
osc/MessageMappingOscPacketListener.h
osc/OscException.h
osc/OscHostEndianness.h
osc/OscOutboundPacketStream.h
osc/OscPacketListener.h
osc/OscPrintReceivedElements.h
osc/OscReceivedElements.h
osc/OscTypes.h
OscProxyEventHandler.hpp
OscDevice.hpp
)

if(WIN32)
SET(TARGET_SRC
${TARGET_SRC}
ip/win32/NetworkingUtils.cpp 
ip/win32/UdpSocket.cpp
)
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} Ws2_32.lib 
winmm)
ELSE()
SET(TARGET_SRC
${TARGET_SRC}
ip/posix/NetworkingUtils.cpp 
ip/posix/UdpSocket.cpp
)
ENDIF()

SET(TARGET_ADDED_LIBRARIES osgGA )

 end var setup  ###
SETUP_PLUGIN(osc)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] R: building OSG 3.0.1 on Mac Snow Leopard

2012-11-16 Thread Stephan Maximilian Huber
Hi Gianluca,

the message PixelBufferCocoa :: realizeImplementation not implemented
yet should not lead to a crash.

Without a stack-trace it's hard to tell why your app crashes.

And please keep the discussion on the osg-users-list, so other have a
chance to search the archive.

cheers,

Stephan
Am 16.11.12 12:13, schrieb Gianluca Natale:
 Hi Stephan,
 thanks for your answer.
 
 I did what you suggested, that is to say use the libs provided by the system, 
 and set OSG_WINDOWING_SYSTEM to Cocoa.
 Anyway, while it builds OSG (on a MacOS 10.6.8), it gave me these warnings, 
 which I don't know the meaning of (sorry, I don't know objective-C at all):
 
 Warning: class 'GraphicsWindowCocoaDelegate' does not implement the 
 'NSWindowDelegate' protocol.
 
 I ignored it, since it built OSG in any case.
 Then I built my application based upon OSG, and everything built without 
 errors and warning.
 But when I launched it, I see this message on screen:
 
 PixelBufferCocoa :: realizeImplementation not implemented yet
 
 And my application quits unexpectedly.
 I still haven't debugged yet, I wonder if that might be the cause of such 
 exit.
 I just took a look at your code in PixelBufferCocoa.mm, but as I told you I 
 don't know anything of Objective-C.
 
 Thanks,
 Gianluca
 
 
 -Messaggio originale-
 Da: Stephan Maximilian Huber [mailto:ratzf...@digitalmind.de] 
 Inviato: giovedì 15 novembre 2012 12:39
 A: OpenSceneGraph Users
 Cc: Gianluca Natale
 Oggetto: Re: [osg-users] building OSG 3.0.1 on Mac Snow Leopard
 
 Hi Gianluca,
 
 it should be safe to use the libs provieded by the system. Carbon is 
 deprecated, and most new features went into the cocoa window implementation 
 of osg, so please use the cocoa window-implementation.
 
 
 cheers,
 
 Stephan
 Am 14.11.12 17:19, schrieb Gianluca Natale:
 Hi all,
 I'm trying to build OSG 3.0.1 on Mac OSX 10.6 using the procedure 
 well-described on OSG website.
 But when I clicked on Configure in CMake-gui, after setting Where is the 
 source code and Where to build the binaries, I gotten many 
 red-highlighted options.
 I could fix most of them (actually I didn't set my build folder as 
 suggested, i.e. the prebuilt packages for dependencies are not in 
 OpenSceneGraph/3rdParty), but I have some doubt for some of them, I hope 
 anyone can give me some tip. Sorry if these are all silly questions!

 CURL LIBRARY:
 CURL_INCLUDE_DIR points to /usr/include, instead of pointing to 
 /myBuildfolder/3rdParty/include, where I unzipped the prebuilt packages.
 So, curl is already installed on my system, and the version I have there is 
 4. But in prebuilt packages there is version 4.1. Should I use the newest 
 one?

 FREETYPE LIBRARY:
 Same as CURL, it is already installed on my system. Should I use in any case 
 that provided in the prebuilt packages, or can I leave that gotten from the 
 system?

 OSG_WINDOWING_SYSTEM defaults to Carbon on my machine. Isn't it deprecated? 
 Should I change it to Cocoa?

 ZLIB LIBRARY:
 Same question as curl, should I use in any case the version provided in the 
 prebuilt packages?

 Thanks,
 Gianluca




 ___
 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] building OSG 3.0.1 on Mac Snow Leopard

2012-11-15 Thread Stephan Maximilian Huber
Hi Gianluca,

it should be safe to use the libs provieded by the system. Carbon is
deprecated, and most new features went into the cocoa window
implementation of osg, so please use the cocoa window-implementation.


cheers,

Stephan
Am 14.11.12 17:19, schrieb Gianluca Natale:
 Hi all,
 I'm trying to build OSG 3.0.1 on Mac OSX 10.6 using the procedure 
 well-described on OSG website.
 But when I clicked on Configure in CMake-gui, after setting Where is the 
 source code and Where to build the binaries, I gotten many red-highlighted 
 options.
 I could fix most of them (actually I didn't set my build folder as suggested, 
 i.e. the prebuilt packages for dependencies are not in 
 OpenSceneGraph/3rdParty),
 but I have some doubt for some of them, I hope anyone can give me some tip. 
 Sorry if these are all silly questions!
 
 CURL LIBRARY:
 CURL_INCLUDE_DIR points to /usr/include, instead of pointing to 
 /myBuildfolder/3rdParty/include, where I unzipped the prebuilt packages.
 So, curl is already installed on my system, and the version I have there is 
 4. But in prebuilt packages there is version 4.1. Should I use the newest one?
 
 FREETYPE LIBRARY:
 Same as CURL, it is already installed on my system. Should I use in any case 
 that provided in the prebuilt packages, or can I leave that gotten from the 
 system?
 
 OSG_WINDOWING_SYSTEM defaults to Carbon on my machine. Isn't it deprecated? 
 Should I change it to Cocoa?
 
 ZLIB LIBRARY:
 Same question as curl, should I use in any case the version provided in the 
 prebuilt packages?
 
 Thanks,
 Gianluca
 
 
 
 
 ___
 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] OS X users please test the current image-io plugin (rev 13188)

2012-11-06 Thread Stephan Maximilian Huber
Hi all,

Robert committed (rev 13188) a better version of the image-io-plugin,
which should improve the performance when opening image-files as I
replaced some functionality with functions from Apple's
accelerate-framework.

Can you please test this new version with your assets, if everything is
still working nicely?

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


Re: [osg-users] Video textures on iOS (and audio)

2012-10-01 Thread Stephan Maximilian Huber
Hi

I have some working code playing a video inside OSG, it's IOS 6 only and
needs some porting to the osg-plugin-mechanism and some other enhancements.

I am currently busy with other work, so this has to wait for some more time.

cheers,

Stephan
Am 01.10.12 15:58, schrieb Bruno Ronzani:
 hi !
 
 any results in using OSG to play videos on IOS ?
 
 using ffmpeg is not an option ?
 
 cheers,
 
 bruno
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=50361#50361
 
 
 
 
 
 ___
 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] Binding Multiple COLOR_BUFFERn's to a FRAME_BUFFER_OBJECT ?

2012-09-14 Thread Stephan Maximilian Huber
Hi Randall,
Am 14.09.12 13:54, schrieb Randall Hand:
 As for FBO vs PBuffer, I'm running right now on a LAte 2011 MAcbook Pro,
 with the ATI chipset..  I thought FBO's were supported but maybe not...

FBOs do work on MacBookPro 2011 and OS X. How is your setup of the
graphic-context looking like?

cheers,

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


Re: [osg-users] [osgPlugins] Loading 32bit floating point grayscale texture with ImageIO (Mac OSX)

2012-09-13 Thread Stephan Maximilian Huber
Hi Matthias,

can you post the complete file?

cheers,

Stephan
Am 13.09.12 14:59, schrieb Matthias Thöny:
 Hi Stephan,
 
 thanks for your file and the information. I saw that the file contains all 
 values from 0...1 and I realized that with the current implementation this is 
 not working, because as far as I have seen, after the call
 
 
 Code:
 
 CGContextDrawImage(bitmap_context, rect, image_ref);
 CGContextRelease(bitmap_context);
 
 
 
 
 the byte array contains values like
 
 128 128 128 255 (for 1 Pixel).
 
 So in fact, may be there are in the end float values, but they are scaled to 
 1... 255 in the current implementation, this is also why you end up having 
 RGBA and unsigned byte. (probably there is aliasing in the resulting 
 OSG::Image). 
 
 I tried implementing this by myself and realized, that the whole function 
 should probably get another iteration, because at the moment the 
 bits_per_component are restricted to 8 and datatypes on grayscale bigger than 
 8 bits are not handled properly. 
 
 So it should be:
 
 
 Code:
 
 size_t bits_per_component = CGImageGetBitsPerComponent(image_ref);
 //size_t bits_per_component = 8;
 
 
 
 
 further at the position where you also fixed something the code should 
 contain a switch more, for the bits_per_component. Here is what I did (I did 
 not test the code with other pictures formats (gif, png etc..):  
 
 
 Code:
 
 case 16:
 {
 BLOCKQUOTEimage_data = calloc(width * 2, height);
 internal_format = GL_R; 
 pixel_format = GL_RED;
 data_type = GL_UNSIGNED_SHORT;
 
 bytes_per_row = width*2;
 color_space = CGColorSpaceCreateDeviceGray();
 bits_per_component = 16;
 #if __BIG_ENDIAN__
 bitmap_info = kCGImageAlphaNone | kCGBitmapByteOrder32Big; /* XRGB Big Endian 
 */
 #else
 bitmap_info = kCGImageAlphaNone | kCGBitmapByteOrder32Little; /* XRGB Little 
 Endian */
 #endif 
 bitmap_context = 
 CGBitmapContextCreate(image_data,width,height,bits_per_component,bytes_per_row,color_space,alpha_info);
 break;
 /BLOCKQUOTE}
 case 32:
 case 64:
 {
 BLOCKQUOTEimage_data = (float*)calloc(width * 4, height);
 switch(bits_per_component)
 {
 BLOCKQUOTEcase 8:
 {
 BLOCKQUOTEinternal_format = GL_RGBA8;
 pixel_format = GL_BGRA_EXT;
 data_type = GL_UNSIGNED_INT_8_8_8_8_REV;
 
 bytes_per_row = width*4;
 color_space = CGColorSpaceCreateDeviceRGB();
 #if __BIG_ENDIAN__
 bitmap_info = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Big; /* 
 XRGB Big Endian */
 #else
 bitmap_info = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little; 
 /* XRGB Little Endian */
 #endif 
 break;
 /BLOCKQUOTE}
 case 32:
 {
 BLOCKQUOTEinternal_format = GL_R;
 pixel_format = GL_RED;
 data_type = GL_FLOAT;
 bytes_per_row = width*4;
 color_space = CGColorSpaceCreateDeviceGray();
 #if __BIG_ENDIAN__
 bitmap_info = kCGImageAlphaNone | kCGBitmapFloatComponents | 
 kCGBitmapByteOrder32Big; /* XRGB Big Endian */
 #else
 bitmap_info = kCGImageAlphaNone | kCGBitmapFloatComponents | 
 kCGBitmapByteOrder32Little; /* XRGB Little Endian */
 #endif
 bitmap_context = CGBitmapContextCreate(image_data, width, height, 
 bits_per_component, bytes_per_row, color_space, bitmap_info);
 break;
 /BLOCKQUOTE}
 /BLOCKQUOTE}
 break;
 /BLOCKQUOTE}
 
 
 
 
 I hope this helps others. I think for a submission one would have to refactor 
 the whole function. There are may be more cases to go especially for 64 bit 
 cases. 
 
 Thanks for the help!
 
 Matthias
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=50011#50011
 
 
 
 
 
 ___
 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] Please test svn/trunk in prep for 3.1.3 developer release

2012-09-07 Thread Stephan Maximilian Huber
Hi robert,

compiles fine for OS X, but breaks for IOS (GL ES 1.1) as GL_RGBA16 is
not defined.

Attached is a fix.

cheers,
Stephan
Am 07.09.12 11:28, schrieb Robert Osfield:
 Hi All,
 
 I plan to tag a developer release this afternoon, but before I do I'd
 like some feedback from testing out in the community to make sure that
 it's building a running OK.
 
 This dev release won't contain all the submissions that have
 accumulated over the last couple of months, if you one that is pending
 please be patient.  After taking things easy w.r.t open source dev
 over the summer I'm now steadily going through submissions, it's quite
 a backlog so it'll take me a few weeks to review them all.  During
 this period I plan to keep making dev releases rather than wait till
 all submissions have been processed.  If you feel a submission had
 been missed out/overlooked please don't be shy in checking up on
 progress on it, sometimes submissions I've actually responded to and
 await a response that hasn't forth coming so it's worth checking up
 just in case there is something else I need from the submission.
 
 Thanks you help in test :-)
 
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
*/

#ifndef OSG_IMAGE
#define OSG_IMAGE 1

#include osg/BufferObject
#include osg/Vec2
#include osg/Vec3
#include osg/Vec4
#include osg/FrameStamp
#include osg/StateAttribute

#include string
#include vector

#ifndef GL_VERSION_1_2
// 1.2 definitions...
#define GL_BGR  0x80E0
#define GL_BGRA 0x80E1
#define GL_UNSIGNED_BYTE_3_3_2  0x8032
#define GL_UNSIGNED_BYTE_2_3_3_REV  0x8362
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
#define GL_UNSIGNED_SHORT_4_4_4_4   0x8033
#define GL_UNSIGNED_SHORT_4_4_4_4_REV   0x8365
#define GL_UNSIGNED_SHORT_5_5_5_1   0x8034
#define GL_UNSIGNED_SHORT_1_5_5_5_REV   0x8366
#define GL_UNSIGNED_INT_8_8_8_8 0x8035
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
#define GL_UNSIGNED_INT_10_10_10_2  0x8036
#define GL_UNSIGNED_INT_2_10_10_10_REV  0x8368
#endif

#ifndef GL_COMPRESSED_ALPHA
#define GL_COMPRESSED_ALPHA 0x84E9
#define GL_COMPRESSED_LUMINANCE 0x84EA
#define GL_COMPRESSED_LUMINANCE_ALPHA   0x84EB
#define GL_COMPRESSED_INTENSITY 0x84EC
#define GL_COMPRESSED_RGB   0x84ED
#define GL_COMPRESSED_RGBA  0x84EE
#endif


#ifndef GL_ABGR_EXT
#define GL_ABGR_EXT 0x8000
#endif

#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
#define GL_RED  0x1903
#define GL_GREEN0x1904
#define GL_BLUE 0x1905
#define GL_DEPTH_COMPONENT  0x1902
#define GL_STENCIL_INDEX0x1901
#endif

#ifndef GL_RGBA16
#define GL_RGBA16   0x805B
#endif

#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || 
defined(OSG_GL3_AVAILABLE)
#define GL_BITMAP   0x1A00
#define GL_COLOR_INDEX  0x1900
#define GL_INTENSITY12  0x804C
#define GL_INTENSITY16  0x804D
#define GL_INTENSITY4   0x804A
#define GL_INTENSITY8   0x804B
#define GL_LUMINANCE12  0x8041
#define GL_LUMINANCE12_ALPHA4   0x8046
#define GL_LUMINANCE12_ALPHA12  0x8047
#define GL_LUMINANCE16  0x8042
#define GL_LUMINANCE16_ALPHA16  0x8048
#define GL_LUMINANCE4   0x803F
#define GL_LUMINANCE4_ALPHA40x8043
#define GL_LUMINANCE6_ALPHA20x8044
#define GL_LUMINANCE8   0x8040
#define GL_LUMINANCE8_ALPHA80x8045
#define GL_RGBA80x8058
#define GL_PACK_ROW_LENGTH  0x0D02
#endif

#ifndef GL_PACK_SKIP_IMAGES
#define GL_PACK_SKIP_IMAGES 0x806B
#define GL_PACK_IMAGE_HEIGHT0x806C
#define GL_UNPACK_SKIP_IMAGES   0x806D
#define GL_UNPACK_IMAGE_HEIGHT  0x806E
#endif

#ifndef GL_OES_compressed_ETC1_RGB8_texture
#define GL_ETC1_RGB8_OES0x8D64
#endif

namespace osg {

// forward declare
class NodeVisitor;

/** Image class for 

Re: [osg-users] [osgPlugins] Loading 32bit floating point grayscale texture with ImageIO (Mac OSX)

2012-09-06 Thread Stephan Maximilian Huber
Hi Matthias,

I am using 10.7. Send me a link or a sample file to me off-list, and
I'll try it on my end. This file (
https://dl.dropbox.com/u/697565/greyscale_32bit.tif ) worked on my end.

I made a small patch to the imageio-plugin (
https://github.com/stmh/osg/commit/66efda74ebf3b289fa2d55866023f59196d052a2
) to support 16bit PNGs, and I'll submit it to osg.submissions in the
next days. I think my patch is unrelated to your problem.

cheers,

Stephan
Am 06.09.12 17:51, schrieb Matthias Thöny:
 Hi stephan, 
 
 Thanks for the reply. I thought already that I am the only one doing this. 
 Actually I have already the problem getting the byte information. Which OSX 
 Version are you using? Would it be possible to have a sample picture just to 
 be sure that we are talking about the same. 
 
 Cheers,
 Matthias
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=49818#49818
 
 
 
 
 
 ___
 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] Loading 32bit floating point grayscale texture with ImageIO (Mac OSX)

2012-09-04 Thread Stephan Maximilian Huber
Hi,

I can load floating-point greyscale diffs via the imageio-plugin, but
they end all as RGBA/unsigned byte osg::Images.

There's definitely some code-paths missing :)

cheers,
Stephan
Am 04.09.12 16:12, schrieb Matthias Thöny:
 Hi,
 
 I am wondering if someone ever tried to load 32bit floating point grayscale 
 .tiff images under Mac OSX with ImageIO. This seems not working at all. This 
 is a specific problem for grayscale textures. 
 
 I tried to change the code in the ImageIO ReaderWriter class but obviously I 
 am doing something wrong. As far as documented it should be working:
 
 http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_context/dq_context.html#//apple_ref/doc/uid/TP30001066-CH203-SW9
 (search for Supported Pixel Formats)
 
 but the CGBitmapContextCreate tells you that this is not a valid combination 
 if you use:
 
 Gray 32 bpp, 32 bpc, kCGImageAlphaNone|kCGBitmapFloatComponents OS X
 
 Is there anybody who tried that before?
 
 Thank you!
 
 Cheers,
 Matthias
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=49738#49738
 
 
 
 
 
 ___
 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] [ANN] Looking for forum moderators and administrators

2012-08-16 Thread Stephan Maximilian Huber
Hi,

I can help out, and take some of the moderation tasks if needed. I am
part of this community since 2006 (i think), and i am helping people on
the list if possible. I do some contributions for OS X and iOS.

I am moderating a german speaking mailing-list with some other guys
since 2010.

cheers,

Stephan


Am 02.05.12 13:00, schrieb Art Tevs:
 Dear OSG-Community,
 
 I am posting this thread in order to find suitable persons to be moderator 
 and/or an administrator of the official OSG forum. What we need and expect 
 for specific tasks:
 
 Moderator (3-5 positions):
 - check if new users  do respect to our forum rules (i.e. name convention)
 - check and approve posts of new users (check for spam, ban usernames, kindly 
 ask users to change names, etc.)
 - check for double posts and merge them together (it happens sometimes that 
 threads are get separated and need to be merged again)
 - Usually it takes up-to max 30 minutes a day to moderate a forum. In best 
 case, when there are more moderators, this time decreases of course
 
 
 Administrator (1-2 position):
 - important You must have already be seen in our community, so that we really 
 know what expect from you. Or somebody of long term member can bail for you.
 - You must have experience with PHP and Unix environment.
 - You will get full access to forum's source code (on my servers) in order to 
 hunt for bugs. Yeah, there are still bugs which need to be solved
 
 
 
 I hope to find somebody who can take over this tasks. Moderators are 
 currently more important than an administrator. However due to the move of 
 OSG webpage to the new system and a wish to combine all the subsystems (svn, 
 joomla, forum, mailing list) into one, it would be great to have somebody who 
 can make this happen :) 
 
 Payment: No payment at all ladies and gentlemens, you do this for the sake of 
 our community :)
 
 Contact: Please post your applications directly here to this thread. In this 
 case we can learn you already before assigning you such a responsible 
 position. If you want to stay anonym, then write me a PM (or better email) 
 and I will try to discuss with senior community members  about your 
 application.
 
  
 Best regards
 Art
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=47493#47493
 
 
 
 
 
 ___
 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] change GraphicsWindowIOS

2012-08-15 Thread Stephan Maximilian Huber
Hi Laith,

Can't you set the opaque-property of the gl-view' layer before realizing
the viewer? (Out of my head:)

osgViewer::GraphicsWindowIOS* win =
dynamic_castosgViewer::GraphicsWindowIOS*(your_context);
if (win) {
UIView* view = (UIView*)win-getView();
CALayer* layer = view.layer;
if (layer) layer.opaque = NO;
}

if this doesn't work I recommend adding a new flag to
osgViewer::GraphicsWindowIOS::WindowData and checking that flag from
inside GraphicsWindowIOS.

For the latter solution you'll have to recompile osg. And please submit
your changes to osg.submission or create a pull request for
https://github.com/stmh/osg/tree/iphone

HTH,
Stephan

Am 15.08.12 12:17, schrieb Laith Dhawahir:

 Hi,
  is it possible that I change inside without compiling OpenSceneGraph again, 
 actually what am looking for us to make changes inside GraphicsWindowIOS to 
 support transparent background or there is a better way for doing that ?
 
 Thank you!
 
 Cheers,
 Laith
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=49266#49266
 
 
 
 
 
 ___
 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] imagestream webcam

2012-07-10 Thread Stephan Maximilian Huber
Hi,

create the image once and update it's data every frame and call dirty on
the image. It looks ike Convert_OpenCV_TO_OSG_IMAGE returns a newly
created image everytime it gets called.

cheers,
Stephan


Am 10.07.12 10:25, schrieb Antonio De Giorgio:
 Hi,
 i have a problem with the streaming of the webcam as texture of a geode.. i 
 grap frames with opencv and than i create a osg::Image from every frame that 
 apply as a texture..Now how can i create a imagestream as it is done in the 
 osgMovie example? if i use the same dynamic_cast obviously it gives me back a 
 null object...than how can i make the texture update itself?
 
 this is what i actually do (i'm now able to see just the first frame):
 
 osg::Image* image = Convert_OpenCV_TO_OSG_IMAGE(imageCV);
   //image-dirty();
 
   osg::ImageStream* imagestream = dynamic_castosg::ImageStream*(image);
   
 if (imagestream) 
   imagestream-play();
 
  if (image)
 {
 osg::notify(osg::NOTICE)image-s()image-s() 
 image-t()=image-t()std::endl;
  
 geode-addDrawable(myCreateTexturedQuadGeometry(pos,image-s(),image-t(),image,
  useTextureRectangle, xyPlane, flip));
 
 bottomright = pos + 
 osg::Vec3(static_castfloat(image-s()),static_castfloat(image-t()),0.0f);
 
 if (xyPlane) pos.y() += image-t()*1.05f;
 else pos.z() += image-t()*1.05f;
 }
 ... 
 
 
for(int i=0; (i!viewer.done()); i++){
capture = cvCaptureFromCAM( 0 );
   if ( !capture )
return -1;
imageCV = cvQueryFrame( capture );
   
   imageCV = cvQueryFrame( capture );
   if( !imageCV ) return 1;
   image = Convert_OpenCV_TO_OSG_IMAGE(imageCV);
   image-dirty();
 
   // viewer.setSceneData(geode);

 viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded);   
  
  viewer.frame();
  }
 
 
 Thank you!
 
 Cheers,
 Antonio
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=48782#48782
 
 
 
 
 
 ___
 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] iPad3 Retina Display Support

2012-06-18 Thread Stephan Maximilian Huber
Am 18.06.12 12:23, schrieb Joerke, Robin:

 I have developed an iPad-App using osgViewer::GraphicsWindowIOS.
 When deploying to an iPad 3 with iOS 5.1, I noticed that iOS automatically
 upscales the graphics context by factor 2, for filling the Retina Display.
 However, osg still renders in a low resolution (1024x768), leading to
 aliasing artifacts.
 
 I tried to increase the rendering resolution to 2048x1536, but I could not
 find out how to disable the iOS upscale. This leads to the problem that
 only a quarter of the rendered image is visible. Even changing the
 contentScaleFactor property of the UIView did not help.
 
 I read about osg already supporting Retina Displays. What am I missing?

Support for Retina-display is only available when compiling osg against
a SDK = 4.0

It should work out of the box, so when you request a graphicscontext for
1024x768 you'll get a view sized 1024x768 and a graphics-context with
2048 x 1536.

Hoy do you set up your GraphicsWindowIOS?

cheers,
Stephan

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


Re: [osg-users] iPad3 Retina Display Support

2012-06-18 Thread Stephan Maximilian Huber
Hi,

Your code looks correct to me. What is the ios deployment target for
the osg-project? It should be = 4.0

You can try to force the scale via

osg::ref_ptrosg::Referenced windata = new
 osgViewer::GraphicsWindowIOS::WindowData(self.view,
 osgViewer::GraphicsWindowIOS::WindowData::ALL_ORIENTATIONS, [[UIScreen
mainScreen] scale]);

(haven't tested this personally)

Stephan

Am 18.06.12 16:25, schrieb Joerke, Robin:
 Thanks for your reply.
 I am using iOS SDK 5.1.
 This is the initialization code inside of a UIViewController:
 
 osg::ref_ptrosg::GraphicsContext::Traits traits = new
 osg::GraphicsContext::Traits;
   CGRect lFrame = [self.view bounds];
   unsigned int w = lFrame.size.width;
 
   unsigned int h = lFrame.size.height;
   
   osg::ref_ptrosg::Referenced windata = new
 osgViewer::GraphicsWindowIOS::WindowData(self.view,
 osgViewer::GraphicsWindowIOS::WindowData::ALL_ORIENTATIONS);
 std::cout  the screen Scale is:   [[UIScreen mainScreen] scale]
  std::endl;
   // Setup the traits parameters
   traits-x = 0;
   traits-y = 0;
   traits-width = w;
   traits-height = h;
   traits-depth = 16; //keep memory down, default is currently 24
   //traits-alpha = 8;
   //traits-stencil = 8;
   traits-windowDecoration = false;
   traits-doubleBuffer = true;
   traits-sharedContext = 0;
   traits-setInheritedWindowPixelFormat = true;
   
   traits-inheritedWindowData = windata;
 
   // Create the Graphics Context
   osg::ref_ptrosg::GraphicsContext graphicsContext =
 osg::GraphicsContext::createGraphicsContext(traits.get());
   
 _viewer = new osgViewer::Viewer();
   
   if(graphicsContext)
   {
   _viewer-getCamera()-setGraphicsContext(graphicsContext);
   _viewer-getCamera()-setViewport(new osg::Viewport(0, 0, traits-width,
 traits-height));
   }
 
 Best regards,
 Robin Jörke
 
 
 
 Am 18.06.12 14:36 schrieb Stephan Maximilian Huber unter
 ratzf...@digitalmind.de:
 
 Am 18.06.12 12:23, schrieb Joerke, Robin:

 I have developed an iPad-App using osgViewer::GraphicsWindowIOS.
 When deploying to an iPad 3 with iOS 5.1, I noticed that iOS
 automatically
 upscales the graphics context by factor 2, for filling the Retina
 Display.
 However, osg still renders in a low resolution (1024x768), leading to
 aliasing artifacts.

 I tried to increase the rendering resolution to 2048x1536, but I could
 not
 find out how to disable the iOS upscale. This leads to the problem that
 only a quarter of the rendered image is visible. Even changing the
 contentScaleFactor property of the UIView did not help.

 I read about osg already supporting Retina Displays. What am I missing?

 Support for Retina-display is only available when compiling osg against
 a SDK = 4.0

 It should work out of the box, so when you request a graphicscontext for
 1024x768 you'll get a view sized 1024x768 and a graphics-context with
 2048 x 1536.

 Hoy do you set up your GraphicsWindowIOS?

 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
 


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


Re: [osg-users] Multi-touch on osg (Android)

2012-06-04 Thread Stephan Maximilian Huber
Hi

you'll need to code the logic by yourself. osg has no built-in gesture
recognition.

you can compute both zoom level and rotation from your multi-touch
input, no need to distinguish between them. Just store the start
touch-points and compare them with the current touch-points. compute the
zoom-level and the rotation-value from there.

cheers,
Stephan




Am 04.06.12 11:46, schrieb Rghima Ahlem:
 Hi,
 
 I work on th osgAndroidExampleGLES1, i want to work with multi -touch with 
 the buton change Navigation.
 one finger-drag
 two fingers-rotation, zoom.
 the problem is to difference between zoom in , zoom out and rotation
 Please help me to detect the type of moving.
 
 
 Thank you!
 
 Cheers,
 Rghima
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=48018#48018
 
 
 
 
 
 ___
 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] framerate drops drastically when turning child nodes on and off

2012-05-09 Thread Stephan Maximilian Huber
Am 09.05.12 09:31, schrieb Ulrich Hertlein:
 When running this on OS X I'm seeing some odd behaviour as well:
 - roughly every 7s there is a jump in the draw time (see attached screenshot)
 - this happens even when *not* switching between the two groups (no update 
 callback
 installed; both are visible at the same time)

I see dramatic performance degression, when rotating the cube to a
specific angle, performcance goes down from 60fps to 3fps. (MacPro with
an ATI Radeon HD 5770 1024 MB) Rotating the cube a bit more the
performance goes back to normal.

Maybe Mac OS X internal multithreaded-rendering is the culuprit here,
(which is enabled by default i think).

I've seen this jump every 7s too, but when running the app for a longer
time, the jump goes away.

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


Re: [osg-users] framerate drops drastically when turning child nodes on and off

2012-05-09 Thread Stephan Maximilian Huber
Am 09.05.12 15:26, schrieb John Kelso:
 Do you see the original problem as well? Does it act the same at .5 FPS and
 no switching, and degrade at 1 FPS?

I don't see the original problem, the draw time is constant for both
FPS, no peaks, nada.

Only if i rotate the cube about 180° performance decrease to 3-5fps,
regardless of the specified switch-timing.

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


Re: [osg-users] First OSG application on Ipad

2012-05-03 Thread Stephan Maximilian Huber
Hi Raymond,

Am 02.05.12 21:11, schrieb Raymond de Vries:

 I would like to follow your procedure to build a set of iOS libs and I
 am following your instructions in this mail and on the new website
 (which is progressing nicely btw, congrats!). I have some questions
 though...
 
 In this mail, you mention that cmake nightly build should be usable. In
 the mean time 2.8.8 is out there so I guess that one should be usable,
 as also mentioned on the osg iOS page.
 
 Now when I try to use cmake 2.8.8 by running 'cmake-gui .' from within
 the osg svn folder, it doesn't find xcode. Do I need to configure xcode
 somehow in order to find it?

try

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

on the command-line

 About your github mirror, I am not sure what the status is, or how I
 should be able to use it. Browsing your mirror, the date of the files is
 not up-to-date. Could you please explain it a bit more?

Yes, my github mirror is currently not uptodate, I'll update it from
time to time. It's main purpose is the handmaintained xcode-project
whcih compiles out of the box (w/o the need of cmake) and has some
working examples.

It's basically the same functionality Eduardo provides, no cmake needed,
working examples, handmaintained xcode-project file.

cheers,

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


Re: [osg-users] First OSG application on Ipad

2012-05-03 Thread Stephan Maximilian Huber
Hi Raymond,

Am 03.05.12 11:18, schrieb Raymond de Vries:

 I would like to follow your procedure to build a set of iOS libs and I
 am following your instructions in this mail and on the new website
 (which is progressing nicely btw, congrats!). I have some questions
 though...

 In this mail, you mention that cmake nightly build should be usable. In
 the mean time 2.8.8 is out there so I guess that one should be usable,
 as also mentioned on the osg iOS page.

 Now when I try to use cmake 2.8.8 by running 'cmake-gui .' from within
 the osg svn folder, it doesn't find xcode. Do I need to configure xcode
 somehow in order to find it?
 try

 sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

 on the command-line
 I tried that already before, I suspect something like that indeed. I
 tried it again and it does not help...

Can you post the cmake-error you get?

 I am trying to install a nightly build but it cannot be installed
 because 'a newer version is installed'. Any idea how I can uninstall the
 current cmake version? Deleting it from /Applications is not enough?!?

hmm, no idea.


 Ok, clear, I thought that indeed. Last night, I tried it and it worked
 ok out of the box. Almost ok, though: I get unresolved symbols from
 freetype. Which freetype should I use, and how should I install that?
 
 (sorry to ask newbie questions since I am still pretty new with Mac dev)

I ficed the freetype issue on github, do a git pull origin iphone and it
should work.

The previous freetype-lib worked only for the devie.

cheers,

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


Re: [osg-users] Mac OS runtime problem

2012-04-26 Thread Stephan Maximilian Huber
HI,

have you tried to compile your own code and osg with the llvm-gcc4.2
compiler? llvm-gcc 4.2 should include openMP. (Haven't tested that by
myself)

HTH,
Stephan


Am 26.04.12 11:09, schrieb Tobias Duckworth:
 Hi,
 
 I'm building OpenSceneGraph from the head of the trunk on Mac OS 10.7 Lion 
 using CMake.  The build works straight out of the box defaulting to the llvm 
 compilers.
 
 I'm using OpenSceneGraph in a project built using gcc-mp-4.7, and so linking 
 to the libraries built in the above step from my project.
 
 I'm experiencing a problem with primitive sets at runtime - Namely, a 
 primitive set I create causes a crash when it goes out of scope.
 
 I've managed to boil my problem down to a very simple implementation:
 
 
 Code:
 
 int main(int argc, char *argv[])
 {
 osg::ref_ptrosg::PrimitiveSet p = new osg::DrawElementsUByte();
 return 0;
 }
 
 
 
 
 
 When executed, with the OSG libraries built using llvm, and the program built 
 using gcc-mp-4.7, the following happens:
 
 
 Code:
 
 Tobys-MacBook-Pro:xxx tobiasduckworth$ ./3DRecon.app/Contents/MacOS/3DRecon 
 3DRecon(23649,0x7fff7612f960) malloc: *** error for object 0x10e163ec0: 
 pointer being freed was not allocated
 *** set a breakpoint in malloc_error_break to debug
 Abort trap: 6
 
 
 
 
 However, if I build the program using the same compiler (llvm) as OSG, then 
 it runs fine.
 
 My program uses OpenMP, so I need to use gcc to get this to compile, 
 otherwise I could move to llvm.
 
 I also tried to build OSG using gcc, but this failed due to osgViewer using 
 Objective C.
 
 Does anyone have any idea what might be going wrong here?
 Should I be able to build OSG using llvm and my application using gcc?
 
 Hoping someone can shed some light,
 ... 
 
 Thank you!
 
 Cheers,
 Tobias
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=47314#47314
 
 
 
 
 
 ___
 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] osx fail to configure

2012-04-11 Thread Stephan Maximilian Huber
Hi cedric,

Am 11.04.12 12:26, schrieb Cedric Pinson:
 I get this error while trying to compile osg on osx, any hints ?

clear the cmake-cache and re-run the configure step

this worked on my end.

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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-05 Thread Stephan Maximilian Huber
Hi,

is the Symbols hidden by default-setting in your xcode-project set to No?

cheers,
Stephan


Am 05.04.12 17:07, schrieb Mike Wozniewski:
 Hi,
 
 I just upgraded from OSG 2.9.8 to 3.1.1 and my project now crashes when 
 loading .osg models. The error occurs in 
 DeprecatedDotOsgWrapperManager::addDotOsgWrapper (see the backtrace below).
 
 The funny thing is that OSG examples work fine. It's just something to do 
 with my project settings. I'm using a custom XCode project, so it's hard to 
 post details here, but can anyone suggest where to look? Am I forgetting to 
 link with something that the deprecated wrappers would need?
 
 Everything else works well. In fact, if I enable more verbose notifications, 
 I see that the osgdb_osg plugin loads successfully:
 
 Code:
 FindFileInPath() : USING /usr/local/lib/osgPlugins-3.1.1/osgdb_osg.so
 Opened DynamicLibrary osgPlugins-3.1.1/osgdb_osg.so
 
 
 
 It looks like that plugin requests to load the osgdb_deprecated_osg plugin, 
 and then I get the crash immediately after this is printed:
 
 Code:
 FindFileInPath() : USING 
 /usr/local/lib/osgPlugins3.1.1/osgdb_deprecated_osg.so
 CullSettings::readEnvironmentalVariables()
 CullSettings::readEnvironmentalVariables()
 
 
 
 Image plugins (eg, jpeg work fine).
 
 Any ideas?
 
 Here's the interesting part of the backtrace:
 
 Code:
 
 #0  0x7fff92042b8c in __dynamic_cast ()
 #1  0x0001000f2573 in osg::NodeCallback::isSameKindAs (this=0x106bbc7b0, 
 obj=0x106bbc938) at NodeCallback:36
 #2  0x0001000f2501 in virtual thunk to 
 osg::NodeCallback::isSameKindAs(osg::Object const*) const () at 
 stl_vector.h:271
 #3  0x0001020c875c in 
 osgDB::DeprecatedDotOsgWrapperManager::addDotOsgWrapper ()
 #4  0x0001020c85bd in 
 osgDB::RegisterDotOsgWrapperProxy::RegisterDotOsgWrapperProxy ()
 #5  0x0001020c84a9 in 
 osgDB::RegisterDotOsgWrapperProxy::RegisterDotOsgWrapperProxy ()
 #6  0x000108278d3e in __cxx_global_var_init9 ()
 #7  0x000108278e6c in global constructors keyed to a ()
 #8  0x7fff5fc0fda6 in 
 __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
  ()
 #9  0x7fff5fc0faf2 in 
 __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE 
 ()
 #10 0x7fff5fc0d2e4 in 
 __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
  ()
 #11 0x7fff5fc0e0b7 in 
 __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
  ()
 #12 0x7fff5fc031b9 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
 #13 0x7fff5fc09657 in __dyld_dlopen ()
 #14 0x7fff8a0d495b in dlopen ()
 #15 0x0001020d1dde in osgDB::DynamicLibrary::getLibraryHandle ()
 #16 0x0001020d1aef in osgDB::DynamicLibrary::loadLibrary ()
 #17 0x000102113002 in osgDB::Registry::loadLibrary ()
 #18 0x000106f07247 in OSGReaderWriter::loadWrappers ()
 #19 0x000106f06524 in OSGReaderWriter::readNode ()
 #20 0x000106f05749 in OSGReaderWriter::readNode ()
 #21 0x000102129cb0 in osgDB::Registry::ReadNodeFunctor::doRead ()
 #22 0x0001021176eb in osgDB::Registry::read ()
 #23 0x00010211888e in osgDB::Registry::readImplementation ()
 #24 0x00010211a7ba in osgDB::Registry::readNodeImplementation ()
 #25 0x0001020b154c in osgDB::Registry::readNode ()
 #26 0x0001021076cb in osgDB::readNodeFile ()
 #27 0x0001000bd242 in osgDB::readNodeFile (filename=@0x10817ed70) at 
 ReadFile:106
 #28 0x0001000af884 in spin::ModelNode::drawModel (this=0x107805c00) at 
 ModelNode.cpp:393
 #29 0x0001000b67ae in spin::ModelNode::setModelFromFile 
 (this=0x107805c00, filename=0x106d2d4c4 
 ~/src/OpenSceneGraph-Data-3.0.0/cow.osg) at ModelNode.cpp:162
 
 
 [/code]
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=46870#46870
 
 
 
 
 
 ___
 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] OpenThreads/Atomic currently broken with Xcode 4.3.1 and IOS

2012-03-22 Thread Stephan Maximilian Huber
Hi Ulrich,

Am 22.03.12 03:01, schrieb Ulrich Hertlein:
 This recently broke for me on OS X (with clang 3.1) as well.  Casting 
 'ptrOld' to (void*)
 works and this is also done for the other implementations (WIN32_INTERLOCKED 
 and
 BSD_ATOMIC) as well.
 
 No ideal, both 'ptrOld' and 'ptrNew' are only read and could actually both be 
 const but
 aren't for some reason.


thanks for the feedback, there's even a simpler solution: use the
BSD_ATOMIC implementation for IOS and OS X.

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


[osg-users] OpenThreads/Atomic currently broken with Xcode 4.3.1 and IOS

2012-03-12 Thread Stephan Maximilian Huber
Hi,

it seems that compiling osg and specifically OpenThreads is currently
broken for IOS when using xcode 4.3.1. The compilation fails at
OpenThreads/Atomic with

Users/stephan/Documents/Projekte/cefix/cefix/ios/../../libs/ios/include/OpenThreads/Atomic:244:48:
error: cannot initialize a parameter of type 'void *' with an lvalue of
type 'const void *const'
return __sync_bool_compare_and_swap(_ptr, ptrOld, ptrNew);

Googling around it seems, that this is because of a bug in the
clang-compiler: http://llvm.org/bugs/show_bug.cgi?id=11280

Has anybody an idea how to fix the issue? In the meantime i'll switch to
_OPENTHREADS_ATOMIC_USE_MUTEX

cheers,

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


Re: [osg-users] osg, macosx-x86_64 imageio plugin color byte swap problem

2012-02-22 Thread Stephan Maximilian Huber
Hi Chris,

I tested the imageio-plugin on os x 10.7 with an older 32bit build (from
Nov 2011) and it works for me. I tested only png and jpg files.



HTH,

Stephan

 Am 21.02.12 19:51, schrieb Chris Hanson:
 I had a user contact me for some assistance on this issue. I'm not an
 OSX/imageio guy, so I don't know the ramifications of this, and I thought
 I'd throw it out for the wider community to comment on before proposing a
 patch.
 
 From the user:
 We have found some image color ordering issue on MacOS Snow Leopard 10.6.
 We do x86_64 build, with imageio plugin.
 We set CMAKE flag: OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio
 For some reason, for all tested images, color channels Red and Blue were
 swapped.
 For instance in RGBA case, we have BGRA image.
 
   Now, I'm not familiar with the imageio plugin, but it seems like if it
 was horribly broken and returning the wrong channel order, someone would
 have noticed by now.
 
   Has anyone had problems with this on OSX 32-bit or 64-bit?
 
 
 
 
 ___
 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] OSG 3.0.1 on iOS 5

2012-02-22 Thread Stephan Maximilian Huber
Hi,

Am 22.02.12 09:51, schrieb Büsra Gülten:

 Another point I want to indicate is when main-method look like this: 
 
 

 @autoreleasepool 
 {
 return UIApplicationMain(argc, argv, nil, 
 NSStringFromClass([osgAppDelegate class]));
 }


Looks like your main-file gets compiled as Objective C only and chokes
about some c++-stuff. Try renaming the file from *.m to *.mm

cheers,
Stephan

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


Re: [osg-users] Compilation fails with recent version of osg for IOS / opengl es-builds

2012-02-21 Thread Stephan Maximilian Huber
Hi Robert,

I am sorry about the introduced bug, your fixes compile and work fine on
my end.

Looks like I should spend some time learning compiler macros again :)

Stephan


Am 21.02.12 11:38, schrieb Robert Osfield:
 Hi Stephan,
 
 On 27 January 2012 13:09, Stephan Maximilian Huber
 ratzf...@digitalmind.de wrote:
 attached you'll find a compile fix for the new introduced rowlength-feature.
 
 I've just spotted an error with the changes you made to avoid building
 the RowLength  feature under GLES - you changes disabled the feature
 for all platforms because you used the form:
 
#if !defined(OSG_GLES1_FEATURES)  !defined(OSG_GLES2_FEATURES)
 
 Which is always fails as both OSG_GLES1_FEATURES and
 OSG_GLES2_FEATURES are always defined - it's only their value either 0
 or 1 that determines which the GLES features are available.   By
 contrast the OSG_GLES1_AVAILABLE and OSG_GLES2_AVAILABLE are only
 defined when GLES is present so can be used in a similar manner -
 something that is already in use elsewhere in the OSG:
 
 #if !defined(OSG_GLES1_AVAILABLE)  !defined(OSG_GLES2_AVAILABLE)
 
 I've now modified your changes to use the _AVAILABLE form.  Could you
 do an svn update and let me know if it works fine for you.
 
 Thanks
 Robert.
 ___
 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] iOS and OSG in Xcode

2012-02-03 Thread Stephan Maximilian Huber
Hi Alex,

the generated xcode project is pretty big and xcode munges a lot of
cycles on it. Does it open at all if you wait some time? It takses two
minutes to open the project on an old macmini with 1.25GB RAM.

As an alternative you can try the handmaintained xcode-project from
github. It comes with a recent osg-version, but does not offer all
plugins but is usable for device and simulator.

https://github.com/stmh/osg/tree/iphone (use the iphone branch)

cheers,
Stephan


Am 03.02.12 10:29, schrieb Alex Olivas:
 Hey All,
 I'm trying to write an iOS app using OSG in Xcode
 ( all three of which are fairly new to me ) and am trying
 to get just a basic example working.  I followed the
 recipe in the README.txt to generate the Xcode project,
 but when I open it Xcode stops responding and the CPU
 pegs at 100%.  I'm assuming this is abnormal.
 
 I'm using OSG 3.0.1, Xcode 3.2.5, and the iPhone 4.2 SDK
 on Snow Leopard ( 10.6.8 ).
 
 Here's the recipe I followed : http://codepad.org/SsOergMF
 
 I set OSG_BUILD_PLATFORM_IPHONE_SIMULATOR and
 OSG_GLES2_AVAILABLE.  Also installed freetype from OF.
 
 Any ideas?  This is abnormal, right?  Any help would be
 greatly appreciated.
 Thanks,
 Alex.
 ___
 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] Compilation fails with recent version of osg for IOS / opengl es-builds

2012-01-27 Thread Stephan Maximilian Huber
Hi Robert,

Am 26.01.12 19:02, schrieb Robert Osfield:
 So disabling the feature would be fine for OpenGL ES, but on setting a
 non zero RowLength osg::Image under OpenGL ES it should emit a warning
 that it's not supported.

thanks for the explanation, I'll code + submit a fix for review.

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


[osg-users] Compilation fails with recent version of osg for IOS / opengl es-builds

2012-01-26 Thread Stephan Maximilian Huber
Hi all / Robert,

a recent commit to the repository (rev. 12912) broke compilation for ios
/ open gl es 1.1 as GL_UNPACK_ROW_LENGTH is not supported on that devices.

Before fixing this with some dumb ifdefs I'll ask for any consequences
when doing so, or for a better solution.

cheers,

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


Re: [osg-users] Mac OSX Lion Installation

2012-01-20 Thread Stephan Maximilian Huber
Hi,
Am 14.01.12 23:31, schrieb Erick Bazan:

 I'm really really new to OSG, I need to use it for my Virtual Environments 
 class. I have some experience with OpenGL in Mac with Xcode. I've been 
 searching all over the internet how to install OpenSceneGraph in Mac OSX Lion 
 and use it with Xcode (4). All I found was tutorials explaining how to 
 install it from the 2.8 dmg and I tried installing the binaries to the Lion 
 and Leopard SDK with no results. 
 
 Anyone know how to install or compile OSG projects from scratch in Lion with 
 Xcode, as I said, I'm new to the whole OSG. 

checkout/download the osg-source, download a recent cmake version, open
it, select the osg-source-tree, select a build-directory, select the
xcode-generator, make sure you set

OSG_WINDOWING_SYSTEM to Cocoa
CMAKE_INSTALL_PREFIX to your needs

If you want embeddable frameworks, set
OSG_COMPILE_FRAMEWORKS to 1 (otherwise you'll get dylibs)

generate the xcode-project files, open them in xcode, compile the
INSTALL-target, you should now find the frameworks/dylibs/plugins in
your folder given to the CMAKE_INSTALL_PREFIX

Probably the quicktime-plugin will not compile, there's a fix in
osg-submission waiting for review.

It's time to update the readme.txt as most of it's info regarding os x
is outdated.

HTH,

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


Re: [osg-users] osgParticle not working when using osgUtil:SceneView ?

2012-01-12 Thread Stephan Maximilian Huber
Hi,

have you tried the osxOpenSceneGraph[1] addon to embed OpenFrameworks
into OpenSceneGraph? It uses a osgCompositeViewer internally, but
unfortunately i didn't port it  to OF 007 yet.

cheers,
Stephan

[1]https://github.com/stmh/ofxOpenSceneGraph

Am 06.01.12 08:42, schrieb Stephane Bertout:
 Hi,
 
 
 I'm actually developing an application using openframework and 
 openscenegraph.. (I'm able to render 3d from osg inside my of application..)
 Now trying to integrate some particle effects and I have some issues where my 
 particles don't seem to be visible at all..
 I've basically copy pasted the particle code creation from the sdk example 
 (osgParticle.cpp) so the initialisation side must be correct ;-)
 The only difference with the example is that in my code I use 
 osgUtil::SceneView instead of osgViewer::Viewer
 I've obviously tried to move my camera without any luck..
 
 Before changing my code to use osgViewer::Viewer I just wanted to check with 
 the community... because it doesn't really make sense to me..
 
 Anyway.. any idea or anything to say please do not hesitate !
  
 
 Thank you!
 
 Cheers,
 ox
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=44652#44652
 
 
 
 
 
 ___
 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] Exporting to SVG from OpenSceneGraph.

2011-12-14 Thread Stephan Maximilian Huber
Hi,

AFAIK, osg is not capable to export geometry to SVG. I used gl2ps[1]
together with osg to export some geometry to SVG. Worked quite well.

cheers,
Stephan

[1] http://geuz.org/gl2ps/


Am 14.12.11 15:26, schrieb Jesper D. Thomsen:
 Hi guys,
 
 I have a question regarding exporting to SVG from OpenSceneGraph.
 In our software product we use OpenSceneGraph for both a model view window 
 and for a charting component. So far we have exported images from the 
 charting component as bitmap images (by just rendering them to an offscreen 
 pixelbuffer in the required resolution). We have however had some requests 
 for exports from our charting component in a vector format compatible with 
 the Microsoft Office software package (which pretty much means EMF files).
 
 Since EMF is very Microsoft-specific, I was thinking of using SVG as an 
 intermediate format, and then using some converter package to create the EMF 
 output.
 I saw SVG mentioned on the OSG mailing list earlier, but my question is 
 whether there is any way to render to vector SVG from OpenSceneGraph (I kind 
 of expect a hard no here)?
 
 The graph contents can be both 2D and 3D graphs and the 3D graphs can contain 
 shaded, but non-textured, 3D-surfaces.
 
 Thanks in advance.
 
 Jesper D. Thomsen
 AnyBody Technology
 
 
 
 
 ___
 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] RenderBin-question/problem

2011-11-17 Thread Stephan Maximilian Huber
Hi Laurens,

thanks for the explanation, that makes sense.

cheers,
Stephan

Am 16.11.11 13:20, schrieb Laurens Voerman:
 Hi Stephan,
 You created a nested renderbin, and because of its non negative bin
 number it will draw after the contents of the first bin.
 Both are DepthSortedBin with binNumber 10.

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


Re: [osg-users] [build] Cmake - The C compiler /usr/bin/gcc is not able to compile a simple test program.

2011-09-20 Thread Stephan Maximilian Huber
Hi,

Am 02.09.11 23:46, schrieb Tobias Weißhaar:
 I dont know whats the problem because the actual version of cmake is 
 installed and the gcc is also actual because the compiler will be installed 
 automatically with the installation of Xcode or?

it seems that xcode4 is incompatible with cmake when building for ios.
There are several reports in this forum, and even a cmake-bug-report:

http://cmake.org/Bug/view.php?id=12288

You can try the hand-maintained xcode-project from
https://github.com/stmh/osg/tree/iphone

Don't know how to fix that.

cheers,

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


Re: [osg-users] OSG on iOS

2011-09-08 Thread Stephan Maximilian Huber
Hi,

Am 08.09.11 15:14, schrieb Tobias Weißhaar:
 I want to develop OSG examples in iOS but OpenGL provides only a sub-set of 
 OSG. Is this the reason why for example this code doesnt work on the 
 simulator? :

yes

 osg::DrawElementsUInt* pyramidFaceOne = new 
 osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

DrawElementsUInt is not supported by OpenGL ES 1, Try DrawElementsUShort
instead.

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


Re: [osg-users] Drawing a simple sphere...

2011-08-31 Thread Stephan Maximilian Huber
Hi,

there seems to be a problem with the llvm-gcc compiler, osg and acosf,
see this thread for a possible solution:

http://forum.openscenegraph.org/viewtopic.php?t=8963highlight=llvm

If that doesn't help, can you post a stack-trace?

cheers,

Stephan


Am 30.08.11 20:16, schrieb Yann Blaudin de Thé:
 Can someone tell me what are the options to pass to cmake to
 compile OSG on OSX Lion? (either to a .framework form, or to a *nix
 form, like a .dylib) I definitely don't get it, and I'm not
 experienced enough to find it out by myself. As written in a
 previous mail, I used so far:
 
 OSG_WINDOWING_SYSTEM=Coca CMAKE_ARCHITECTURE='i386;x86_64' 
 OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio CMAKE_BUILD_TYPE=Release
 
 which seems quite relevant to me. The problem is that in this case,
 the program at the end of this mail crashes, with the error: Bus
 error: 10
 
 BTW, what you, Tony H., suggested doesn't work. Thank you anyway!
 
 Yann
 
 
 Le 29 août 2011 à 20:44, Tony Horrobin a écrit :
 
 Hi Yann,
 
 I have tried your code with osg trunk under Windows 7 32bit and
 can report that it does not crash.
 
 All I can suggest is to replace use of native pointers with
 osg::ref_ptr.
 
 So for example:
 
 Code: osg::Geode * geode = new osg::Geode();
 
 
 becomes
 
 
 Code: osg::ref_ptr Geode  geode = new osg::Geode();
 
 
 
 Cheers,
 
 -Tony
 
 -- Read this topic online here: 
 http://forum.openscenegraph.org/viewtopic.php?p=42293#42293
 
 
 
 
 
 ___ 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


Re: [osg-users] Mac OSX | Problem loading curl-plugin inside OSG-web-plugin

2011-08-09 Thread Stephan Maximilian Huber
Hi,

Am 08.08.11 18:22, schrieb Guido Lucci Baldassari:
 Does anyone know how I can obtain the path of @loader_path at runtime
 (a better solution than getenv(PWD))? Thanks in advance

you can try one of the NSBundle-methods:

NSBundle* bundle = [NSBundle bundleForClass: [self class]];
std::string plugin_path( [ [bundle builtInPlugInsPath] cString]);

This will give you the path to the PlugIns-folder inside your bundle.

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] Can't build version osg 2.9.11 for IOS using CMake

2011-08-05 Thread Stephan Maximilian Huber
Hi,

Am 04.08.11 05:16, schrieb Aruna Faster:
 Any help greatly appreciated.

Can you provide some more details, like used cMake- and XCode-version,
what OS you are using?

Seems like a bug with cmake and a newer xcode version when compiling
with the IOS-sdk:

http://cmake.org/Bug/view.php?id=12288

It works on my machine with xcode 3.2.x and cmake 2.8.x

Perhaps you can use the xcode-project files from
https://github.com/stmh/osg/tree/iphone

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] Build issues with OSX 10.6.7 using trunk (git)

2011-06-29 Thread Stephan Maximilian Huber
Hi Glenn,

what version of cmake are you using?

If you want 64bit-builds on OS X you'll need some minor adjustments via
cmake:

/usr/bin/cmake -G Xcode \
-D OSG_BUILD_FRAMEWORKS:BOOL=1 \
-D OSG_WINDOWING_SYSTEM:STRING=Cocoa \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=0 \
-D CMAKE_OSX_ARCHITECTURES:STRING=x86_64 \
-D OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX:STRING=imageio \
-D CMAKE_OSX_SYSROOT:STRING=/Developer/SDKs/MacOSX10.6.sdk .

then you should be able to compile osg via xcode or on the commandline
via xcodebuild.

you can omit the OSG_BUILD_FRAMEWORKS if you are not interested in them
and want unix-style dylibs. You can adjust the settings also via the
cmake gui.



Am 29.06.11 09:13, schrieb Glenn McCord:
 I'm totally confused by the cmake command I'm supposed to be using. From 
 various threads I've seen on the forums, I get the impression I need:
 
 cmake BUILD_OSG_APPLICATIONS=ON BUILD_OSG_EXAMPLES=ON 
 CMAKE_OS_ARCHITECTURES=x86_64 OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio -D 
 OSG_WINDOWING_SYSTEM=Cocoa
 
 But I get / ...path... / OSG_WINDOWING_SYSTEM:STRING=Cocoa does not exist.
 
 I guess I'm ultimately a bit confused on what osg can and can't do (as of the 
 current code base) in regards to 64bit/32bit. Plus it seems I'm not even 
 using cmake correctly (ouch)

Your syntax is wrong, if you want to pass variables to cmake, you should
do it via -D BUILD_OSG_APPLICATIONS:BOOL=1 (etc).

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


Re: [osg-users] Please test OSG-3.0 branch or 3.0.0-rc7

2011-06-28 Thread Stephan Maximilian Huber
Hi Robert,

Am 28.06.11 09:43, schrieb Robert Osfield:
 I'm now ready to tag 3.0.0 but if users have a OSG-3.0 branch checked
 out it'd great if you could do a final svn update and build to make
 sure that I haven't introduced any last minute errors. 

Rev. 12679 (osg.trunk) compiled w/o errors on OS X 32bit.

cheers,

Stephan

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


Re: [osg-users] weird problem with Intel GMAs

2011-06-28 Thread Stephan Maximilian Huber
Hi Chris,

Am 27.06.11 19:14, schrieb Chris 'Xenon' Hanson:

 I don't have an answer, but I wonder if gDebugger might give you any insight?

Thanks for the suggestion, I did something similar: I compared the raw
opengl command-stream (1x stats enabled, 1x stats disabled) with OpenGl
Profiler on a Mac and there's nothing special in the stats-part what
looks suspicious / is different from the other opengl commands.



cheers,

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


[osg-users] weird problem with Intel GMAs

2011-06-27 Thread Stephan Maximilian Huber
Hi all,


I am experiencing a weird problem with a custom osg-project (osg 2.9.x)
on windows xp and an Intel GMA 965 (I know, the intel-driver are crappy
as hell, but unfortunately I have to stick with them)

My scene consists basically of a textured quad, playing a video via a
TextureSubloadCallback. All works fine on OS X and other windows boxes.
On the intel-box the performance is really bad (about 3-4 fps)

If i switch the stats on, the performce restores back to normal: 60fps.
If I cycle through the various stat-modes performance is good, but as
soon as the stats are disabled, the performance is back to 3-4fps.

Any idea?

thanks in advance,

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


Re: [osg-users] weird problem with Intel GMAs

2011-06-27 Thread Stephan Maximilian Huber
Hi Robert,

thanks for your suggestion. Meanwhile I found a hack to fix my problem:
I added some GL_ALPHA-textured quads to the scene with alpha 0 (mimicing
osgText). Don't ask me why.

thanks again,

Stephan



Am 27.06.11 17:52, schrieb Robert Osfield:
 HI Stephan,
 
 I don't have any idea what might be up with the driver, it's rather
 counter-intuitive that doing the on screen stats would improve things.
 
 My own suggestion would be to add a final draw callback to the
 viewer's Camera that calls glFlush or glFinish to see if either of
 these has an effect.  This might provide you a bit more feel for the
 nature of the driver bug.

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


Re: [osg-users] Issues centering cursor for mouselook with first-person manipulator.

2011-06-23 Thread Stephan Maximilian Huber
Hi,


Am 19.06.11 21:14, schrieb Dan West:

 Am I doing something wrong, or is this just a limitation of the 
 requestWarpPointer functionality? Is there some other way I should attempt 
 this?

on what platform do you experience these problems? If you are on Mac OS
X you can try to add

CGSetLocalEventsSuppressionInterval(0);

to your code.

cheers,

Stephan

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


Re: [osg-users] error compiling 2.9.16 for iOS

2011-06-10 Thread Stephan Maximilian Huber
Hi,

can you test the attached ImageUtils.cpp? OpenGL ES doesn't know
GL_INTENSITY, so I added an include to osg/Texture, as there are some
defines...

the ReaderWriterImageIO_IOS.cpp compiles fine on my end, don't know
what's wrong.

cheers,
Stephan


Am 10.06.11 16:06, schrieb massimo.ri...@acsys.it:
 Hi Robert,
 i'm trying to compile the 2.9.16 version for iOS, at the moment only
 for the simulator (checked out this morning) but I encountering some
 errors about GL_INENSITY:
 
 /blah/blah/OpenSceneGraph/src/osg/ImageUtils.cpp:473: error:
 ‘GL_INTENSITY’ was not declared in this scope
 /blah/blah/OpenSceneGraph/src/osg/ImageUtils.cpp: error: Semantic
 Issue: Use of undeclared identifier 'GL_INTENSITY'
 
 and about the ReaderWriterImageIO_IOS.cpp:
 
 /blah/blah/OpenSceneGraph/src/osgPlugins/imageio/ReaderWriterImageIO_IOS.cpp:16:34:
 error: ImageIO/CGImageSource.h: No such file or directory
 
 /blah/blah/OpenSceneGraph/src/osgPlugins/imageio/ReaderWriterImageIO_IOS.cpp:90:
 error: ‘CGImageSourceRef’ was not declared in this scope
 
 /blah/blah/OpenSceneGraph/src/osgPlugins/imageio/ReaderWriterImageIO_IOS.cpp:90:
 error: expected `;' before ‘source_ref’
 
 /blah/blah/Develop/OpenSceneGraph/src/osgPlugins/imageio/ReaderWriterImageIO_IOS.cpp:116:
 error: ‘source_ref’ was not declared in this scope
 
 /blah/blah/Develop/OpenSceneGraph/src/osgPlugins/imageio/ReaderWriterImageIO_IOS.cpp:116:
 error: ‘CGImageSourceCreateWithDataProvider’ was not declared in this
 scope
 
 /blah/blah/Develop/OpenSceneGraph/src/osgPlugins/imageio/ReaderWriterImageIO_IOS.cpp:126:
 error: ‘CGImageSourceCreateImageAtIndex’ was not declared in this
 scope
 
 What's wrong?
 
 Thank you in advance!
 Massimo
 
 --
 ATTENZIONE: le informazioni contenute in questo messaggio sono da 
 considerarsi confidenziali ed il loro utilizzo e' riservato unicamente al 
 destinatario sopra indicato. Chi dovesse ricevere questo messaggio per errore 
 e' tenuto ad informare il mittente ed a rimuoverlo definitivamente da ogni 
 supporto elettronico o cartaceo. 
 
 WARNING: This message contains confidential and/or proprietary information 
 which may be subject to privilege or immunity and which is intended for use 
 of its addressee only. Should you receive this message in error, you are 
 kindly requested to inform the sender and to definitively remove it from any 
 paper or electronic format.
 --
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 *
 * This library is open source and may be redistributed and/or modified under  
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 * OpenSceneGraph Public License for more details.
*/

#include float.h
#include string.h

#include osg/Math
#include osg/Notify
#include osg/ImageUtils
#include osg/Texture

namespace osg
{

struct FindRangeOperator
{
FindRangeOperator():
_rmin(FLT_MAX),
_rmax(-FLT_MAX),
_gmin(FLT_MAX),
_gmax(-FLT_MAX),
_bmin(FLT_MAX),
_bmax(-FLT_MAX),
_amin(FLT_MAX),
_amax(-FLT_MAX) {}

float _rmin, _rmax, _gmin, _gmax, _bmin, _bmax, _amin, _amax;

inline void luminance(float l) { rgba(l,l,l,l); } 
inline void alpha(float a) { rgba(1.0f,1.0f,1.0f,a); } 
inline void luminance_alpha(float l,float a) { rgba(l,l,l,a); } 
inline void rgb(float r,float g,float b) { rgba(r,g,b,1.0f);  }
inline void rgba(float r,float g,float b,float a)
{
_rmin = osg::minimum(r,_rmin); 
_rmax = osg::maximum(r,_rmax); 
_gmin = osg::minimum(g,_gmin); 
_gmax = osg::maximum(g,_gmax); 
_bmin = osg::minimum(b,_bmin); 
_bmax = osg::maximum(b,_bmax); 
_amin = osg::minimum(a,_amin); 
_amax = osg::maximum(a,_amax);
}



};

struct OffsetAndScaleOperator
{
OffsetAndScaleOperator(const osg::Vec4 offset, const osg::Vec4 scale):
_offset(offset), 
_scale(scale) {}

osg::Vec4 _offset;
osg::Vec4 _scale;

inline void luminance(float l) const { l= _offset.r() + l*_scale.r(); } 
inline void alpha(float a) const { a = _offset.a() + a*_scale.a(); } 
inline void luminance_alpha(float l,float a) const
{
l= _offset.r() + l*_scale.r(); 
a = _offset.a() + a*_scale.a();
} 
inline void rgb(float r,float 

Re: [osg-users] error compiling 2.9.16 for iOS

2011-06-10 Thread Stephan Maximilian Huber
Hi Massimo,

Am 10.06.11 17:05, schrieb massimo.ri...@acsys.it:

 About the ReaderWriterImageIO_IOS, it seems that the ImageIO framework is
 not found or some path is wrong... can I try to modify the CMakeLists.txt
 in the imageio plugin in order to specify where is the framework and to
 force to compile it?
 
 I tried to put the ImageIO framework in to the Resource group of the
 OpenSceneGraph Xcode project, but the compilation fails again.
 
 I should specify that I'm compiling for iOS simulator, with OpenGL ES 1
 enabled, iPhone SDK 4.3.

I updated trunk, created a fresh xcode-project files for the simulator
via cmake and build successfully the imageio-plugin. There's no need for
referencing the imageio-framework, as the plugin is linked statically -
that means, you'll have to add the imageio-framework to your app which
is using the imageio-plugin.

for completeness sake, here's my cmake-command:

cd OSG_ROOT
mkdir osg_build
cd osg_build
cmake -G Xcode \
-D OSG_BUILD_PLATFORM_IPHONE_SIMULATOR:BOOL=ON \
-D BUILD_OSG_APPLICATIONS:BOOL=OFF \
-D OSG_BUILD_FRAMEWORKS:BOOL=OFF \
-D OSG_WINDOWING_SYSTEM:STRING=IOS \
-D CMAKE_OSX_ARCHITECTURES:STRING=i386 \
-D OSG_GL1_AVAILABLE:BOOL=OFF \
-D OSG_GL2_AVAILABLE:BOOL=OFF \
-D OSG_GLES1_AVAILABLE:BOOL=ON \
-D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
-D OSG_GL_LIBRARY_STATIC:BOOL=OFF \
-D OSG_GL_MATRICES_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-D DYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-D DYNAMIC_OPENTHREADS:BOOL=OFF \
..

Then I opened the xcode project and set the SDK to iphonesimulator and
the architecture to i386. (You can set these vars via cmake, but I was
impatient)

then I compiled the ios-plugin, and it worked out of the box. I am using
the 4.3 SDK and Xcode 3.2.x

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] xcode4 link error

2011-06-07 Thread Stephan Maximilian Huber
Hi,

Am 07.06.11 08:40, schrieb Lem Davis:
 Undefined symbols for architecture i386:
   _dotosgwrapper_AlphaFunc, referenced from:
   __static_initialization_and_destruction_0(int, int)in 
 osgTerrainAppDelegate.o
 
 The link libraries were set up in Build Phases. All of the OSG static 
 libraries generated have been included.
 
 Why am I getting these linker errors?

Your code (namely osgPlugins.h) wants to link against the osg-plugin,
remove the entry in osgPlugins.h or add the osgdb_osg.so and
osgdb_deprecated_osg.so to your linking stage.

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


Re: [osg-users] 2.8.5 RC2 and final call for testing

2011-06-01 Thread Stephan Maximilian Huber
Hi Paul,

Am 01.06.11 03:16, schrieb Paul Martz:

 Thanks! Let me know how the testing goes!

compiles fine for OS X, 32bit. Unfortunately I can't test the compiled
libs, as my projects requires 2.9.x

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


Re: [osg-users] Please test svn/trunk before todays 2.9.15 dev release.

2011-05-30 Thread Stephan Maximilian Huber
Hi Robert,

Am 30.05.11 10:28, schrieb Robert Osfield:
 Could users check out, build and test the svn/trunk version of the OSG
 and let me know how you get on.  I'll be tagging the 2.9.15 release
 today so would like to make sure it's at least building across
 platforms before I make the release.

compiles fine for OS X 32bit / 64bit and IOS.

cheers,
Stephan

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


Re: [osg-users] OSG 2.9.10 on iOS

2011-05-26 Thread Stephan Maximilian Huber
Hi Büsra,

can you test the attached CMakeModules on your end? They disable the
QtKit-plugin and the Quicktime-plugin for Iphone(dev+sim). Place them in
the folder CMakeModules. Don't forget to reconfigure your project in cmake.

cheers,
Stephan


Am 26.05.11 11:54, schrieb Büsra Gülten:
 Hi, 
 
 thank you, Stephan. 
 
 I have to mention that I reinstalled Xcode 4.0.2 and removed Xcode 3.2.6. 
 Then I generated a Xcode-Project with CMake 2.8.4, and now I get bugs like 
 this one, again. 
 In the target osgdb_qt: 
 
 
 Movies.h: CoreAudio/CoreAudio.h: No such file or directory (several times)
 ImageCompression.h: OpenGL/OpenGL.h: No such file or directory (several 
 times)
  QuartzCore/CoreVideo.h: No such file or 
 directory (several times)
 and also errors that depends on these errors.
 
 
 I´ve attached the CMakeCache.txt and I don´t know, what to do. Any help is 
 appreciated.
 
 I wanted to create an iphone-specific Xcode-project-file, because on the one 
 hand Stephan has recommend that and on the other hand the project on 
 github.com doesn´t include collada-Plugin.But I need this plugin. 
 
 I already downloaded the collada-dom-2.3 and tried to install, but 
 unfortunately without success. 
 
 /usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
 /usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
 lipo: can't open input file: 
 /var/folders/05/05EvlzYZHJiS-GGPxKsDck+++TU/-Tmp-//ccQXb6gI.out (No such 
 file or directory)
 make[1]: *** [build/mac-1.4/obj/ioapi.o] Error 1
 make: *** [all] Error 2
 
 
 I´m sorry that I ask many questions but I want really to build OSG on 
 iPhoneSimulator or Device. 
 Thank you!
 
 Cheers,
 Büsra
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=39749#39749
 
 
 
 
 Attachments: 
 http://forum.openscenegraph.org//files/cmakecache_430.txt
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

# Locate QuickTime
# This module defines
# QUICKTIME_LIBRARY
# QUICKTIME_FOUND, if false, do not try to link to gdal 
# QUICKTIME_INCLUDE_DIR, where to find the headers
#
# $QUICKTIME_DIR is an environment variable that would
# correspond to the ./configure --prefix=$QUICKTIME_DIR
#
# Created by Eric Wing. 

# QuickTime on OS X looks different than QuickTime for Windows,
# so I am going to case the two.

IF(APPLE)
  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
ELSE()
  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
$ENV{QUICKTIME_DIR}/include
$ENV{QUICKTIME_DIR}
NO_DEFAULT_PATH
  )
  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
NO_DEFAULT_PATH
PATH_SUFFIXES include
  )
  FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h)

  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime
$ENV{QUICKTIME_DIR}/lib
$ENV{QUICKTIME_DIR}
NO_DEFAULT_PATH
  )
  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
  )
  FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
ENDIF()


SET(QUICKTIME_FOUND NO)
IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
  SET(QUICKTIME_FOUND YES)
ENDIF()

IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
SET(QUICKTIME_FOUND NO)
ENDIF()

IF(APPLE)
#Quicktime is not supported under 64bit OSX build so we need to detect it 
and disable it.
#First check to see if we are running with a native 64-bit compiler (10.6 
default) and implicit arch
IF(NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(QUICKTIME_FOUND NO)
ELSE()
#Otherwise check to see if 64-bit is explicitly called for.
LIST(FIND CMAKE_OSX_ARCHITECTURES x86_64 has64Compile)
IF(NOT has64Compile EQUAL -1)
SET(QUICKTIME_FOUND NO)
ENDIF()
ENDIF()
ENDIF()
# Locate Apple QTKit (next-generation QuickTime)
# This module defines
# QTKIT_LIBRARY
# QTKIT_FOUND, if false, do not try to link to gdal 
# QTKIT_INCLUDE_DIR, where to find the headers
#
# $QTKIT_DIR is an environment variable that would
# correspond to the ./configure --prefix=$QTKIT_DIR
#
# Created by Eric Wing. 

# QTKit on OS X looks different than QTKit for Windows,
# so I am going to case the two.

IF(APPLE)
  FIND_PATH(QTKIT_INCLUDE_DIR QTKit/QTKit.h)
  FIND_LIBRARY(QTKIT_LIBRARY QTKit)
ENDIF()


SET(QTKIT_FOUND NO)
IF(QTKIT_LIBRARY AND QTKIT_INCLUDE_DIR)
  SET(QTKIT_FOUND YES)
ENDIF()

IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
SET(QTKIT_FOUND NO)
ENDIF()

IF(APPLE)
# Technically QTKit is 64-bit capable, but the QTKit plug-in currently uses
# a few 32-bit only APIs to bridge QTKit and Core Video.
# As such, the plugin won't compile for 64-bit until Apple 

Re: [osg-users] OSG 2.9.10 on iOS

2011-05-19 Thread Stephan Maximilian Huber
Hi,

Am 19.05.11 06:52, schrieb Büsra Gülten:
 But the error 
 
 target specifies product type 'com.apple.product-type.tool', but there´s no 
 such product type for the 'iphonesimulator' platform.
 
 is still existing in my own Project in Xcode 3.2.6. Could you please look at 
 my CMakeCache.txt in attached file?

disable the building of examples via BUILD_OSG_EXAMPLES:BOOL=OFF

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


Re: [osg-users] FrameBufferObject problems on OSG 2.9.11

2011-05-17 Thread Stephan Maximilian Huber
Am 17.05.11 14:44, schrieb Fred Smith:
 Hi Robert,
 
 I am a bit puzzled as the second problem I am having at the moment yields a 
 very different behavior when isolated out in a small repro.
 
 This time I get an assertion.
 
 Attached is a modified osggeometry.cpp file that triggers the assertion I'm 
 talking about. The assertion is raised when addSlave() is called.
 
 This issue might be by design, though. Not sure.
 
 
 Code:
 osg::Camera *createRTTCamera(osgViewer::Viewer viewer)
 {
   osg::ref_ptrosg::Camera slaveCamera = new osg::Camera();
 
   slaveCamera-setClearColor(osg::Vec4(0, 0, 0, 1)); // initialize alpha 
 to 1
   slaveCamera-setClearMask(GL_COLOR_BUFFER_BIT);
 
   osg::Matrixd projMatrix;
   projMatrix.makeOrtho(0.0, (double)1, 0.0, (double)1, -1.0, 1.0);
   slaveCamera-setProjectionMatrix(projMatrix);
   
   slaveCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
   
   osg::ref_ptrosg::Viewport viewport = new osg::Viewport(0, 0, 64, 64);
   slaveCamera-setViewport(viewport.get());
 
   osg::Matrixd viewMatrix;
   slaveCamera-setViewMatrix(viewMatrix);
   
   slaveCamera-setRenderOrder(osg::Camera::PRE_RENDER);
   slaveCamera-setAllowEventFocus(false);
   
 slaveCamera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
   slaveCamera-setCullingMode(osg::CullSettings::NO_CULLING);
   
   osg::ref_ptrosg::Camera masterCamera = viewer.getCamera();
   slaveCamera-setGraphicsContext(masterCamera-getGraphicsContext());
   
   return slaveCamera;

This will certainly lead to a crash, as slaveCamera gets deconstructed,
as the correpsonding ref_ptr goes out of scope. Try

return slaveCamera.release()

or change the signature of the function to

osg::ref_ptrosg::Camera createRTTCamera(osgViewer::Viewer viewer)

instead.

Can't comment much on the memory-leak issue, though.

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


Re: [osg-users] OSG 2.9.10 on iOS

2011-05-16 Thread Stephan Maximilian Huber
Hi,
Am 16.05.11 13:17, schrieb Büsra Gülten:
 I have both Xcode 4.0.2 and 3.2.6. But I am trying to build OSG in Xcode 
 3.2.5 with iPhoneSimulator4.3.sdk. Because Xcode 4.0.2 shows me other errors 
 like curl.h: No such file or directory, although the libraries are setting 
 right. 

 Please advise. Any help is appreciated.

As mentioned in the Readme, the current Cmake-configuration can't create
valid build-configurations for the example-apps and I think this is the
error you get. Just deselect BUILD_OSG_APPLICATIONS in cMake and
rebuild. This should get you a set of static-libs and plugins.

Then you can create a new xcode-project, reference the xcode headers and
libs and start testing.

The cMake-path for IOS is rough and error-prone, as there are some bugs
in cMake and inabilities, (like creating a xcode-project usable for
simulator AND device), this prevents a smooth user-experience.

I am still maintaining the hand-crafted xcode-project on
https://github.com/stmh/osg (use the iphone-branch), it can build libs
for device and simulator has a simple working example, and you can
include it into your own xcode-projects as sub-project. It doesn't build
all plugins though, only obj, ive, osg and imageio.

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


Re: [osg-users] iOS: integration with not-OpenGL apps

2011-05-05 Thread Stephan Maximilian Huber
Am 05.05.11 11:52, schrieb Alessandro Terenzi:
 1) in GraphicsWindowIOS, beyond the window and view, also a view
 controller is defined and it is allocated in GraphicsWindowIOS.mm just after
 the view...is this view controller really needed? How is it used?

The ViewController is used to adapt the view to a new
device-orientation. It should be easy to add a new code-path to disable
the creation of the ViewController, if needed.

 2) in the view_test example, at the end of FlipsideViewController,mm file,
 what is the role of USE_GRAPICSWINDOW_IMPLEMENTATION(IOS) ? I tried by
 removing it and it looks like that my app still works...

As the osg-libs are static you'll have to tell the linker to include the
GraphicsWindowIOS-class in the final app, this is the purpose of
USE_GRAPICSWINDOW_IMPLEMENTATION(IOS). In the other examples this line
is in the file Plugins.h

cheers,

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


[osg-users] FindFBX.cmake broken on WIn32/Cmake 2.6?

2011-05-04 Thread Stephan Maximilian Huber
Hi,

my automated build system fails with the new FindFBX.cmake (plain
vanilla osg from trunk). CMake complains:


 8 snip 8 
CMake Error: Error in cmake code at
C:/Program
Files/Jenkins/jobs/osg/workspace/osg/CMakeModules/FindFBX.cmake:25:
Parse error.  Function missing ending ).  Instead found left paren
with text (.
CMake Error at CMakeLists.txt:454 (FIND_PACKAGE):
  find_package Error reading CMake code from C:/Program
  Files/Jenkins/jobs/osg/workspace/osg/CMakeModules/FindFBX.cmake.

 8 snip 8 

What cmake-version is required on win32? I am using 2.6

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


Re: [osg-users] FindFBX.cmake broken on WIn32/Cmake 2.6?

2011-05-04 Thread Stephan Maximilian Huber
Hi Robert,

As I don't use the FBX-plugin I can't test my modifications, they
satisfy cmake 2.6 though. See attached file.

cheers,
Stephan

Am 04.05.11 10:08, schrieb Robert Osfield:
 Hi Stephan,
 
 Could the use of a nested () section with the enclosing ELSEIF() be the 
 problem?
 
 Perhaps this test coulde be separated out into several separate lines
 that decide whether 64bit is required or not.  Could you experiment
 with getting this to work, it'd be good to keep the OSG working with
 older versions of cmake.
 
 Thanks,
 Robert.
 
 On Wed, May 4, 2011 at 9:01 AM, Stephan Maximilian Huber
 ratzf...@digitalmind.de wrote:
 Hi,

 my automated build system fails with the new FindFBX.cmake (plain
 vanilla osg from trunk). CMake complains:


  8 snip 8 
 CMake Error: Error in cmake code at
 C:/Program
 Files/Jenkins/jobs/osg/workspace/osg/CMakeModules/FindFBX.cmake:25:
 Parse error.  Function missing ending ).  Instead found left paren
 with text (.
 CMake Error at CMakeLists.txt:454 (FIND_PACKAGE):
  find_package Error reading CMake code from C:/Program
  Files/Jenkins/jobs/osg/workspace/osg/CMakeModules/FindFBX.cmake.

  8 snip 8 

 What cmake-version is required on win32? I am using 2.6

 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

# Locate FBX
# This module defines:
# FBX_INCLUDE_DIR, where to find the headers
#
# FBX_LIBRARY, FBX_LIBRARY_DEBUG
# FBX_FOUND
#
# $FBX_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FBX_DIR

IF(APPLE)
SET(FBX_LIBDIR gcc4/ub)
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
SET(FBX_LIBDIR gcc4)
ELSEIF(MSVC80)
SET(FBX_LIBDIR vs2005)
ELSEIF(MSVC90)
SET(FBX_LIBDIR vs2008)
ELSEIF(MSVC100 OR MSVC_VER1600)
SET(FBX_LIBDIR vs2010)
ENDIF()

IF(APPLE)
# do nothing
ELSEIF()
  # default
  SET(FBX_LIBDIR ${FBX_LIBDIR}/x86)
  # check for 64bit
  IF(CMAKE_CL_64)
SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
  ELSEIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
  ENDIF()
ENDIF()

IF(APPLE)
SET(FBX_LIBNAME fbxsdk-2012.1-static)
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
SET(FBX_LIBNAME fbxsdk-2012.1-static)
ELSE()
SET(FBX_LIBNAME fbxsdk-2012.1-md)
ENDIF()

SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)

SET( FBX_SEARCH_PATHS
$ENV{FBX_DIR}
$ENV{ProgramW6432}/Autodesk/FBX/FbxSdk/2012.1
$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2012.1
/Applications/Autodesk/FBXSDK20121
)

# search for headers  debug/release libraries
FIND_PATH(FBX_INCLUDE_DIR fbxsdk.h
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES include)
FIND_LIBRARY( FBX_LIBRARY ${FBX_LIBNAME}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES lib/${FBX_LIBDIR})
FIND_LIBRARY( FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG}
PATHS ${FBX_SEARCH_PATHS}
PATH_SUFFIXES lib/${FBX_LIBDIR})

IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
SET(FBX_FOUND YES)
ELSE()
SET(FBX_FOUND NO)
ENDIF()
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FindFBX.cmake broken on WIn32/Cmake 2.6?

2011-05-04 Thread Stephan Maximilian Huber
Hi Michael + Robert,

Am 04.05.11 11:00, schrieb Michael Platings:

 The attached file gives the correct behaviour without the nested
 parentheses.

this version works fine on my end.

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


Re: [osg-users] SubloadCallback on iOS: missing texture.

2011-05-03 Thread Stephan Maximilian Huber
Hi Alessandro

subload-callbacks work fine on IOS, I modified your example and this
works on my end (tested only simulator)

I do not attach the image to the texture to prevent any automatic
handling from osg, I store the image as property in the callback and use
it from there.

cheers,
Stephan


// my SubloadCallback:

class ITexture2DSubloadCallback : public osg::Texture2D::SubloadCallback {
public:
ITexture2DSubloadCallback(osg::Texture2D* tex, osg::Image* img);
virtual void load (const osg::Texture2D texture, osg::State 
state)
const;
virtual void subload (const osg::Texture2D texture, osg::State
state) const;
private:
unsigned int m_POT_width, m_POT_height;
osg::ref_ptrosg::Image _image;

};


ITexture2DSubloadCallback::ITexture2DSubloadCallback(osg::Texture2D*
texture, osg::Image* img)
:  osg::Texture2D::SubloadCallback(),
_image(img)
{
// m_POT_width, m_POT_height are members of the subload callback

m_POT_width = 128;
m_POT_height = 128;

// set the texture to beleive it is of power of two size
texture-setTextureSize(m_POT_width, m_POT_height);

// set to linear to disable mipmap generation
texture-setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);
texture-setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR);

}

void ITexture2DSubloadCallback::load(const osg::Texture2D texture,
osg::State state) const
{
//extern void glTexImage2D (GLenum target, GLint level, GLenum
internalformat, GLsizei width, GLsizei height, GLint border, GLenum
format, GLenum type, const GLvoid *pixels);

glTexImage2D(
GL_TEXTURE_2D,
0,
_image-getInternalTextureFormat(),
(int)m_POT_width,
(int)m_POT_height,
0,
_image-getPixelFormat(),
_image-getDataType(),
0
);
state.checkGLErrors(ITexture2DSubloadCallback::load);
std::cout  load  std::endl;
}

void ITexture2DSubloadCallback::subload(const osg::Texture2D texture,
osg::State state) const
{
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0,

_image-s(), _image-t(),
_image-getPixelFormat(),
_image-getDataType(),
_image-data()
   );

state.checkGLErrors(ITexture2DSubloadCallback::subload);
std::cout  subload  std::endl;
}

// and here's how I create the textured quad that is attached to the
scene'sroot...





void Sketch::setup()
{
// set window size

float width = 200;
float height = 200;

osg::ref_ptrosg::Geode geode;
osg::ref_ptrosg::Geometry geom;

// create geometry...
geode = new osg::Geode;
geom = new osg::Geometry;

osg::Vec3 top_left(0, height, 0);
osg::Vec3 bottom_left(0, 0, 0);
osg::Vec3 bottom_right(width, 0, 0);
osg::Vec3 top_right(width, height, 0);

// vertices...
osg::ref_ptrosg::Vec3Array vertices = new osg::Vec3Array(4);
(*vertices)[0] = top_left;
(*vertices)[1] = bottom_left;
(*vertices)[2] = bottom_right;
(*vertices)[3] = top_right;
geom-setVertexArray(vertices.get());

// texcoords...
osg::ref_ptrosg::Vec2Array texcoords = new osg::Vec2Array(4);

(*texcoords)[0].set(0.0f,1.0f);
(*texcoords)[1].set(0.0f,0.0f);
(*texcoords)[2].set(1.0f,0.0f);
(*texcoords)[3].set(1.0f,1.0f);
geom-setTexCoordArray(0, texcoords.get());

// normals...
osg::ref_ptrosg::Vec3Array normals = new osg::Vec3Array(1);
(*normals)[0].set(0.0f, 0.0f, 1.0f);
geom-setNormalArray(normals.get());
geom-setNormalBinding(osg::Geometry::BIND_OVERALL);

// colors...
osg::ref_ptrosg::Vec4Array colors = new osg::Vec4Array(1);
(*colors)[0].set(1.0f, 1.0f, 1.0f, 1.0f);   // this is the color that
will be displayed if the texture won't be displayed
geom-setColorArray(colors.get());
geom-setColorBinding(osg::Geometry::BIND_OVERALL);
geom-addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,4));
geode-addDrawable(geom.get());

// texture...
osg::ref_ptrosg::Texture2D texture = new osg::Texture2D;
texture-setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
texture-setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
texture-setWrap( osg::Texture2D::WRAP_S, osg::Texture2D::CLAMP );
texture-setWrap( osg::Texture2D::WRAP_T, osg::Texture2D::CLAMP );
texture-setDataVariance(osg::Object::DYNAMIC);
texture-setResizeNonPowerOfTwoHint(false);
 

Re: [osg-users] iOS: how to draw into a UIView object instead of app's window?

2011-04-20 Thread Stephan Maximilian Huber
Hi Alessandro,

I think you are entering unknown territory, nobody has tried what you
are trying to do ;-)

The current implementation creates an UIView and attaches it to the
window, so perhaps you can get it to work via:

osg::ref_ptrosg::Referenced windata = new osgViewer::GraphicsWindowIOS::
 WindowData(my_window); // my_window holds the UIWindow

set the x/y width/height of the GraphicsContext::Traits to the bounds of
the view, you want to create.

After creation of the GraphicsWindow the view is added to my_window,
perhaps you can get it via [my_window subviews].


HTH,
Stephan





Am 20.04.11 13:00, schrieb Alessandro Terenzi:
 Hi,
 
 I'm trying to modify the osgviewer example for iOS in order to be able to
 draw into a specified UIView object rather than to the application's
 window.
 
 
 Basically I created a custom ViewController with a couple of views, one of
 which occupies a small area of the main window. Then, once the controller's
 views have been loaded, I setup OSG as shown in the osgviewer example, but
 instead of doing:
 
 
 osg::ref_ptrosg::Referenced windata = new osgViewer::GraphicsWindowIOS::
 WindowData(window);
 
 
 I do this:
 
 
 osg::ref_ptrosg::Referenced windata = new osgViewer::GraphicsWindowIOS::
 WindowData(my_OsgView);
 
 
 where my_OsgView is a UIView object. But this is not working, I get the
 osgviewer's view on screen but not where I expect: the viewer's view seems
 to have the same size of the UIView object (and this is OK) but it is
 displayed away from the UIView itself...I guess that the viewer's view is
 created has a 'child' of my UIView object but I expected that the viewer's
 view actually 'became' my UIView object. In other words it seems that
 another view is created instead of just using the one I created with
 Interface Builder.
 
 
 What is the correct way to draw in a generic UIView instead of the
 application's window?
 
 
 Thanks.
 
 Alessandro
 
 
 
 
 ___
 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] Compiling iOS / iPhone - FreeType build errors

2011-03-31 Thread Stephan Maximilian Huber
Hi

sorry, can't help you here, i don't use freetype on ios. Check if the
lib is built for all your selected platforms, perhaps freetype is built
only for arm6 / arm7?

good luck,

Stephan

Am 31.03.11 16:49, schrieb Ryan Atkins:
 I'm having an issue with Freetype now. I'm using the files from 
 OpenFrameworks as the README.txt suggested, but getting the below errors.  Is 
 there another freetype library I should be using?
 
 _FT_Outline_Get_BBox, referenced from:
 FreeTypeFont::getGlyph3D(unsigned int)in libosgdb_freetyped.a(FreeTypeFont.o)
 
 _FT_Load_Char, referenced from:
 FreeTypeFont::getGlyph3D(unsigned int)in libosgdb_freetyped.a(FreeTypeFont.o)
 FreeTypeFont::getGlyph(std::pairunsigned int, unsigned int const, unsigned 
 int)in libosgdb_freetyped.a(FreeTypeFont.o)
 
 _FT_Done_FreeType, referenced from:
 _CGImageGetWidth, referenced from:
 _FT_Set_Pixel_Sizes, referenced from:
 _FT_Init_FreeType, referenced from:
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=38131#38131
 
 
 
 
 
 ___
 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] possible Bug in osgGA::GUIEventAdapter / osgViewer

2011-03-31 Thread Stephan Maximilian Huber
Hi,

so just for reference, I am answering my own question: I missed a

getEventQueue()-getCurrentEventState()-setWindowRectangle(traits-x,
traits-y, traits-width, traits-height );

in my setup-code.

cheers,
Stephan


Am 31.03.11 15:48, schrieb Stephan Maximilian Huber:
 Hi all,
 
 I noticed that the two properties of GUIEventAdapter _windowWidth and
 _windowHeight stay at their initial values of 1280 respective 1024 if
 you don't move the window, or resize it. Only after moving /resizing the
 window, these properties got updated to the correct values.
 
 I can see this behaviour on win32 + OS X. Does the X11-implementation
 behave the same? And what's the easiest way to fix this for all plattforms?
 
 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] Compiling iOS / iPhone - build errors

2011-03-30 Thread Stephan Maximilian Huber
Hi Ryan,

Here's an example command-line to get an iphone build from current osg.

/usr/bin/cmake -G Xcode -D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_CXX_FLAGS:STRING=-ftree-vectorize -fvisibility-inlines-hidden
-mno-thumb -arch armv6 -pipe -no-cpp-precomp -miphoneos-version-min=3.1
-mno-thumb \
-D BUILD_OSG_APPLICATIONS:BOOL=OFF \
-D OSG_BUILD_FRAMEWORKS:BOOL=OFF \
-D OSG_WINDOWING_SYSTEM:STRING=IOS \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_OSX_ARCHITECTURES:STRING=armv6;armv7 \
-D
CMAKE_OSX_SYSROOT:STRING=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
\
-D OSG_GL1_AVAILABLE:BOOL=OFF \
-D OSG_GL2_AVAILABLE:BOOL=OFF \
-D OSG_GLES1_AVAILABLE:BOOL=ON \
-D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
-D OSG_GL_LIBRARY_STATIC:BOOL=OFF \
-D OSG_GL_MATRICES_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-D DYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-D DYNAMIC_OPENTHREADS:BOOL=OFF .

this should compile successfully, I am using this command line to do
continous builds via hudson. (You can change the vars from insider the
cmake gui, no need for the command-line)

cheers,

Stephan
Am 29.03.11 22:14, schrieb Ryan Atkins:
 I'm trying to build the latest source from Git for the iPhone
 https://github.com/openscenegraph/osg.git
 
 'GL_COMPILE' was not declared in scope
 'glNewList' was not declared in this scope
 'glEndList' was not declared in this scope
 'glCallList' was not declared in this scope
 
 I've followed the instructions in README.txt, but I get thousands of the 
 above errors.  I also have added the frameworks: QuartzCore, Foundation, 
 OpenGLES, UIKit, CoreGraphics as they were added from my ccmake.
 
 In my ccmake configuration there wasn't an option to disable 
 OSG_GLU_AVAILABLE as per the instructions.
 
 Also, I downloaded OpenFrameworks Git to get the FREETYPE libraries and set 
 them up like this (with absolute paths, but i've truncated here):
 
 FREETYPE_INCLUDE_DIR_freetype2: openFrameworks/libs/freetype/include/freetype2
 FREETYPE_INCLUDE_DIR: openFrameworks/libs/freetype/include/freetype2
 FREETYPE_LIBRARY: openFrameworks/libs/freetype/lib/iphone/freetype-iphone.a
 
 Thanks,
 Ryan
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=38038#38038
 
 
 
 
 
 ___
 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] Textures for Iphone not work at all :S..?? Need Help

2011-03-08 Thread Stephan Maximilian Huber
Hi,
Am 08.03.11 09:16, schrieb Laith Dhawahir:

 I tried to make textures work on iphone for many times and different ways, 
 but no one of them worked.. !!

Without more information we can't help you. What have you tried, show us
some of your code, etc. Perhaps you forgot to link against the
imageio-plugin, perhaps you are using not supported
texture-/image-formats, how should we know?

Textures do work on the iphone, there might be some issues with ive
and/or unsupported texture-/image formats.

The iphone-project on github shows the loading of a textured ive-model.

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


Re: [osg-users] Image as the viewer's background on Iphone

2011-02-25 Thread Stephan Maximilian Huber
Hi Tang,

some ideas:

1) you are creating your geometry on the X/Z-plane, for hud-displays
you'll need the geometry on the X/Y-plane (see the osghud.cpp example).

2) your width and height doesn't make sense to me. the native resolution
of an iphone 4 is 480x640 or 960x1280. Use
osg::GraphicsContext::getWindowingSystemInterface()-getScreenResolution(0,w,h)
instead.

hth,
stephan

Am 25.02.11 10:16, schrieb Tang Yu:
 Hi,
 
 I am developing an AR program on iphone. I want to use the video frame 
 captured by camera as my viewer's background. My code is here:
  
 
 Code:
 
 // screen size
   unsigned int w = 960;
   unsigned int h = 640;
   
   // camera
   osg::ref_ptrosg::Camera hudCamera = new osg::Camera;
   hudCamera-setProjectionMatrix(osg::Matrix::ortho2D(0,w,0,h));
   hudCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
   hudCamera-setViewMatrix(osg::Matrix::identity());
   hudCamera-setClearMask(GL_DEPTH_BUFFER_BIT);
   hudCamera-setRenderOrder(osg::Camera::POST_RENDER);
   
   // texture 
 
   osg::Geometry * rectBG = new osg::Geometry; 
   osg::Vec3Array* vertices = new osg::Vec3Array(4);
   (*vertices)[0].set(0.f, 0.f, (float)h);
 (*vertices)[1].set(0.f, 0.f, 0.f);
 (*vertices)[2].set((float)w, 0.f, 0.f);
 (*vertices)[3].set((float)w, 0.f, (float)h);
 rectBG-setVertexArray(vertices);
 
 osg::Vec2Array* texcoords = new osg::Vec2Array(4);
 (*texcoords)[0].set(0.0f, 1.0f);
 (*texcoords)[1].set(0.0f, 0.0f);
 (*texcoords)[2].set(1.0f, 0.0f);
 (*texcoords)[3].set(1.0f, 1.0f);
 rectBG-setTexCoordArray(0,texcoords);
   
 osg::Vec3Array* normals = new osg::Vec3Array(1);
 (*normals)[0].set(0.0f,1.0f,0.0f);
 rectBG-setNormalArray(normals);
 rectBG-setNormalBinding(osg::Geometry::BIND_OVERALL);
   rectBG-addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,4));
   osg::Geode* BG_geode = new osg::Geode;
 BG_geode-addDrawable(rectBG);
   
   // set up the texture state.
 osg::ref_ptrosg::Texture2D BG_texture = new osg::Texture2D;
 BG_texture-setDataVariance(osg::Object::DYNAMIC); // protect from being 
 optimized away as static state.
 BG_texture-setImage(osgDB::readImageFile(curVideoFrame.png));
 osg::StateSet* stateset = rectBG-getOrCreateStateSet();
 
 stateset-setTextureAttributeAndModes(0,BG_texture,osg::StateAttribute::ON);
   
   // 
 
   // root
   osg::ref_ptrosg::Group MARRoot = new osg::Group;
   
   // turn off lighting 
 
 MARRoot-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF);
   
   hudCamera-addChild(BG_geode);
   MARRoot-addChild(hudCamera);
   
   // viewer
   osg::ref_ptrosgViewer::Viewer MARViewer = new osgViewer::Viewer();
   MARViewer-setSceneData(MARRoot.get());
   MARViewer-setCameraManipulator(new 
 osgGA::MultiTouchTrackballManipulator);
   MARViewer-realize();
 
 
 
 
 I clipped out the codes about capturing video frames and used a png image 
 instead of them temporarily in my test.
 
 My questions:
 1. After the program launched on Iphone, why was the viewer empty? I can not 
 see any image in there.
 2.  Whether or not the codes about texture can make the image match the 
 screen size exactly? 
 
 Thank you for your help!
 
 Cheers,
 Tang
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=37123#37123
 
 
 
 
 
 ___
 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] compile error in iphone project, about field has incomplete type

2011-02-22 Thread Stephan Maximilian Huber
Hi,

Does the SimpleExample compile+run?

check your build-settings, it looks like that the standard-libs and
-headers are not included. Compare them with the settings of the target
SimpleExample.

cheers,
Stephan

Am 22.02.11 10:48, schrieb Tang Yu:
 Hi, everyone,
 
 i tried to add osg libraries to my iphone project. I compiled the libraries 
 from git's iphone example. But, after i added them to my project 
 (libOpenThreads.a, libosg.a, libosgDB.a, blah blah...), i can not compile my 
 project sucessfully.
 i just made a declaration in the header, so please watch my code:
 
 CameraAVController.h: 
 
 Code:
 
 #include osgPlugins.h
 #include osgDB/ReadFile
 #include osg/MatrixTransform
 #include osgViewer/Viewer
 
 #import UIKit/UIKit.h
 #import AVFoundation/AVFoundation.h
 #import CoreGraphics/CoreGraphics.h
 #import CoreVideo/CoreVideo.h
 #import CoreMedia/CoreMedia.h
 
 @interface CameraAVController : UIViewController  
 AVCaptureVideoDataOutputSampleBufferDelegate  {
   ... ...
   osg::ref_ptrosgViewer::Viewer _viewer;
 }
 ..
 
 @end
 
 
 
 
 
 CameraAVController.mm:
 
 Code:
 
 #import CameraAVController.h
 
 #include osgGA/TrackballManipulator
 #include osgGA/MultiTouchTrackballManipulator
 #include osg/ShapeDrawable
 #include osg/DisplaySettings
 
 
  
 
 These are some of the thousands of error informations below:
 
 Code:
 
 In file included from include/osg/StateSet:17,
  from include/osg/State:18,
  from include/osg/GraphicsContext:17,
  from include/osgViewer/GraphicsWindow:17,
  from 
 /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/osgPlugins.h:3,
  from 
 /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/CameraAVController.h:9,
  from 
 /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/MARDemoViewController.mm:10:
 include/osg/Object:166: error: field '_name' has incomplete type
 include/osg/Object: In member function 'virtual void 
 osg::Object::setName(const std::string)':
 include/osg/Object:99: error: '_name' was not declared in this scope
 include/osg/Object: In member function 'void osg::Object::setName(const 
 char*)':
 include/osg/Object:104: error: invalid use of incomplete type 'struct 
 std::string'
 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:56:
  error: declaration of 'struct std::string'
 include/osg/Object:105: error: invalid use of incomplete type 'struct 
 std::string'
 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:56:
  error: declaration of 'struct std::string'
 include/osg/Object: In member function 'const std::string 
 osg::Object::getName() const':
 include/osg/Object:109: error: '_name' was not declared in this scope
 In file included from include/osg/buffered_value:17,
  from include/osg/Shader:27,
  from include/osg/StateAttribute:20,
  from include/osg/StateSet:18,
  from include/osg/State:18,
  from include/osg/GraphicsContext:17,
  from include/osgViewer/GraphicsWindow:17,
  from 
 /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/osgPlugins.h:3,
  from 
 /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/CameraAVController.h:9,
  from 
 /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/MARDemoViewController.mm:10:
 include/osg/DisplaySettings: At global scope:
 include/osg/DisplaySettings:320: error: field '_application' has incomplete 
 type
 include/osg/DisplaySettings:328: error: field '_glContextVersion' has 
 incomplete type
 include/osg/DisplaySettings: In member function 'void 
 osg::DisplaySettings::setApplication(const std::string)':
 include/osg/DisplaySettings:199: error: '_application' was not declared in 
 this scope
 include/osg/DisplaySettings: In member function 'const std::string 
 osg::DisplaySettings::getApplication()':
 include/osg/DisplaySettings:200: error: '_application' was not declared in 
 this scope
 include/osg/DisplaySettings: In member function 'void 
 osg::DisplaySettings::setGLContextVersion(const std::string)':
 include/osg/DisplaySettings:264: error: '_glContextVersion' was not declared 
 in this scope
 include/osg/DisplaySettings: In member function 'const std::string 
 osg::DisplaySettings::getGLContextVersion() const':
 include/osg/DisplaySettings:267: error: return type 'const struct 
 std::string' is incomplete
 include/osg/DisplaySettings:267: error: '_glContextVersion' was not declared 
 in this scope
 
 
 
 
 how can i fix these errors? 
 thanks for any help,thank you.
 
 Best Regard!
 
 Cheers,
 Tang
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=36928#36928
 
 
 
 
 
 ___
 osg-users 

Re: [osg-users] Empty line does not display

2011-02-22 Thread Stephan Maximilian Huber
Hi Antoine,

Am 22.02.11 17:19, schrieb Antoine Rennuit:
 Any idea of what happens? Could that be a bug?

you are missing a geo-dirtyBound().

As osg computes the near- and far-plane from all the boundingboxes,
every frame, your line gets clipped if you don't update the boundingbox
of your geometry.

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


Re: [osg-users] OSG 2.9.10 on iOS

2011-02-21 Thread Stephan Maximilian Huber
Hi Dani + Robert,

Am 21.02.11 11:04, schrieb Robert Osfield:
 The problems with not find the ive::Terrain::write  read
 implementations is a peculiar one,  I've just looked through the ive
 plugin and the Terrain implementation is there are looks OK as does
 the DataInputStream and DataOutputStream implementations.

It seems Dani is using the handcrafted xcode-project from the
git-repository, which had not included the Terrain.cpp for the
ive-plugin. (I committed a fix for this to the git-repository and added
a sample ive-file with texture)

the xcode-project @ git doesn't get much love anymore, as all iphone
related code is part of the official distribution. You have to use cmake
to create an iphone-specific xcode-project-file. The handcrafted xcode
project has some advantages, as you can build for simulator and device
from within the same project (which doesn't currently work via cmake)
and has a working example. Another advantage is, that you can embed the
xcode-project into your own project, so all dependencies get build
automatically.

I'll maintain the git-repository in the future, but my time is limited,
don't expect too much :-)

back to the ive/texture-problem: I have no experience with the
ive-plugin, so I converted some osg-models to ive and opened them via an
osg-app running in the simulator.

cow.ive (from cow.osg) shows no texture as cubmapping is appearently not
supported for gles 1, i get a lot of open gl errors in the console.
skydome.ive (from skydome.osg) works in the simulator.

Perhaps your ive-files use opengl features or texture-formats which are
not supported for gles 1/2, try increasing the notify-level to
DEBUG_INFO, perhaps there's some more valuable information.

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


Re: [osg-users] Generating multitouch events

2011-02-08 Thread Stephan Maximilian Huber
Hi Serge,

Am 08.02.11 09:12, schrieb Serge Lages:
 Thanks for your replies, it confirms what I was thinking... The iOS way of
 sending events seems to be an exception, all the touch technologies I use
 (mostly MPX, Windows 7 and TUIO) send them separately, so I think it should
 be useful to add to EventQueue a way to track the events to put them
 altogether into the GUIEventAdapter, what do you think ?

Sounds reasonable :) Perhaps it's a good idea to enhance/refactor the
TouchData-class, so you can use it as a storage for all your
touch-points and add a cloned copy via a GUIEventAdapter to the
event-queue... just an idea.



cheers,
Stephan

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


  1   2   3   >