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

2012-10-31 Thread Mike Wozniewski
FYI, it looks like Stephan's FlipsideView example is broken in iOS 6.

I get an error when trying to add the view:

Code:
-[UIView setRootViewController:]: unrecognized selector sent to instance 
0xca36f0
2012-10-31 11:53:50.850 viewtest[2745:907] *** Terminating app due to uncaught 
exception 'NSInvalidArgumentException', reason: '-[UIView 
setRootViewController:]: unrecognized selector sent to instance 0xca36f0'



In my project, I ended up creating a custom subclass of UIView, which I use 
instead of the default one that comes with a UIViewController and added the 
following method to my custom class:

Code:
- (void) setRootViewController:(UIViewController*)vc;



It's implementation is empty (no op), but it allows the OSG view to be added 
and everything updates correctly after that.

Now my only problem is that my app crashes when the view is Dealloc'd. I get 
this error:

Code:
*** -[GraphicsWindowIOSGLView setGraphicsWindow:]: message sent to deallocated 
instance 0x2411acc0



Any ideas for fixing that one?

Thanks,
Mike

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





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


Re: [osg-users] [osgPPU] DoF blur issues for antialiased text

2012-06-25 Thread Mike Wozniewski
Hi all,

I'm still struggling with this and just wanted to add some extra details.

The problem is that the blur around text near the camera is not being combined 
with blur further back. It's almost like the blur is being drawn from front to 
back while text (rendered as glyphs with alpha channel) are being drawn from 
back to front. Is that possible?

I imagine that this would need to be fixed on the shader side. ie, in 
depth_of_field_fp.glsl (?):


Code:
void main(void)
{
vec2 inTex = gl_TexCoord[0].st;

// compute distance to the viewer
float a = zFar / ( zFar - zNear );
float b = zFar * zNear / ( zNear - zFar );

float depth = texture2D( texDepthMap, inTex ).x;
float dist = b / ( depth - a );

// get color map and blurred color map values
vec4 colorValue = texture2D (texColorMap, inTex).rgba;
vec4 blurredValue1 = texture2D ( texBlurredColorMap, inTex).rgba;
vec4 blurredValue2 = texture2D ( texStrongBlurredColorMap, inTex).rgba;

// now compute the bluriness value
float blur = clamp(abs(dist - focalLength) / focalRange, 0.0, 1.0);
float factor1 = 1.0;
float factor2 = 0.0;

// compute blend factors
if (blur  0.5)
factor2 = (blur - 0.5) * 2.0;
else
factor1 = blur * 2.0;

// the resulting color value is the combination of blurred and non-blurred 
map
vec4 result = mix(colorValue, blurredValue1, factor1);
gl_FragColor = mix(result, blurredValue2, factor2);
}



ie, will gl_FragColor correctly combine previously drawn alpha values?

Any help would be greatly appreciated.

-Mike

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





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


[osg-users] osgtext, transparency, and rendering order?

2012-05-30 Thread Mike Wozniewski
Hi,

I have many osgText::text objects flying around a 3D scene (ie, not in a HUD) 
and transparency is not working correctly. The quads of the text in front 
entirely occlude the text behind, even though transparency is enabled.

Other geometry shows up fine. See the attached image. The white text behind is 
occluded but the lines of my grid are properly drawn through the transparent 
regions of the letters.

[Image: http://forum.openscenegraph.org/files/spinviewerscreensnapz003_175.png ]

If I move the white text in front, both are drawn perfectly. ie, it seems to 
have something to do with their order of creation (or traversal).

For both, I enable blending, depth test, and provide the TRANSPARENT_BIN 
rendering hint:

Code:

labelStateSet-setMode( GL_BLEND, osg::StateAttribute::ON );
labelStateSet-setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );
labelStateSet-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);



I have played with manually setting rendering bins, which can force a 
particular text to draw in front of another, but I want all these pieces of 
text to automatically sort and render correctly without manual input.

Any hints?

Thanks,
Mike[/img]

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




Attachments: 
http://forum.openscenegraph.org//files/spinviewerscreensnapz003_175.png


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


[osg-users] What can cause glCompileShader FAILED?

2012-04-18 Thread Mike Wozniewski
Hi all,

Can someone explain what can cause a shader to not compile? I have a two 
programs with nearly identical build systems, using the same OSG libraries 
(3.1.1) on the same machine. One can compile and run shaders, while the other 
produces this:


Code:
Compiling VERTEX source:
1: // microshader - colors a fragment based on its position
2: varying vec4 color;
3: void main(void)
4: {
5: color = gl_Vertex;
6: gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
7: }

VERTEX glCompileShader  FAILED

Compiling FRAGMENT source:
1: varying vec4 color;
2: void main(void)
3: {
4: gl_FragColor = clamp( color, 0.0, 1.0 );
5: }

FRAGMENT glCompileShader  FAILED
Linking osg::Program  id=0 contextID=0
glLinkProgram  FAILED



I am invoking it in a standard way like this:

Code:
osg::Geode* geode = new osg::Geode();
geode-addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(1,1,1), 1)));
root-addChild(geode);
osg::Program * prog = new osg::Program;
prog-addShader ( new osg::Shader(osg::Shader::VERTEX, microshaderVertSource ) 
);
prog-addShader ( new osg::Shader(osg::Shader::FRAGMENT, microshaderFragSource 
) );
geode-getOrCreateStateSet()-setAttributeAndModes( prog, 
osg::StateAttribute::ON );



It has to be something in my scene graph. Some state being inherited, or some 
setting that I'm unaware of. Any help would be greatly appreciated.

Extra info:
OSX=10.7.3, osgversion=3.1.1, GPU=nvidia GeForce 8600M GT
glVersion=2.1, isGlslSupported=YES, glslLanguageVersion=1.2

Thanks,
Mike

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





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


Re: [osg-users] What can cause glCompileShader FAILED?

2012-04-18 Thread Mike Wozniewski
Hi Sebastian,

Indeed, I now realize that it is some sort of build setting!

To clarify, the program with broken shaders was built with XCode, while the one 
that works was built with an autotools project. Both link with the same libs 
and have all the same flags (I think; will verify). Furthermore, I just tried 
to build the broken program using an autotools system and the exact same code 
works... so it definitely a setting in my XCode project.

I'll poke around to see if I can find the setting, but if anyone knows of an 
XCode flag that would prevent shaders from working, I'd be grateful to know.

-Mike

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





___
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...

2012-04-10 Thread Mike Wozniewski
Thanks Ulrich,

I'm actually having a slightly different problem, which seems to using 
different compilers for OSG and my application. See: 
http://forum.openscenegraph.org/viewtopic.php?p=46918

I thought I'd try fooling around with optimization flags, since I've tried 
almost everything else.

Thanks for your reply though.

Cheers,
Mike

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





___
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-10 Thread Mike Wozniewski
Okay. I finally have a solution!

First thing to note: I didn't have any other gcc compilers other than the llvm 
gcc 4.2 that came with my XCode app. This is because XCode 4.3.1 comes from 
the App store and resides in /Applications, and I have NO /Developer folder.

