[osg-users] How to build osgdotnet wrapper for OpenSceneGraph-3.0.0
Hi List, I am trying to build osgdotnet warpper for OpenSceneGraph-3.0.0. I have read the document provided here and i have compiled generator .sln aslo. http://www.openscenegraph.org/projects/osgDotNet/wiki/GettingStartedWithTheWrappersGenerator But i have read in archive mail that we need to modify osgdotnet wrapper to work for OpenSceneGraph-3.0.0. Is it correct? If some body already done this for OpenSceneGraph-3.0.0 or any new version . Plaese guide me or even any link will be welcome Thank you! Cheers, parmar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41718#41718 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to pass materail color of 3ds through shader using OpenGL ES 2.0
it got resolved . Code is perfect just we need to initialize uniform properly -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31530#31530 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to pass materail color of 3ds through shader using OpenGL ES 2.0
Hi List, Thanks for all the support.Now I am able to build Osg with opengl ES 2.0 without Qt and can run the sample programs. I am able to load the .3ds file but I am unable to render the correct material on the screen. Following is the source code I m using: Code: #include #include #include #include #include #include #include #include //#include #include using namespace osg; osg::Uniform* _ClrUniform; static const char* vertSource = { "// colors a fragment based on its position\n" "uniform vec3 color; \n" "varying mediump vec4 Finalcolor;\n" "void main(void) {\n" "Finalcolor = color;\n" "gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" "}\n" }; static const char* fragSource = { //SHADER_COMPAT "varying mediump vec4 Finalcolor;\n" "void main(void) {\n" "gl_FragColor = Finalcolor;\n" "}\n" }; int main( int, char ** ) { osgViewer::Viewer viewer; osg::setNotifyLevel(osg::INFO); ref_ptr m_root = new Group; osg::Geode* geode = (osg::Geode* )osgDB::readNodeFile( "info_icon.3ds" ); 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); _ClrUniform = new osg::Uniform("color",osg::Vec3(1.0,0.0,0.0));//Initializing the uniform osg::StateSet *stateSet = geode->getOrCreateStateSet(); stateSet->addUniform(_ClrUniform); stateSet->setMode(GL_BLEND, osg::StateAttribute::ON); m_root->addChild(geode); viewer.setUpViewInWindow( 32, 32, 1024, 600 ); viewer.setSceneData(m_root.get()); return viewer.run(); } I have looked at material.cpp and tried to set the Uniform for material.But somehow its not updating in the application.It is taking black color by default. I think that, they have not handled the material property for ES 2.0 in material.cpp I have tried modifying the code in material.cpp in void Material::apply(State&) const function. The modified code is as follows: Code: osg::Uniform* _myClrUniform; _myClrUniform->set( osg::Vec3(_diffuseFront.x(), _diffuseFront.y(), _diffuseFront.z()) ); How can I set the material property of every object through application for .3DS file? Any help will be appreciated. Regards, Parmar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31529#31529 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to build OSG 2.9.8 for Emulator on linux
Hi List, Thanks for all the support.Now I am able to build Osg with opengl ES 2.0 without Qt and can run the sample programs. I am able to load the .3ds file but I am unable to render the correct material on the screen. Following is the source code I m using: Code: #include #include #include #include #include #include #include #include //#include #include using namespace osg; osg::Uniform* _ClrUniform; static const char* vertSource = { "// colors a fragment based on its position\n" "uniform vec3 color; \n" "varying mediump vec4 Finalcolor;\n" "void main(void) {\n" "Finalcolor = color;\n" "gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" "}\n" }; static const char* fragSource = { //SHADER_COMPAT "varying mediump vec4 Finalcolor;\n" "void main(void) {\n" "gl_FragColor = Finalcolor;\n" "}\n" }; int main( int, char ** ) { osgViewer::Viewer viewer; osg::setNotifyLevel(osg::INFO); ref_ptr m_root = new Group; osg::Geode* geode = (osg::Geode* )osgDB::readNodeFile( "info_icon.3ds" ); 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); _ClrUniform = new osg::Uniform("color",osg::Vec3(1.0,0.0,0.0));//Initializing the uniform osg::StateSet *stateSet = geode->getOrCreateStateSet(); stateSet->addUniform(_ClrUniform); stateSet->setMode(GL_BLEND, osg::StateAttribute::ON); m_root->addChild(geode); viewer.setUpViewInWindow( 32, 32, 1024, 600 ); viewer.setSceneData(m_root.get()); return viewer.run(); } I have looked at material.cpp and tried to set the Uniform for material.But somehow its not updating in the application.It is taking black color by default. I think that, they have not handled the material property for ES 2.0 in material.cpp I have tried modifying the code in material.cpp in void Material::apply(State&) const function. The modified code is as follows: osg::Uniform* _myClrUniform; _myClrUniform->set( osg::Vec3(_diffuseFront.x(), _diffuseFront.y(), _diffuseFront.z()) ); [/code] How can I set the material property of every object through application for .3DS file? Any help will be appreciated. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31514#31514 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] How to use COLLADA DOM parser on Ubuntu?
Hi Robert, Thanks for your quick reply . I will read the docs for that. Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31298#31298 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] How to use COLLADA DOM parser on Ubuntu?
Hi, I am trying to use COLLADA DOM parser on Ubuntu using Opengl ES 2.0. So could someone help me on how to proceed with the same. We have a small sample application and a sample .dae collada file.So we want to load the sample collada file in our application using collada dom parser on Ubuntu.So what steps need to be followed on that. Thank you! Cheers, Parmar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31292#31292 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to build OSG 2.9.8 for Emulator on linux
Hi List, Please give me some pointer on this issue. Thank you. Cheers, Parmar. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31137#31137 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG using OpenGL ES 2.0 on IPhone
Hi rti, How you have compiled and build for es 2.0 . Please explain to me i also want to build for es 2.0 using emulator. ... Thank you! Cheers, parmar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=3#3 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to build OSG 2.9.8 for Emulator on linux
Hi Robert, Thanks for your reply. I have seen CMakeLists.txt ,here we have to change according to the link you have given to me , Code: OPTION(OSG_GL2_AVAILABLE "Set to OFF to disable use of OpenGL 2.x functions library." ON) or some where else. I am not getting it. PLease guide me how to run es 2.0 example using OSG. If you provide any link or sample it will be great. PLease help me out. Thank you! Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31104#31104 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to build OSG 2.9.8 for Emulator on linux
Hi Roberts, I am really sorry for that. i would like to build OSG for OpenGL ES 2.0 but i dont have es 2.0 hardware. So i wanted to use es 2.0 emulator version of build .Before sending to forum i have searched on google but i didnt get it any info . i have read this link also. [url] http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES [/url] but i am not getting how to do this. I have just started using OSG . So Please help me out. ... Thank you! Cheers, parmar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31096#31096 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to build OSG 2.9.8 for Emulator on linux
Hi List, I have built osg 2.9.8 on linux but i m not getting how to build as a emulator on linux. Thank you! Cheers, Parmar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31094#31094 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can we used OSG for ES 2.0 project on linux??
Hi bouffa, Now its compiling .Thanks a lot. Regards, RK> -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31065#31065 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can we used OSG for ES 2.0 project on linux??
Hi Robert, I have compiled osg 2.9.8 on linux system . I am getting this error. /OpenSceneGraph-2.9.8/src/osgQt/__/__/include/osgQt/moc_QGraphicsViewAdapter.cxx:11:2: error: #error "The header file 'QGraphicsViewAdapter' doesn't include ." I have gone through your reply in one of the thread. That we have to do touch . but even if i am doing touch and providing this its not working. /OpenSceneGraph-2.9.8/OpenSceneGraph-2.9.8$ touch incldue/osgQt/QGraphicsViewAdapter Please help me out First i am doing simple build not doing for ES 2.0 Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31045#31045 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can we used OSG for ES 2.0 project on linux??
Hi Robert, This link i got it . [url] http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES [\url] i will try to compile according to this given link.Please provide me some sample if its available. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31043#31043 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can we used OSG for ES 2.0 project on linux??
Hi Robert, Thanks for your reply .Can you please give me some link where i can det documentation for compiling OSG with OPenGL ES 2.0 using emulator and any ES 2.0 sample will be reall good for me. Regards, RK. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31040#31040 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Can we used OSG for ES 2.0 project on linux??
Hi list, Can we used OSG for our ES 2.0 project on linux project . I am asking because its still in beta duild no stable build. Guys please help me out on this. Thank you! Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31007#31007 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Opengl ES 2.0 support
@Robert :Thanks for your quick reply. I have just read this on OSG site . But still this is beta release. I will download and will try to run Opengl sample. Thank you! Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30826#30826 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Opengl ES 2.0 support
Hi, I have heard that OSG is coming with ES 2.0 support. PLease guys confirm status of ES 2.0 support. Thank you! Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30821#30821 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] NewBie Question Rotation question
Hi, i am trying to do animation about own axis of object itself but i am not getting correctly. Code: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { if (nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR) { osg::MatrixTransform* MT = dynamic_cast(node); if (MT) { osg::Vec3 result(0,1,0); osg::Matrix Rot; Rot.makeRotate(1,result); MT->setMatrix(Rot*MT->getMatrix()); } } ///traverse(node,nv); } ] Please help me i am just learning OSG Thank you! Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29882#29882 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Collada plugin Problem
Even i followed this link also.You have also mentioned in this link we should provide good doc.if i am matching your name correctly. http://forum.openscenegraph.org/viewtopic.php?t=3366 Any way how new user know that third party lib is also required for building plugin. Regards, parmar. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29397#29397 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Collada plugin Problem
LInk is http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/Collada but not enough to do collada plugin. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29369#29369 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Collada plugin Problem
Hi Skylark , Thanks for your reply. I was not aware of third party lib also required .Now i have added to cmake and its coming fine.We should provide some good doc on collada plugin for OSG.I got only this link but its outdated. I am not able to give link so sorry. For beginner it is really difficult so we should provide some doc on collada plugin. Regards, RK. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29368#29368 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Collada plugin Problem
Hi List, I have followed this link to load collada plugin in OSG, i am getting this error in cmake ui tool. Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR). i just genearated the solution file despite of this error ,i got dae plugin into osg plugin but getting crash in this API viewer.setSceneData( osgDB::readNodeFile("dummy.dae") not getting the DAE extension. Please help me on this issue. I am attaching cmake file path also. ... Thank you! Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29359#29359 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org