Re: [osg-users] Camera Default Light
Hi Robert, Thanks alot, yes what you said is 100% correct :) thanks for your time Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49989#49989 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Camera Default Light
Hi, How can I change or set the camera default light ? Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49970#49970 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Is Section Plane Supported for iOS ( IPhone / IPad )
Hi, I'm trying to use Section Plane on iOS but it does not work, is it enabled for ios ? if it is supported I would like to know how to use it for ios !! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49716#49716 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] change GraphicsWindowIOS
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] Transparent background for iOS and Android !!!
Hello All, I face an issues in making the background color transparent for the 3d area ( view port ), I have saw many posts here related to the subject but nothing work really and not exactly what I want. what am looking for is, making the 3d area background transparent and sure this for iOS and Android ports, am not talking about the Desktop ports. If anyone help, I will be thankful ! Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49259#49259 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture not shown correctly
Hi, me too :"( if you know how to fix it tell me Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37404#37404 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Textures for Iphone not work at all :S..?? Need Help
Hi, I tried to make textures work on iphone for many times and different ways, but no one of them worked.. !! please can anyone give me a small example to how make it work. i really need help :( Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37403#37403 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Need Help ! How to get Camera Position inside shaders
Heey Guys, I hope you will fine, anyway, i have question about how i can get the camera position inside shader from open scene graph do i must pass it, or open scene graph already do that. Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35600#35600 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Really Need Help !! Multi view on IPhone/IPad
Hi guys, I'm software Engineer, and we are working to port our product to IPhone and IPad.. and i'm stuck on how to make multi view viewer on Iphone/Ipad can anyone help me.. another question : what does osg::DisplaySettings do and why when i to change in settings of this class nothing change :S.. do anyone have any idea ... Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35442#35442 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Really Need Help :'( !! About Static Linking With Plugins
Hi Alll, I'm bulding open scene graph on ipad, and i want ti know how to static linking with obj plugin because iphone/ipad not allow dynmaic lnking. please guys i need help. :) ... Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35210#35210 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Question To OpenSceneGraph Development Team.
Hey, First Thing I Would To Thank You For Your Great Job In OSG Library, Anyway, I Notices That ShaderGen.h Does Not Support OpenGLES 2.0 For Now, Is It Possible To Know It Will Be Supported. Btw, Merry Christmas guys :) ... Thank you! Cheers, Laith[/list] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35121#35121 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Need Help ! Open Scene Graph For IPhone Shaders Issues
Heey, Thanks all for trying to help me, i solved the problem. and i succesfully run the following code Code: #import "iphoneViewerAppDelegate.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define kAccelerometerFrequency30.0 // Hz #define kFilteringFactor0.1 #define SHADER_COMPAT \ "#ifndef GL_ES\n" \ "#if (__VERSION__ <= 110)\n" \ "#define lowp\n" \ "#define mediump\n" \ "#define highp\n" \ "#endif\n" \ "#endif\n" static const char* vertSource = { SHADER_COMPAT "// colors a fragment based on its position\n" "varying mediump vec4 color;\n" "void main(void) {\n" "color = gl_Vertex;\n" "gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" "}\n" }; static const char* fragSource = { SHADER_COMPAT "varying mediump vec4 color;\n" "void main(void) {\n" "gl_FragColor = clamp( color, 0.0, 1.0 );\n" "}\n" }; @implementation iphoneViewerAppDelegate @synthesize _window; // //Called once app has finished launching, create the viewer then realize. Can't call viewer->run as will //block the final inialization of the windowing system // - (void)applicationDidFinishLaunching:(UIApplication *)application { //get the screen size CGRect lFrame = [[UIScreen mainScreen] bounds]; unsigned int w = lFrame.size.width; unsigned int h = lFrame.size.height; // create the main window at screen size self._window = [[UIWindow alloc] initWithFrame: lFrame]; //show window [_window makeKeyAndVisible]; //create our graphics context directly so we can pass our own window osg::ref_ptr traits = new osg::GraphicsContext::Traits; // Init the Windata Variable that holds the handle for the Window to display OSG in. osg::ref_ptr windata = new osgViewer::GraphicsWindowIOS::WindowData(_window); // 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->red = 33; traits->blue = 66; traits->green = 99; traits->windowDecoration = true;//false; traits->doubleBuffer = true; traits->sharedContext = 0; traits->setInheritedWindowPixelFormat = true; traits->windowName = "osgViewer"; traits->inheritedWindowData = windata; // Create the Graphics Context osg::ref_ptr graphicsContext = osg::GraphicsContext::createGraphicsContext(traits.get()); graphicsContext->clear(); //create the viewer viewer = new osgViewer::Viewer(); //if the context was created then attach to our viewer if(graphicsContext) { viewer->getCamera()->setGraphicsContext(graphicsContext); double w = traits->width; double h = traits->height; if(wgetCamera()->setViewport(new osg::Viewport(0, 0, w , h )); // viewer->getCamera()->setProjectionMatrixAsFrustum(-5,5,-5,5,1e-6,100); // viewer->getCamera()->setProjectionMatrixAsPerspective(30,traits->width/traits->height); } osg::setNotifyLevel(osg::INFO); root = new osg::MatrixTransform(); osg::Geode* geode = new osg::Geode(); osg::ShapeDrawable* drawable = new osg::ShapeDrawable(new osg::Box(osg::Vec3(1, 1, 1), 1)); geode->addDrawable(drawable); osg::Program* program = new osg::Program; program->setName("shader"); program->addShader(new osg::Shader(osg::Shader::VERTEX, vertSource)); program->addShader(new osg::Shader(osg::Shader::FRAGMENT, fragSource)); geode->getOrCreateStateSet()->setAttributeAndModes(program, osg::StateAttribute::ON); root->addChild(geode); //viewer = new osgViewer::Viewer(); //viewer->setUpViewInWindow(100, 100, 800, 600, 0); viewer->setSceneData(root.get()); viewer->setCameraManipulator(new osgGA::TrackballManipulator); viewer->realize(); /* //if the context was created then attach to our viewer if(graphicsContext) { viewer->getCamera()->setGraphicsContext(graphicsContext); //viewer->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width, traits->height)); } osg::setNotifyLevel(osg::DEBUG_FP); root = new osg::MatrixTransform(); osg::Geode* geode = new osg::Geode(); osg::ShapeDrawable* drawable = new osg::ShapeDrawable( new osg::Box(osg::Vec3(0,1,1),1)); drawable->setColor(osg::Vec4(1.0f,0.0f,1.0f,0.5f)); drawable->getOrCreateStateSet(); geode->a
Re: [osg-users] OSG Animation Tutorial
Hey SadikMan , I think u need to take alook at this Application (www.simlabsoft.com) download the SimLab Animation it is very easy and support import and export many many type of formats.. enjoy it :) merry Christmas ... Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35078#35078 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Combined 3D Models :) ?? thanks for reading :)
Hi, i'm not sure if i understand your question. but you can see this application it may help you. www.simlabsoft.com ... Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35076#35076 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Need Help ! Open Scene Graph For IPhone Shaders Issues
Hey Eric, Thanks for replay to me :). actually sorry i use them in the code, but it seem i miss to write them anyway.. here is the code i use currently: Code: //if the context was created then attach to our viewer if(graphicsContext) { viewer->getCamera()->setGraphicsContext(graphicsContext); //viewer->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width, traits->height)); } osg::setNotifyLevel(osg::DEBUG_FP); root = new osg::MatrixTransform(); osg::Geode* geode = new osg::Geode(); osg::ShapeDrawable* drawable = new osg::ShapeDrawable( new osg::Box(osg::Vec3(0,1,1),1)); drawable->setColor(osg::Vec4(1.0f,0.0f,1.0f,0.5f)); drawable->getOrCreateStateSet(); geode->addDrawable(drawable); root->addChild(geode);*/ viewer->setSceneData(root.get()); viewer->setCameraManipulator(new osgGA::TrackballManipulator); viewer->realize(); yes i use realize and setCameraManipulator ... Thank you! Cheers, Laith[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35070#35070 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Need Help ! Open Scene Graph For IPhone Shaders Issues
Hi All, I'm Software Engineer, and here in the company we are trying our product to IPhone/IPad. anyway. after near to 1 month of search , modifying and fixing i didnt find any answer to my problems Problems In Open Scene Graph. Here Is the Problem. im trying to run the following code : its very simple project that "should" show box on the screen , but the problem it is not showing else the background.. and search i found that there is a shader compiling errors in open scene graph :S. i fix it. and still nothing appear else the background... note i wrote a test that just change the background color to see if the problem is from opengles linking or something like.. and its work correctly.. guys i really need help.. do anyone have any idea about what is going on. Code: #import "iphoneViewerAppDelegate.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define kAccelerometerFrequency30.0 // Hz #define kFilteringFactor0.1 @implementation iphoneViewerAppDelegate @synthesize _window; // //Called once app has finished launching, create the viewer then realize. Can't call viewer->run as will //block the final inialization of the windowing system // - (void)applicationDidFinishLaunching:(UIApplication *)application { //get the screen size CGRect lFrame = [[UIScreen mainScreen] bounds]; unsigned int w = lFrame.size.width; unsigned int h = lFrame.size.height; // create the main window at screen size self._window = [[UIWindow alloc] initWithFrame: lFrame]; //show window [_window makeKeyAndVisible]; //create our graphics context directly so we can pass our own window osg::ref_ptr traits = new osg::GraphicsContext::Traits; // Init the Windata Variable that holds the handle for the Window to display OSG in. osg::ref_ptr windata = new osgViewer::GraphicsWindowIOS::WindowData(_window); // 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->red = 33; traits->blue = 66; traits->green = 99; traits->windowDecoration = false; traits->doubleBuffer = true; traits->sharedContext = 0; traits->setInheritedWindowPixelFormat = true; traits->windowName = "osgViewer"; traits->inheritedWindowData = windata; // Create the Graphics Context osg::ref_ptr graphicsContext = osg::GraphicsContext::createGraphicsContext(traits.get()); graphicsContext->clear(); //create the viewer viewer = new osgViewer::Viewer(); //if the context was created then attach to our viewer if(graphicsContext) { viewer->getCamera()->setGraphicsContext(graphicsContext); viewer->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width, traits->height)); } osg::setNotifyLevel(osg::DEBUG_FP); root = new osg::MatrixTransform(); osg::Geode* geode = new osg::Geode(); osg::ShapeDrawable* drawable = new osg::ShapeDrawable( new osg::Box(osg::Vec3(0,1,1),1)); drawable->setColor(osg::Vec4(1.0f,0.0f,1.0f,0.5f)); drawable->getOrCreateStateSet(); geode->addDrawable(drawable); root->addChild(geode); viewer->setSceneData(root.get()); [NSTimer scheduledTimerWithTimeInterval:1.0/5.0 target:self selector:@selector(updateScene) userInfo:nil repeats:YES]; //Configure and start accelerometer [[UIAccelerometer sharedAccelerometer] setUpdateInterval:(0.1)]; [[UIAccelerometer sharedAccelerometer] setDelegate:self]; } // //Timer called function to update our scene and render the viewer // - (void)updateScene { viewer->frame(); } - (void)applicationWillResignActive:(UIApplication *)application { } - (void)applicationDidBecomeActive:(UIApplication *)application { } -(void)applicationWillTerminate:(UIApplication *)application{ root = NULL; viewer = NULL; } // //Accelorometer // - (void)accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration { //Use a basic low-pass filter to only keep the gravity in the accelerometer values accel[0] = acceleration.x * kFilteringFactor + accel[0] * (1.0 - kFilteringFactor); accel[1] = acceleration.y * kFilteringFactor + accel[1] * (1.0 - kFilteringFactor); accel[2] = acceleration.z * kFilteringFactor + accel[2] * (1.0 - kFilteringFactor); } - (void)dealloc { root = NULL; viewer = NULL; [super dealloc]; } @end ... Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35067#35067 ___ osg-users mailing list osg-u
[osg-users] Change Background color on IPhone
Hi Guys, Do anyone know how to change background color in OSG for IPhone... its not work to use viewer.setClearColor ... Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34916#34916 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG configuration on IPhone
Hi Guys, Hope you are fine i have one question.. what is the best configuration for building and linking and running osg on iphone.. note : i success in building and linking but in running i get crash when i try to run the OsgViewer for iphone application Thank you! Cheers, Laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34835#34835 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OsgViewer For IPhone Crash At Run-Time...
Hi Guys, Hope Everyone is fine.. I'm a software enginer at simlab-soft, and we trying to port minimal version of our product on Windows And Mac OS.. But i have a seroius problem.. the problem is as following.. i success in building and linked all tools needed, and examples when i run the OsgViewer For IPhone it crash at run-time.. after i traced the crash.. i found its happen when a call to _glVertiexAttrib4f function happen. and here is the call stack for the crash Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 ??? 00 0 + 0 1 osgViewerIPhoned0x000ca8d5 osg::GLBeginEndAdapter::End() + 961 (GLBeginEndAdapter.cpp:257) 2 osgViewerIPhoned0x00156569 DrawShapeVisitor::apply(osg::Box const&) + 3059 (ShapeDrawable.cpp:574) 3 osgViewerIPhoned0x0014adc7 osg::Box::accept(osg::ConstShapeVisitor&) const + 31 (Shape:210) 4 osgViewerIPhoned0x0014e38f osg::ShapeDrawable::drawImplementation(osg::RenderInfo&) const + 161 (ShapeDrawable.cpp:1975) 5 osgViewerIPhoned0x00268b3b osg::Drawable::draw(osg::RenderInfo&) const + 97 (Drawable:917) 6 osgViewerIPhoned0x002e63dd osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*) + 473 (RenderLeaf.cpp:84) 7 osgViewerIPhoned0x002dbcc1 osgUtil::RenderBin::drawImplementation(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 563 (RenderBin.cpp:480) 8 osgViewerIPhoned0x002e7559 osgUtil::RenderStage::drawImplementation(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 941 (RenderStage.cpp:1366) 9 osgViewerIPhoned0x002db51b osgUtil::RenderBin::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 107 (RenderBin.cpp:425) 10 osgViewerIPhoned0x002e7e6c osgUtil::RenderStage::drawInner(osg::RenderInfo&, osgUtil::RenderLeaf*&, bool&) + 292 (RenderStage.cpp:935) 11 osgViewerIPhoned0x002eb0ac osgUtil::RenderStage::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 1060 (RenderStage.cpp:1207) 12 osgViewerIPhoned0x002f46a2 osgUtil::SceneView::draw() + 6560 (SceneView.cpp:1443) 13 osgViewerIPhoned0x00350946 osgViewer::Renderer::cull_draw() + 3598 (Renderer.cpp:827) 14 osgViewerIPhoned0x0034ed75 osgViewer::Renderer::operator()(osg::GraphicsContext*) + 35 (Renderer.cpp:928) 15 osgViewerIPhoned0x000d869f osg::GraphicsContext::runOperations() + 235 (GraphicsContext.cpp:748) 16 osgViewerIPhoned0x003861a4 osgViewer::ViewerBase::renderingTraversals() + 8194 (ViewerBase.cpp:797) 17 osgViewerIPhoned0x00383feb osgViewer::ViewerBase::frame(double) + 195 (ViewerBase.cpp:644) 18 osgViewerIPhoned0x00037eab -[iphoneViewerAppDelegate updateScene] + 53 (iphoneViewerAppDelegate.mm:164) 19 Foundation 0x01500ffd __NSFireTimer + 125 20 CoreFoundation 0x039f27dc CFRunLoopRunSpecific + 3884 21 CoreFoundation 0x039f18a8 CFRunLoopRunInMode + 88 22 GraphicsServices0x044ab89d GSEventRunModal + 217 23 GraphicsServices0x044ab962 GSEventRun + 115 24 UIKit 0x017a7372 UIApplicationMain + 1134 25 osgViewerIPhoned0x0003948a main + 68 (main.m:15) 26 osgViewerIPhoned0x00037d2e start + 54 Do anyone have any idea how to solve this.. i spend alot of time to solve it but without results.. please i need help Thank you! Cheers, laith -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34825#34825 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org