So, I used Macports to install a different llvm gcc compiler:

Code:
sudo port install llvm-gcc42



Then I compiled OSG like this:

Code:
CC=/opt/local/bin/llvm-gcc CXX=/opt/local/bin/llvm-g++ ccmake 
../OpenSceneGraph-3.1.1



(note: you cannot set the CMAKE_OSX_ARCHITECTURE because this compiler doesn't 
understand -arch flags, so I'm not sure how you would make a universal build 
this way).

I also had to set OSG_WINDOWING_SYSTEM to Cocoa and 
OPENTHREADS_ATOMIC_USE_MUTEX to ON.

Using that build of OSG, my app build, links and runs just fine.

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





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


Re: [osg-users] Problems with OSG in Mac OSX 10.7 (lion). Don't show window when load a model.

2012-04-10 Thread Mike Wozniewski
I found a solution. See the solution at the end of this thread: 
http://forum.openscenegraph.org/viewtopic.php?p=46959

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





___
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-09 Thread Mike Wozniewski
So, I spent much of the weekend compiling different versions of OSG (different 
compilers, universal/non-universal, cmake vs xcode), but no combination has yet 
fixed the crash.

Originally, I used plain cmake to build OSG 2.9.8 libraries and XCode to build 
my app. This worked for me for the past year, but I was forced to upgrade to 
OSX 10.7 and XCode 4.3 or some iOS-related work. My app continued to compile 
(indeed, using the llvm gcc 4.2 compiler) and worked well if linked with 
those old OSG libraries.

But like I said, I wanted to upgrade to OSG 3.x, and stupidly I deleted my old 
OSG 2.9.8 libraries. Now I can't build ANY form of OSG that will make my app 
work again.

I can't build OSG 2.9.8 anymore, because there are a bunch of deprecated 
coregraphics calls and no OPENTHREADS_ATOMIC_USE_MUTEX fix. And any OSG 3.X 
version exhibits the crash (even though the OSG examples work!).

I've tried building OSG with both the llvm gcc 4.2 and Apple llvm compiler 
3.1, but both crash my app.

A few other users have mentioned similar things:
http://forum.openscenegraph.org/viewtopic.php?p=42119
http://forum.openscenegraph.org/viewtopic.php?t=8963

Perhaps the same problem (?). Their solution is to NOT using the llvm compiler 
and use old gcc4.2, but I don't have /usr/bin/gcc-4.2. Any idea how I can get 
that on my OSX 10.7 system with XCode 4.3.1?

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





___
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-09 Thread Mike Wozniewski
Found one other possibility: optimization flags?

This post claims that fixed something:
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2011-August/053774.html

Will try that and report back...

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





___
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...

2012-04-09 Thread Mike Wozniewski
Hi Ulrich (et al),

How did you change the optimization flags in your makefiles? Did you search and 
replace through them all? or is there a cmake variable / technique for doing 
this?

Thanks,
Mike

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





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


Re: [osg-users] Problems with OSG in Mac OSX 10.7 (lion). Don't show window when load a model.

2012-04-09 Thread Mike Wozniewski
Hi all,

I have XCode 4.3.1, which is the .app bundle version from the App Store, and so 
I have no /Developer folder, and no gcc compiler other than the LLVM that comes 
with XCode. ie, no /usr/bin/gcc-4.2

Do you have any suggestions for this situation?

I tried compiling with a gcc compiler from Macports (version 4.4), but I get 
hundreds of errors when compiling osgViewer/DarwinUtils.mm. It seems like that 
compiler doesn't understand any objective-c... error: stray '@' in program, 
etc.

Is there a different way to solve this problem? Any fix yet?

Thanks,
Mike

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





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


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

2012-04-05 Thread 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


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

2012-04-05 Thread Mike Wozniewski
Symbols hidden by default was set to No. Setting it to Yes results in linking 
errors.

The crash occurs in addDotOsgWrapper() when adding the NodeCallback wrapper. 
Specifically, the line:

Code:
std::string libraryName = proto-libraryName();



There are several other wrappers that get added beforehand without problem 
(AlphaFunc, AnimationPath, etc). I don't see any real difference with 
NodeCallback...

In the XCode project settings, I saw a similar option called Inline Methods 
Hidden which was set to Yes. I tried setting that to No. It still crashes, but 
now it crashes when adding the wrapper for AnimationPathCallback (which was 
working before).

Very strange.

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





___
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 Mike Wozniewski
Damn. It looks like the same error occurs when I build using autotools, making 
this less likely related to XCode project settings. Will investigate more...

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





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


Re: [osg-users] [build] OpenGLES2.0 build error

2012-03-29 Thread Mike Wozniewski
Hi Jordi,

Thanks for the example. I couldn't figure out the CMake stuff, so I had to 
build my own XCode project, but it worked! So it seems like my OSG build now 
supports GLES2. !!

Now on to porting my existing iOS projects to use this new rendering 
pipeline... fun.

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





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


Re: [osg-users] [build] OpenGLES2.0 build error

2012-03-27 Thread Mike Wozniewski
Okay another update:

I managed to successfully build OSG using Jordi's cmake toolchain. I still 
needed to do another few things:

- build my own universal freetype library for iOS and set the proper variables 
in the toolchain
- add the CoreGraphics and ImageUI frameworks to the linker flags
- enable code signing

So I can successfully build the example_osgViewerIPhone target, and it runs on 
my device, but I don't see anything - just a blank viewer with the standard 
blue background.

There are some errors related to shaders not being attached properly:

Code:

Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile
VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
ERROR: 0:8: Use of undeclared identifier 'gl_FrontColor'

FRAGMENT glCompileShader  FAILED
FRAGMENT Shader  infolog:
ERROR: 0:4: 'vec4' : declaration must include a precision qualifier for type
ERROR: 0:5: Use of undeclared identifier 'base'
ERROR: 0:6: Use of undeclared identifier 'color'
ERROR: 0:6: Use of undeclared identifier 'gl_Color'
ERROR: 0:7: Use of undeclared identifier 'color'

glLinkProgram  FAILED
Program  infolog:
ERROR: One or more attached shaders not successfully compiled




I don't see any shaders in the example... I guess this is something upstream in 
OSG? Does anyone have an idea of why the example isn't working? Are there any 
OpenGL ES 2.0 examples out there?

Thanks,
Mike[/code]

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





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


Re: [osg-users] [build] OpenGLES2.0 build error

2012-03-15 Thread Mike Wozniewski
Hi Jordi,

Thanks for the instructions, and sorry for taking so long to respond. I had to 
upgrade Xcode to 4.3.1 for a different project and ran into many projects. I'm 
wondering if this is responsible for your cmake toolchain not working for me.

XCode 4.3.1 is the .app version, which removes your /Developer folder, which is 
a pretty significant change.

I had to change your toolchain file to point to the new SDK location:

Code:

#set(IOS_DEVELOPER_ROOT /Developer/Platforms/${IOS_TARGET}.platform/Developer)
set(IOS_DEVELOPER_ROOT 
/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_TARGET}.platform/Developer)




But when I run cmake, I get a compiler error:

Code:

$ cmake -DCMAKE_TOOLCHAIN_FILE=iOS5_GLES2.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not 
be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not 
be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
-- The C compiler identification is Clang
-- The CXX compiler identification is Clang
-- Check for working C compiler: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang
CMake Error: Error required internal CMake variable not set, cmake may be not 
be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not 
be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang
 -- broken
CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 
(MESSAGE):
The C compiler
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang
is not able to compile a simple test program.

It fails with the following output:

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:36 (PROJECT)

-- Configuring incomplete, errors occurred!




I saw in another post (http://forum.openscenegraph.org/viewtopic.php?t=9951) 
that you were using clang. What version?

Mike is:
Apple clang version 3.0 (tags/Apple/clang-211.11) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.3.0

How far are you from finishing your GLES2 example? I'm eager to try it... 
assuming I can get OSG to build properly.

Any ideas are highly appreciated.

Thanks,
Mike

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





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


Re: [osg-users] [build] OpenGLES2.0 build error

2012-03-15 Thread Mike Wozniewski
Oops. Ignore that last post. I forgot to also update IOS_SDK_VERSION to 5.1 in 
your toolchain file. Now it successfully configures. Will keep you posted once 
I finish building everything.

-Mike

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





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


Re: [osg-users] [build] OpenGLES2.0 build error

2012-03-08 Thread Mike Wozniewski
Hi Tobias,

Is there any chance you can post your cmake command that builds for OpenGL ES2? 
I tried yours (had to change the SDK to 5.0) but I get a ton of compile errors, 
starting with:

'glLoadMatrixf' was not declared in this scope

Thanks,
Mike

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





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


Re: [osg-users] Forked osgIntrospection to cppintrospection

2011-03-15 Thread Mike Wozniewski
Hi all,

I am the main developer for the spinframework, and wanted to chime in to this 
discussion.

First, I've been working with osgIntrospection for some time, and find it a 
great tool for reflection that really facilitates building editors and 
networked-based parsers for controlling OSG.

And as I understand it, serializers will replace this functionality. I've 
already played with this a bit, but couldn't find much documentation, and had 
some problems. I tried Wang Rui's reflection wrappers (see forum topic 5883) 
... and I think this will be the way to go once it's stable. Very exciting.

In the meantime, there hasn't been a stable tag made for osgIntrospection in 
the svn. In order to build it, I usually end up deleting a bunch of wrappers 
that don't compile. Furthermore, we don't need all of the osgWrappers. We just 
need the core osgIntrospection classes (Type, MethodInfo, etc), as required for 
reflection or our own classes that we have derived from OSG.

* ie, we don't need osgWrappers, just introspection *

At some point Robert mentioned that osgIntrospection could become a generic C++ 
introspection, and this is the inspiration for 'cppintrospection'... something 
that can be used independently of OSG. I like this idea. Less bloat, and much 
faster to build for projects like ours.

I think the name distinction is necessary, since legacy systems that have 
versions of OSG  2.9.9 will contain a library called libosgIntrospection, that 
contains (is linked with) all of the osgWrappers.

Anyway, all this is to say that:
1. We can maintain and support a generic, OSG-independent introspection 
library, called 'cppintrospection'. If someone want to create wrappers for OSG 
and build a library called something like libOSGWrappers, then these two pieces 
together could replace osgIntrospection in newer versions.
2. We can help test a new serializer-based reflection library for OSG
(minor) we will eventually move to cmake. This could equally replace 
osgIntrospection.

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





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


Re: [osg-users] OSG on iPhone (size?)

2010-12-02 Thread Mike Wozniewski

On 10-12-02 4:53 AM, Ulrich Hertlein wrote:

On 2/12/10 15:13 , Mike Wozniewski wrote:

On 2/12/10 12:49 , Mike Wozniewski wrote:

$ du -hs *.a
328KlibOpenThreads.a
240Mlibosg.a
   51MlibosgAnimation.a
116MlibosgDB.a
   34MlibosgFX.a
   75MlibosgGA.a
   67MlibosgManipulator.a
   75MlibosgParticle.a
   25MlibosgPresentation.a
   69MlibosgShadow.a
   56MlibosgSim.a
   24MlibosgTerrain.a
   32MlibosgText.a
227MlibosgUtils.a
547MlibosgViewer.a
   31MlibosgVolume.a
   92MlibosgWidget.a

What sort of a build is this?  Debug or release?  Device or simulator?
The numbers I'm getting from a release/simulator build (Xcode 3.2.3) are far 
lower:

5.5Mlibosg.a
1.2MlibosgAnimation.a
1.7MlibosgDB.a
408KlibosgFX.a
1.2MlibosgGA.a
692KlibosgManipulator.a
848KlibosgParticle.a
484KlibosgPresentation.a
952KlibosgShadow.a
1020KlibosgSim.a
384KlibosgTerrain.a
616KlibosgText.a
3.1MlibosgUtil.a
1.2MlibosgViewer.a
448KlibosgVolume.a
744KlibosgWidget.a


This is a release/device build (Xcode 3.2.4), but oddly, the debug build is 
pretty
similar... just slightly larger (eg, 244M for libosg.a rather than 240M).

Remember that this is a *simulator* build, hence i386 architecture.
The armv6/v7 might explain a certain increase (CISC vs RISC; maybe x2?) but 
nothing this
massive.  Maybe another x2 for a universal build but this is still nowhere near 
what
you're seeing...

/ulrich


Hmm. Indeed, optimizing for arm6/7 cut the size in half, but I get a 
libosg.a of 133MB. So, I'm definitely confused. I'm building using 
Xcode. Are you using cmake instead?


I'm a bit at a loss here. I've tried playing with various optimization 
settings in Xcode, but the result is usually insignificant. It takes a 
long time to compile and verify too, so I'm curious if there's a way to 
compare settings somehow?


I'm not so great with Xcode, but a sample compilation call for me looks 
like this:


CompileC 
build/OSGIPhone.build/Debug-iphoneos/osg.build/Objects-normal/armv6/Node.o 
../src/osg/Node.cpp normal armv6 c++ com.apple.compilers.gcc.4_2

cd /Users/mikewoz/src/osg-iphone/IPhone_Project
setenv LANG en_US.US-ASCII
setenv PATH 
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x c++ 
-arch armv6 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O0 
-Wreturn-type -Wunused-variable -isysroot 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk 
-mfix-and-continue -gdwarf-2 -mno-thumb -miphoneos-version-min=3.2 
-iquote 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/osg-generated-files.hmap 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/osg-own-target-headers.hmap 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/osg-all-target-headers.hmap 
-iquote 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/osg-project-headers.hmap 
-F/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Debug-iphoneos 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Debug-iphoneos/include 
-I../include -I../../OpenThreads/include -Iconfig 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/DerivedSources/armv6 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/DerivedSources 
-c /Users/mikewoz/src/osg-iphone/IPhone_Project/../src/osg/Node.cpp -o 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/Objects-normal/armv6/Node.o


and linking looks like this:

Libtool build/Debug-iphoneos/libosg.a normal armv6
cd /Users/mikewoz/src/osg-iphone/IPhone_Project
setenv IPHONEOS_DEPLOYMENT_TARGET 3.2
setenv PATH 
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool -static 
-arch_only armv6 -syslibroot 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk 
-L/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Debug-iphoneos 
-filelist 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Debug-iphoneos/osg.build/Objects-normal/armv6/osg.LinkFileList 
-o 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Debug-iphoneos/libosg.a


Would it be possible for someone to post theirs, so I can compare? ... 
it's the only idea I have right now.


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


Re: [osg-users] OSG on iPhone (size?)

2010-12-02 Thread Mike Wozniewski

On 10-12-02 10:43 AM, Garrett Potts wrote:

Hello Mike:

I have not tried to build the iphone OS port but it appears in your cut and 
paste you have the Active configuration as Debug as seen with the link path 
.Debug-iphoneos/osg.build/osg-generated-files.hmap.

Hi Garrett,

Yeah, sorry; that was a Debug build... but a Release build is still 
125MB (for libosg.a). Below is sample Xcode output for the Release 
configuration (you can see that it even uses the -Os option to optimize 
for space). I don't get it.


CompileC 
build/OSGIPhone.build/Release-iphoneos/osg.build/Objects-normal/armv6/Node.o 
../src/osg/Node.cpp normal armv6 c++ com.apple.compilers.gcc.4_2

cd /Users/mikewoz/src/osg-iphone/IPhone_Project
setenv LANG en_US.US-ASCII
setenv PATH 
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x c++ 
-arch armv6 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -Os 
-Wreturn-type -Wunused-variable -isysroot 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk 
-gdwarf-2 -mno-thumb -miphoneos-version-min=3.2 -iquote 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-generated-files.hmap 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-own-target-headers.hmap 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-all-target-headers.hmap 
-iquote 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-project-headers.hmap 
-F/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Release-iphoneos 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Release-iphoneos/include 
-I../include -I../../OpenThreads/include -Iconfig 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/DerivedSources/armv6 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/DerivedSources 
-c /Users/mikewoz/src/osg-iphone/IPhone_Project/../src/osg/Node.cpp -o 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/Objects-normal/armv6/Node.o



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


Re: [osg-users] OSG on iPhone (size?)

2010-12-02 Thread Mike Wozniewski
Okay... so the libraries need to have all of that (ie, all symbols), but 
when the .app is created and dead code stripping is enabled, any 
unneeded symbols are stripped away. This leaves me with an .app size of 
around 15-20MB.


Thanks for everyone's help,
Mike

On 10-12-02 12:10 PM, Mike Wozniewski wrote:

On 10-12-02 10:43 AM, Garrett Potts wrote:

Hello Mike:

I have not tried to build the iphone OS port but it appears in your 
cut and paste you have the Active configuration as Debug as seen with 
the link path .Debug-iphoneos/osg.build/osg-generated-files.hmap.

Hi Garrett,

Yeah, sorry; that was a Debug build... but a Release build is still 
125MB (for libosg.a). Below is sample Xcode output for the Release 
configuration (you can see that it even uses the -Os option to 
optimize for space). I don't get it.


CompileC 
build/OSGIPhone.build/Release-iphoneos/osg.build/Objects-normal/armv6/Node.o 
../src/osg/Node.cpp normal armv6 c++ com.apple.compilers.gcc.4_2

cd /Users/mikewoz/src/osg-iphone/IPhone_Project
setenv LANG en_US.US-ASCII
setenv PATH 
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x 
c++ -arch armv6 -fmessage-length=0 -pipe -Wno-trigraphs 
-fpascal-strings -Os -Wreturn-type -Wunused-variable -isysroot 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk 
-gdwarf-2 -mno-thumb -miphoneos-version-min=3.2 -iquote 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-generated-files.hmap 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-own-target-headers.hmap 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-all-target-headers.hmap 
-iquote 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/osg-project-headers.hmap 
-F/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Release-iphoneos 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/Release-iphoneos/include 
-I../include -I../../OpenThreads/include -Iconfig 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/DerivedSources/armv6 
-I/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/DerivedSources 
-c /Users/mikewoz/src/osg-iphone/IPhone_Project/../src/osg/Node.cpp -o 
/Users/mikewoz/src/osg-iphone/IPhone_Project/build/OSGIPhone.build/Release-iphoneos/osg.build/Objects-normal/armv6/Node.o



___
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 on iPhone (size?)

2010-12-01 Thread Mike Wozniewski

Hi all,

I've been playing around with the iPhone version of OSG lately, and I'm 
pretty happy.


Just wondering about the feasibility of posting something on the app 
store due to size constraints. I'm noticing that OSG is pretty massive:


$ du -hs *.a
328KlibOpenThreads.a
240Mlibosg.a
 51MlibosgAnimation.a
116MlibosgDB.a
 34MlibosgFX.a
 75MlibosgGA.a
 67MlibosgManipulator.a
 75MlibosgParticle.a
 25MlibosgPresentation.a
 69MlibosgShadow.a
 56MlibosgSim.a
 24MlibosgTerrain.a
 32MlibosgText.a
227MlibosgUtils.a
547MlibosgViewer.a
 31MlibosgVolume.a
 92MlibosgWidget.a

It's not an option to use 1GB of storage for OSG libraries. Does anyone 
have ideas of how to simplify the build? Is there a way to automatically 
remove library items that are not used?


Why is this so big?

Thanks in advance,
Mike Wozniewski
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG on iPhone (size?)

2010-12-01 Thread Mike Wozniewski

On 10-12-01 9:03 PM, Ulrich Hertlein wrote:

On 2/12/10 12:49 , Mike Wozniewski wrote:

Just wondering about the feasibility of posting something on the app store due 
to size
constraints. I'm noticing that OSG is pretty massive:

$ du -hs *.a
328KlibOpenThreads.a
240Mlibosg.a
  51MlibosgAnimation.a
116MlibosgDB.a
  34MlibosgFX.a
  75MlibosgGA.a
  67MlibosgManipulator.a
  75MlibosgParticle.a
  25MlibosgPresentation.a
  69MlibosgShadow.a
  56MlibosgSim.a
  24MlibosgTerrain.a
  32MlibosgText.a
227MlibosgUtils.a
547MlibosgViewer.a
  31MlibosgVolume.a
  92MlibosgWidget.a

What sort of a build is this?  Debug or release?  Device or simulator?
The numbers I'm getting from a release/simulator build (Xcode 3.2.3) are far 
lower:

5.5Mlibosg.a
1.2MlibosgAnimation.a
1.7MlibosgDB.a
408KlibosgFX.a
1.2MlibosgGA.a
692KlibosgManipulator.a
848KlibosgParticle.a
484KlibosgPresentation.a
952KlibosgShadow.a
1020K   libosgSim.a
384KlibosgTerrain.a
616KlibosgText.a
3.1MlibosgUtil.a
1.2MlibosgViewer.a
448KlibosgVolume.a
744KlibosgWidget.a

/uli

This is a release/device build (Xcode 3.2.4), but oddly, the debug build 
is pretty similar... just slightly larger (eg, 244M for libosg.a rather 
than 240M).


I don't get it. Why are yours so small? ... I did a clean checkout of 
the iphone git branch today and built with the existing project 
settings. Hm... I see that I'm building for both arm6 and arm7. This 
means a universal build will be generated, and will be larger. Are you 
optimizing for only one architecture (arm7?).


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


Re: [osg-users] Creating and exporting OSG Switches from 3ds max

2010-09-03 Thread Mike Wozniewski

 This is the only doc that I've seen:

http://www.openscenegraph.org/projects/osg/wiki/Community/OSGExp/Documentation/OSGSwitch

-mike

On 10-09-03 1:40 AM, Luke Daly wrote:

Hi,

I was wondering if there was any tutorials that anyone knows of for the 
creation and exporting of OSG models with Switch nodes.

I am working on a driving simulator that for the creation of objects such as 
traffic lights, the different colour lights must be created with OSG switches. 
Only I have never used these before. I have installed OSGexp for 3ds max 2010, 
and I know how to add an OSG_Switch to the scene, but there my knowledge ends.

So if anyone knows of a noob or beginner tut for this, I would really 
apprecitate it.
...

Thank you!

Cheers,
Luke

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





___
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] Future of osgIntrospection + genwrapper, volunteers required.

2010-06-28 Thread Mike Wozniewski

Hi Robert / Wang Rui,

I'd be willing to help on this as well. Particularly, I'd like to help 
get a debian ( ubuntu) package out soon that includes osgIntrospection 
and genwrapper.


Robert, can you add genwrapper to the new repository?

Specific things that I am interested in:
- ensuring that genwrapper builds properly
- ensuring that genwrapper can find OSG's headers and build the wrappers
- when the 2.9.9 tag is made for OSG, make a corresponding tag for 
osgIntrospection (and a tarball)

- use the tarball to set up packaging for debian and ubuntu launchpad

I'm more familiar with autotools, and would be willing to do all this in 
that style. However, cmake seems easy enough, so I could tackle this 
using cmake assuming that I could ask everyone some questions.


-Mike


On 10-06-23 11:32 AM, Wang Rui wrote:

Hi Robert,

Thanks. I will complete the cmake scripts of osgIntrospection once I 
got the permission tomorrow.


Cheers,

Wang Rui

2010/6/23 Robert Osfield robert.osfi...@gmail.com 
mailto:robert.osfi...@gmail.com


Hi Wang Rui,

I've just tried your Cmake scripts out and they compile
osgIntrospection.  As it's a reasonable first step I've gone ahead an
merged these CmakeLists.txt and CMakeModules files and checked them
into osgIntrospection/svn/trunk.

I'll contact Jose Luis Hidalgo about getting your write permission for
osgIntrospection.

Cheers,
Robert.

On Wed, Jun 23, 2010 at 1:35 PM, Wang Rui wangra...@gmail.com
mailto:wangra...@gmail.com wrote:
 Hi Robert,
 FYI, I have created a set of cmake scripts to build OSG based
projects
 before. I just tested it with the osgIntrospection library only
and it seems
 to work well. I would like to share it with the community and
see if it can
 be a not bad replacement.
 Besides, osgBullet and osgworks created by Paul Martz also has a
couple of
 light-weight cmake scripts. I wonder if it can work on more
platforms. (mine
 is only tested on windows and linux)
 Please note that I didn't add cmake scripts for wrappers and
examples in the
 attachment at present. Let's first have a look at all
possibilities. :)
 Cheers,
 Wang Rui

 2010/6/23 Robert Osfield robert.osfi...@gmail.com
mailto:robert.osfi...@gmail.com

 Hi All,

 On Wed, Jun 23, 2010 at 12:44 PM, Robert Osfield
 robert.osfi...@gmail.com mailto:robert.osfi...@gmail.com wrote:
  I'll create the above osgIntrospection project this week

 The first step is now done, I've created a new osgIntrospection
 project and moved in the source for the include/osgIntrospection
 src/osgIntrospection, src/osgWrappers and the
 examples/osgintrospection, you can check it out at:

  svn co
http://www.openscenegraph.org/svn/osg/osgIntrospection/trunk
 osgIntrospection

 I have yet copied in a working set of CMakeLists.txt files yet
though,
 so the the above project doesn't compile, it just the headers and
 sources.  The current work in OSG svn/trunk for
osgIntrospection uses
 the OSG's CMakeLists.txt set that is probably overkill for
 osgIntrospection.  Perhaps using VPB's CMakeLists.txt set would
be a
 bit less overdone, but even that is based on the OSG's.  A new
bunch
 of Cmake scripts would probably be best.

 Thoughts?
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] First pass on 3D virtualization using osg

2010-06-27 Thread Mike Wozniewski

Try VirtualPlanetBuilder:
http://www.openscenegraph.org/projects/VirtualPlanetBuilder

There is a good step-by-step guide here:
http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem

-Mike

On 10-06-26 10:32 AM, Domingo López Oller wrote:

Hi, I'm from Spain and I would like to know how to use osg to create virtual 
maps from tga files.

I have seen all the examples but I don't know how to use de terrain library to 
this project. I need help to begin de project.

Thanks!

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





___
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] Rotating a vector

2010-06-09 Thread Mike Wozniewski

You can make a quaternion from euler angles like this:

osg::Quat q = osg::Quat( pitch, osg::Vec3d(1,0,0),
 roll, osg::Vec3d(0,1,0),
 yaw, osg::Vec3d(0,0,1));

Then multiply your vector by the quat:

osg::Vec3d rotated = vector * q;



On 09/06/10 6:16 PM, John Galt wrote:

Hi,

How do I rotate a vector by certain Roll, Pitch, Yaw angles?

Let us say I have a vector osg::Vec3d vector = new osg::Vec3d(10,10,5);

How do I rotate this?


Thank you!

Cheers,
John

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





___
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] Why is osgIntrospection not in the .deb?

2010-06-03 Thread Mike Wozniewski

Hi Robert,

I use introspection to control OSG from external (networked) processes. 
Specifically, I have developed an OpenSoundControl protocol allowing 
users to send arbitrary messages over the network, which get translated 
into class function calls with appropriate arguments. It's great not 
having to wrap every single method.


I also have a lot of custom classes, build my own wrappers using 
genwrapper, and use introspection for them as well.


I'll look into the serialization support. Hopefully it will be easy to 
switch over. Otherwise, I guess I'll ship the wrappers myself.


Thanks,
-Mike

On 03/06/10 3:45 AM, Robert Osfield wrote:

Hi Mike,

The debian package mantainers make the decisions about what packages
get built, so I'll defer them to whether they feel it's appropriate to
include osgIntrospection and associated wrappers.  The wrappers are
very large though and not widely used so the cost benefit ratio is
much lower than for the rest of the OSG.

I'd also like to add that osgIntrospection is unlikely to make the cut
for OSG-3.0, my current intention is to move it out into its own
separate project.  The new serialization support is lighter weight and
far more maintainable, and with a bit more work looks likely to be
able replace much of osgIntrospection's functionality.

I'm curious as to why you'd like introspection as a .deb package, what
are you using it for?  Are you unable to ship the wrappers yourself?

Robert.



On Thu, Jun 3, 2010 at 3:59 AM, Mike Wozniewskim...@mikewoz.com  wrote:
   

Well, as he subject says, I'm wondering why the osgIntrospection library is
not included in the standard debain packages (eg, those provided in Ubuntu).

It contains pretty much everything other aspect of the toolkit.

Does anyone know of a repository containing packages with osgIntrospection?
Can I make a request that future packages contain osgIntrospection?

Thanks,
Mike Wozniewski
___
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] Why is osgIntrospection not in the .deb?

2010-06-03 Thread Mike Wozniewski

Cool. Though, I'm not exactly sure where to submit a wishlist bug report.

I just added one for launchpad.net (Ubuntu)
https://bugs.launchpad.net/ubuntu/+source/openscenegraph/+bug/589267

I imagine you were thinking of some other location?

-Mike

On 03/06/10 4:51 AM, Alberto Luaces wrote:

Hi Mike, Robert,

I think the main reason for the Debian/Ubuntu packages not including
osgIntrospection was that some compilation problems that arised in some
architectures in the past, in addition of the fact that nobody asked for
them.

Mike, can you submit a wishlist bug report in order to try to enable
them on the next release?

   


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


[osg-users] Why is osgIntrospection not in the .deb?

2010-06-02 Thread Mike Wozniewski
Well, as he subject says, I'm wondering why the osgIntrospection library 
is not included in the standard debain packages (eg, those provided in 
Ubuntu).


It contains pretty much everything other aspect of the toolkit.

Does anyone know of a repository containing packages with 
osgIntrospection? Can I make a request that future packages contain 
osgIntrospection?


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


[osg-users] How to force FFMPEG plugin

2010-04-16 Thread Mike Wozniewski
Does anyone know how to force the use of the ffmpeg plugin instead of 
xine. I know that this is possible on the commandline, eg:


osgmovie -e ffmpeg movie.mov

But I'd like to do this in code, eg:
 osg::Image* image = osgDB::readImageFile(path);
 osg::ImageStream* imagestream = dynamic_castosg::ImageStream*(image);

I can't seem to find how the osgmovie example uses this extension 
argument...


Any pointers would be appreciated.

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


Re: [osg-users] How to force FFMPEG plugin

2010-04-16 Thread Mike Wozniewski

Ah - that worked. So easy.

Thanks.

Mourad Boufarguine wrote:

Hi Mike,

You should preload ffmpeg plugin before reading the movie file :

std::string libName =
osgDB::Registry::instance()-createLibraryNameForExtension(ffmpeg);
osgDB::Registry::instance()-loadLibrary(libName);

Mourad

On Fri, Apr 16, 2010 at 8:41 PM, Mike Wozniewski m...@mikewoz.com 
mailto:m...@mikewoz.com wrote:


Does anyone know how to force the use of the ffmpeg plugin instead
of xine. I know that this is possible on the commandline, eg:

osgmovie -e ffmpeg movie.mov

But I'd like to do this in code, eg:
 osg::Image* image = osgDB::readImageFile(path);
 osg::ImageStream* imagestream =
dynamic_castosg::ImageStream*(image);

I can't seem to find how the osgmovie example uses this extension
argument...

Any pointers would be appreciated.

Thanks,
Mike Wozniewski
___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] Transparent Wall and Grid system Creation

2010-03-26 Thread Mike Wozniewski
Assuming your cube is an osg shape primitive, I guess you would create
the grid as a texture (with transparency), and add it to the cube. eg,

osg::Texture2D* cubeTexture = new osg::Texture2D();
cubeTexture-setImage(osgDB::readImageFile(somePath));

osg::StateSet *ss = cubeGeode-getOrCreateStateSet();
ss-setMode( GL_BLEND, osg::StateAttribute::ON );
ss-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
ss-setTextureAttributeAndModes(0,cubeTexture,osg::StateAttribute::ON);

But better would be to make a grid from a vertex array. eg, this makes
one side of the cube:

size = 10; // number of grid squares
int numVertices = 8 + (size*8);
osg::Geode gridGeode = new osg::Geode();
osg::Geometry* gridLines = new osg::Geometry();
osg::Vec3 myCoords[numVertices];
for (int i = 0; i = _size; i++)
{
myCoords[i+0+(i*7)] = osg::Vec3(-size,  i, 0.0);
myCoords[i+1+(i*7)] = osg::Vec3( size,  i, 0.0);
myCoords[i+2+(i*7)] = osg::Vec3(-size, -i, 0.0);
myCoords[i+3+(i*7)] = osg::Vec3( size, -i, 0.0);
myCoords[i+4+(i*7)] = osg::Vec3( i, -size, 0.0);
myCoords[i+5+(i*7)] = osg::Vec3( i,  size, 0.0);
myCoords[i+6+(i*7)] = osg::Vec3(-i, -size, 0.0);
myCoords[i+7+(i*7)] = osg::Vec3(-i,  size, 0.0);
}
osg::Vec3Array* vertices = new osg::Vec3Array(numVertices,myCoords);
gridLines-setVertexArray(vertices);
gridLines-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES,
0, numVertices));

Hope that helps.

On Fri, 2010-03-26 at 18:53 +, Richard Redding wrote:
 Hey All,
 
  Right now I am using OSG to code a cube for viewing an IR LED in 3DOF 
 using 2 wiimotes. The problem I am running into right now is how to turn the 
 walls of the cube transparent and interlace a grid in the cube to see three 
 dimensional movement based on the vectors I have calculated to equate one 
 point in three dimensional space for which it will run around inside of the 
 cube. 
 
 I am calculating the position of the 1 IR LED by triangulating the shortest 
 vector between the lines of sight and taking its median.
 
 I am very new to OSG and only have a basic C++/C education.
 I am sorry if this is too trivial of a question.
 
 ... 
 
 Thanks all!
 
 Cheers Mates,
 Richard
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=26208#26208
 
 
 
 
 
 ___
 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] ffmpeg plays correct, but slows down after loop

2010-03-24 Thread Mike Wozniewski
Hi,

Has anyone experienced the slowing down of video (approx half speed)
after it loops? ie, the movie plays at regular speed the first
iteration, but once it loops, the speed is slow.

This is an FFMPEG plugin issue. I can reproduce this with the osgmovie
example (unmodified) in OSG 2.9.7

The plugin reports the following for the video:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'OceanBeach1_FullShortShort_H264.mov':
  Duration: 00:02:24.23, start: 0.00, bitrate: 15663 kb/s
Stream #0.0(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream #0.1(eng): Video: h264, yuv420p, 1024x1024, 30 tbr, 600 tbn,
1200 tbc

One last question: What is the optimal format for ffmpeg + osg?

Thanks,
Mike Wozniewski

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


Re: [osg-users] multiple render targets / cameras

2009-06-08 Thread Mike Wozniewski
It's probably osgViewer::CompositeViewer that you want, not 
osgViewer::Viewer. There's an example in the source. That way you create 
two different osgViewer::Views, and each can have it's own manipulator. 
The control is up to you, but if you want automated rotations and 
panning, I usually use NodeTrackerManipulator instead of 
TrackBallManipulator. I just create a PositionAttitudeTransform 
somewhere in my scene that represents the camera position, and animate 
it in a callback like Jason suggests.


-Mike

Jason Daly wrote:

Bob Youmans wrote:


My questions are currently:

1.What’s the best way to connect the two cameras so they’re 
the same position  orientation, only rendering to different targets 
(e.g., update the matrix of one with the other using an update 
traversal, put both under a transform node in a tree, etc.)?




This sounds like a plain old osgViewer::Viewer with a slave camera is 
the way to go.  You control the viewpoint with the master camera, and 
both cameras render wherever you need them.  I think the osgsidebyside 
example may give you an idea how to set this up (it's not exactly what 
you're looking for, but a lot of the code is relevant).  osgprerender 
might also be relevant.



2.   What’s the best way to programmatically (vs 
TrackBallManipulator default) control the camera, and/or switch 
between these methods?




The most straightforward way to do this is with an UpdateCallback.  I 
think Paul Martz's OSG Quick Start Guide explains this pretty well.


--J



___
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] osgviewerWX on OSX

2009-06-07 Thread Mike Wozniewski

Hi,

I have a WX app with an OpenGL viewer that based on the osgviewerWX
example in the OSG release. I won't include the code, since it's a bit
complicated, but I'm wondering if anyone would know why the viewer
window is empty (I just see the clearcolor of the camera) on OSX while
it works perfectly in Linux?

If it helps, I get the following compilation warnings:

/opt/local/include/wx-2.8/wx/mac/carbon/glcanvas.h:49: warning: 
‘AGLDrawable’ is deprecated (declared at 
/System/Library/Frameworks/AGL.framework/Headers/agl.h:61)
/opt/local/include/wx-2.8/wx/mac/carbon/glcanvas.h:53: warning: 
‘AGLDrawable’ is deprecated (declared at 
/System/Library/Frameworks/AGL.framework/Headers/agl.h:61)


Also, once I add something to my scene, I get the following error
printed every frame:

CullVisitor::apply(Geode) detected NaN,
   depth=nan, center=(0 0 0),
   matrix={
   nan nan nan nan
   nan nan nan nan
   nan nan nan nan
   nan nan nan nan
}

Any idea where I should look?

The code is very similar to osgviewerWX, with one notable exception: the
frame that holds the OSGCanvas is not shown by default. It is created
while hidden, and can be opened (using Show()) by the user when he/she
desires. It's not a problem in Linux though...

Any feedback would be greatly appreciated.

Thanks,
Mike

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


Re: [osg-users] Creating custom wrappers for osgIntrospection

2008-08-21 Thread Mike Wozniewski

Thanks Robert.

However, I think that genwrapper is not going to work for me. My source 
tree does not look enough like OSG, and I also have some custom types in 
my classes that genwrapper doesn't know about.


I'm wondering if I can call introspection macros by hand? (I don't have 
too many to do).


For example, I'd like to reflect my class asReferenced, so I've come up 
with something like this:

BEGIN_OBJECT_REFLECTOR(asReferenced)
   I_BaseType(osg::Referenced);
   I_Constructor1(IN, t_symbol *, initID, Properties::NON_EXPLICIT, 
signature0, , );
   I_Method1(void, setParent, IN, t_symbol *, parent, 
Properties::NON_VIRTUAL, signatureA, , );
   I_Method0(t_symbol *, getParent, Properties::NON_VIRTUAL, 
signatureB, , );

   .
   .
END_REFLECTOR

But what to put for signatures? Is there a way to automatically generate 
these?


Thanks again,
-Mike




Robert Osfield wrote:

Hi Mike,

I've been updating the svn version of genwrapper, so grab svn/trunk if
you want the latest.  I'll will update the tarball as well.

Robert.

On Wed, Aug 20, 2008 at 9:06 PM, Mike Wozniewski [EMAIL PROTECTED] wrote:
  

Hi,

I have custom classes which extend OSG classes, and I'd like to create
wrapper libraries for use with osgIntrospection. Particularly, I'd like to
use these wrappers to call my custom methods from a GUI that doesn't need to
know a lot about the classes.

I've found something called GenWrapper
(http://www.openscenegraph.org/projects/osg/wiki/GenWrapper), but it seems
to be quite old, pre-dating OSG 2.x.

Does anyone have some sample code that creates wrapper libraries?

Furthermore, does anyone have examples of custom classes which use
osgIntrospection? ... I'm having a hard time understanding the reflection
mechanism in OSG. Any examples would be appreciated.

Also, I'd like to be compatible with both Linux and OSX.

Thanks in advance,
Mike Wozniewski
___
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] Creating custom wrappers for osgIntrospection

2008-08-21 Thread Mike Wozniewski

Actually, nevermind about genwrapper.

I've managed to use the latest svn version to create custom wrappers for 
my classes (yay). Now what I would like to do, is to build a scene-graph 
editor GUI to edit my class properties.


Details:

   * I particularly like wxWidgets and gtk.
   * The editor doesn't need to render the scene in the same process
 (for now). All I need is a tree-view of the scene, with panels
 that open when a particular node is clicked.
   * I would like to be able to choose what types of nodes appear in
 the tree-view. Only my custom nodes and a small subset of osg
 nodes (eg, osg::Group, osg::PositionAttitudeTransform, and a
 couple others) should appear.
   * Must rely on osgIntrospection and osgWrappers generated by
 genwrapper... I was excited about osgedit, until I realized that
 it uses some other (custom) reflection mechanism.


Does anyone have some simple examples? Are there any libraries that use 
osgWrappers  osgIntrospection to provide a GUI?


Thanks in advance for any pointers,
-Mike


Robert Osfield wrote:

HI Mike,

I'll have to defer to the osgInttrospection/genwrapper author Marco
Jez for low level questions about the wrappers.  Hopefully he'll spot
this this thread and comment.

Robert.

On Thu, Aug 21, 2008 at 4:10 PM, Mike Wozniewski [EMAIL PROTECTED] wrote:
  

Thanks Robert.

However, I think that genwrapper is not going to work for me. My source tree
does not look enough like OSG, and I also have some custom types in my
classes that genwrapper doesn't know about.

I'm wondering if I can call introspection macros by hand? (I don't have too
many to do).

For example, I'd like to reflect my class asReferenced, so I've come up with
something like this:
BEGIN_OBJECT_REFLECTOR(asReferenced)
  I_BaseType(osg::Referenced);
  I_Constructor1(IN, t_symbol *, initID, Properties::NON_EXPLICIT,
signature0, , );
  I_Method1(void, setParent, IN, t_symbol *, parent,
Properties::NON_VIRTUAL, signatureA, , );
  I_Method0(t_symbol *, getParent, Properties::NON_VIRTUAL, signatureB, ,
);
  .
  .
END_REFLECTOR

But what to put for signatures? Is there a way to automatically generate
these?

Thanks again,
-Mike




Robert Osfield wrote:


Hi Mike,

I've been updating the svn version of genwrapper, so grab svn/trunk if
you want the latest.  I'll will update the tarball as well.

Robert.

On Wed, Aug 20, 2008 at 9:06 PM, Mike Wozniewski [EMAIL PROTECTED]
wrote:

  

Hi,

I have custom classes which extend OSG classes, and I'd like to create
wrapper libraries for use with osgIntrospection. Particularly, I'd like
to
use these wrappers to call my custom methods from a GUI that doesn't need
to
know a lot about the classes.

I've found something called GenWrapper
(http://www.openscenegraph.org/projects/osg/wiki/GenWrapper), but it
seems
to be quite old, pre-dating OSG 2.x.

Does anyone have some sample code that creates wrapper libraries?

Furthermore, does anyone have examples of custom classes which use
osgIntrospection? ... I'm having a hard time understanding the reflection
mechanism in OSG. Any examples would be appreciated.

Also, I'd like to be compatible with both Linux and OSX.

Thanks in advance,
Mike Wozniewski
___
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

  


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


[osg-users] Creating custom wrappers for osgIntrospection

2008-08-20 Thread Mike Wozniewski

Hi,

I have custom classes which extend OSG classes, and I'd like to create 
wrapper libraries for use with osgIntrospection. Particularly, I'd like 
to use these wrappers to call my custom methods from a GUI that doesn't 
need to know a lot about the classes.


I've found something called GenWrapper 
(http://www.openscenegraph.org/projects/osg/wiki/GenWrapper), but it 
seems to be quite old, pre-dating OSG 2.x.


Does anyone have some sample code that creates wrapper libraries?

Furthermore, does anyone have examples of custom classes which use 
osgIntrospection? ... I'm having a hard time understanding the 
reflection mechanism in OSG. Any examples would be appreciated.


Also, I'd like to be compatible with both Linux and OSX.

Thanks in advance,
Mike Wozniewski
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] compile subset of OSG without openGL?

2007-11-12 Thread Mike Wozniewski
Hi all,

I have an simple OSG application that I'm trying to port to a small 
mobile device (Gumstix), and I'm trying to cross-compile a small subset 
of the OSG library. I don't have OpenGL or X11 available on the device, 
but I don't need that, because I'm only using OSG for basic scene graph 
organization and 3D geometry.

*** I don't need to create windows or render anything ***

So my questions are:

- First, is this possible?
- Has anyone built a subset of OSG and could provide me with a template 
for doing so?
- Does anyone have a basic makefile (not cmake) that I can modify to 
generate a subset of libosg that doesn't link with libGL, libX11, etc.
- I don't really understand the cmake system, so can anyone point me to 
the place where libosg is built? ... or provide me with some basic info 
about changing compilers and preventing cmake from looking in the 
regular locations (eg, /usr/include, /usr/lib, etc)?

The classes I need are the very basic scene graph management stuff:
- osg::Node
- osg::PositionAttitudeTransform
- osg::Group
- osg::Matrix
- osg::Quat
- osg::Vec3
- etc.

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


Re: [osg-users] Viewer Windowing Problems

2007-10-23 Thread Mike Wozniewski
I can confirm similar (but slightly different) behaviour.

- My osgviewer cannot leave fullscreen at all. I see a window flash for 
a brief moment, but then fullscreen returns. This seems to happen only 
the first time I press the 'f' key. Nothing happens on any subsequent 
presses. (ubuntu 7.10, nvidia, compiz disabled, OSG 2.2)
- In some cases (eg, when compiz is enabled), leaving fullscreen mode 
just makes the viewport smaller, but doesn't create a window, and 
doesn't destroy the old fullscreen viewport (ie, I still see the last 
update of my scene in fullscreen, with a superimposed smaller viewport 
that continues to update).

-Mike

Robert Osfield wrote:
 On 10/23/07, Robert Osfield [EMAIL PROTECTED] wrote:
   
 On 10/23/07, Jeremy L. Moles [EMAIL PROTECTED] wrote:
 
 On Tue, 2007-10-23 at 16:46 +0100, Robert Osfield wrote:
   
 Hi Jeremy.

 Just checked under Kubuntu (KDE desktop) and the window toggling and
 resizing are working fine.  There have been no big changes w.r.t
 resizing.
 
 To fix this issue for myself I had to make a call to SDL_SetVideoMode
 right before gw-resized() in osgviewerSDL.cpp; yours works w/out this
 call?
   
 I just tested osgviewer, which works fine.  osgviewerSDL works, but
 has a problem with resize - with the viewport wandering half way off
 screen.

 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


[osg-users] seamless perspectives with multiple (rotated/translated) osgViewer slaves

2007-10-19 Thread Mike Wozniewski
Hi All,

I'm struggling to understand how to properly offset a slave in 
osgViewer, and still have the perspectives line up for tiled and 
CAVE-like displays.

For example, I have one OSG window to render the left corner of a 
CAVE. The window has 2 cameras: The left camera has a viewport that 
covers the left half of the window and is rotated -90 degrees. The 
center camera has a viewport that covers the right half of the window 
and is not rotated.

left camera:
viewer.addSlave(camera.get(), pMatrix, 
osg::Matrix::rotate(osg::inDegrees(-90), 0,1,0));

center camera:
viewer.addSlave(camera.get(), pMatrix, osg::Matrix::());

How do I compute the correct pMatrix to ensure that the frustums line up 
in a seamless fashion (ie, objects do not disappear or become duplicated)?

Note that through trial and error, I have found a pMatrix that works:
pMatrix = osg::Matrixd::scale( viewportWidthRatio * traits-width / 
3150, 1, 1 );

But I don't understand why I have to scale by 3150? It seems that it's 
related to the size of the viewport... so in my case my full window 
width is 2048, so I have: 0.5 * 2048 / 3150 = 0.325. Why this value?

Also, in case it's important, the master camera is attached to a 
NodeTrackerManipulator that I define like this:
nodeTracker = new osgGA::NodeTrackerManipulator();
nodeTracker-setTrackerMode( 
osgGA::NodeTrackerManipulator::NODE_CENTER_AND_ROTATION );
nodeTracker-setRotationMode( 
osgGA::NodeTrackerManipulator::ELEVATION_AZIM );
nodeTracker-setHomePosition(osg::Vec3d(0,0,0), osg::Vec3d(0,1,0), 
osg::Vec3d(0,0,1));

The other question I have: what if the left view is not rotated, but 
planar to the center? ie, the eye looks directly forward through the 
center camera, and the left camera shows a translated and thus distorted 
view? What is the proper way to set my pMatrix for that? Obviously it's 
not just a scaling operation and requires skewing.

Any insight would be greatly appreciated!

Thanks in advance,
-Mike Wozniewski
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] camera config file?

2007-10-03 Thread Mike Wozniewski
Hi all,

I can't seem to find any documentation about the configuration files 
that can be used with osgViewer to manage cameras.

I have various CAVE-like configurations that I need to switch between, 
and think that the config files are the way to go.

Does anyone have an example?

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