Re: [osg-users] debug build of plugins and wrappers on linux
Hi Manu, This is normal. I don't know the reason but this is the correct behaviors. Perhaps another could explain this choice. HTH David Callu 2008/2/12, Emmanuel Roche [EMAIL PROTECTED]: Hi everyone, I tryed a debug built of OSG 2.2.0 on linux (gcc4 + cmake) everything is already, no compilation issues, but still I end up with main libraries correctly named (ie with the final d standing for debug) whereas the plugins and wrappers don't have that final d... Is it normal ? if yes, well, why ? and if not, what did I miss in the configuration ? regards, Manu. ___ 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] Complete darkness
2008/2/29, David Callu [EMAIL PROTECTED]: Hi Necdet Can Have you try to use an osg::LightModel with ambient == black in your scene ? In OpenGL, lighting is controlled by glLight and glLightModel. HTH David Callu 2008/2/29, Necdet Can Atesman [EMAIL PROTECTED]: Hi folks, I am unable to create complete darkness in osg. I'm setting the only light source to not emit anything, but the objects in my scene are still visible, although very faintly. Is there something wrong with the code, or is it just osg/opengl? osg::Light* light = new osg::Light(); light-setAmbient(osg::Vec4d(0.0f, 0.0f, 0.0f, 1.0f)); light-setDiffuse(osg::Vec4d(0.0f, 0.0f, 0.0f, 1.0f)); light-setSpecular(osg::Vec4d(0.0f, 0.0f, 0.0f, 1.0f)); osgView* view = new osg::View(); osgView-setLightingMode(osg::View::HEADLIGHT); view-setLight(light); Thanks, Necdet Can ___ 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_users] Contractor search Client
Hi all I have created my company named CGDS (Computer Graphics Development Service) in September 2007. Since this date, I work for Robert Osfield on OpenSceneGraph and VirtualPlaneteBuilder. Like a mentor, Robert help me to launch my professional activity and advise me in several task that he give me. Among other things, I update Delta3D from OSG 1.2 to OSG 2.x (main task is change Producer to osgViewer), integrated in OSG existing code to create 3D text, improve shapefile loader in OSG, ... The time has come for me to found client without Robert's help. So, like is write in the subject of this mail, I look for contractor job. I am based on Paris, France. I am available now. You can contact me here : callu.david 'at' gmail 'dot' com Cheers David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ANN: OSG training in Paris
Hi Paul Sorry no, I just have a little apartment. Others ? David Callu 2008/3/7, Paul Martz [EMAIL PROTECTED]: I'll look into using our classroom facility in the evening, but it would be good to consider alternative locations. Are there any OSG users in Paris who would be able to investigate possible locations for the evening session? Paul Martz *Skew Matrix Software LLC* http://www.skew-matrix.com 303 859 9466 -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Paul Martz *Sent:* Monday, March 03, 2008 11:50 AM *To:* 'OpenSceneGraph Users' *Subject:* Re: [osg-users] ANN: OSG training in Paris We should _definitely_ plan an OSG Users Group meeting! I'll post here as plans progress. -Paul -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Serge Lages *Sent:* Monday, March 03, 2008 10:28 AM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] ANN: OSG training in Paris Good news to have some OSG users meeting at Paris ! Besides of the training, is there anything planned to go have a drink ? :) On Mon, Mar 3, 2008 at 5:52 PM, Paul Martz [EMAIL PROTECTED] wrote: Hi all -- I'm pleased to announce that registration is now open for our next public OSG training course, to be held in Paris, France, April 25-30, 2008. To register online, please visit: http://www.skew-matrix.com/trainingparis.html The full press release/announcement follows. Paul Martz *Skew Matrix Software LLC* http://www.skew-matrix.com 303 859 9466 *OpenSceneGraph Training, Paris* *Ann Arbor, Michigan, and Louisville, Colorado, March 3, 2008* Bob Kuehne of Blue Newt Software and Paul Martz of Skew Matrix Software are pleased to announce that registration is now open for three OpenSceneGraph (OSG) training courses in Paris, France, April 25-30, 2008. These three courses will provide developers with a complete OSG education. This event marks the public premiere of Introduction to OpenSceneGraph, a 1-day quick-start course for developers new to OSG and scene graph technology. Two additional courses, Intermediate OpenSceneGraph and Terrain Databases in OpenSceneGraph, are again offered, but for the first time in Europe. The courses are scheduled sequentially so that attendees may attend all three courses, if desired. Bob Kuehne and Paul Martz co-instruct all courses and labs. Instruction and materials are provided in English. *Schedule (April 25-30, 2008)* ·April 25 Introduction to OpenSceneGraph ·April 28-29 Intermediate OpenSceneGraph ·April 30 Terrain Databases in OpenSceneGraph Courses meet from 9:00 am to 4:30 pm each day. Lunch and wireless internet access is provided for all attendees. *Location* All courses are held in Paris, France, 72 rue du Faubourg St. Honoré, Regus Office Suite. This is in the 8th and a few blocks away from numerous Métro stations. http://tinyurl.com/ynur7f *Registration* To register for the courses and view additional information, please visit: http://www.skew-matrix.com/trainingparis.html *About the Companies* Blue Newt Software LLC exists to help customers solve their toughest graphics problems. Blue Newt has assisted numerous clients achieve more realism, performance, and insight with their 3D graphics applications. Blue Newt was founded in 2003 to focus modern software development techniques, languages, and toolkits on improving 3D graphics applications. Skew Matrix Software LLC provides 3D graphics services such as software development, developer training, and technical writing and editing. Skew Matrix Software specializes in 3D graphics software development using OpenGL and OpenSceneGraph. For more information about Blue Newt Software LLC: http://www.blue-newt.com For more information about Skew Matrix Software LLC: http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg-users Digest, Vol 9, Issue 71
Hi Robert, Hi Scott, 2008/3/27, Robert Osfield [EMAIL PROTECTED]: Hi Scott, The best person to answer these questions will be David Callu as he implemented the shapefile support in VPB. I'll wait to see if David replies as he'll be able to provide better answers. I'd have to dig into the code to refresh myself to answer them, which.. well isn't much different from you doing it. Robert. On Thu, Mar 27, 2008 at 12:49 PM, Hulet, Scott S [EMAIL PROTECTED] wrote: Robert, Sorry for the overwhelming post! Let's start out with these inter-related options. I'd like to understand how to integrate feature data into the DB via osgdem. It appears that the following options are involved. Are there others? Can you explain how these work? Thanks! When shapefile (.shp) is loaded by osgdb_shp plugin , if the corresponding datafile (.dbf) is in the same directory, it is loaded too and used to populate osgSim::ShapeAttribute class. In the datafile .dbf, there are zero or many attributes by shape define in the shapefile. Each attribut have a name and a value. osg::Geometry create by osgdb_shp contain an osgSim::ShapeAttributeList in UserData variable. This list contain zero or many osgSim::ShapeAttribute. This attribute are used by VPB : --building filename Specify building outlines using (How does this work; extrusion? Any controls?) shape define in filename are extruded to create a volume (building) there are any other control on this process shapefiles. --forest filename Specify forest outlines using (How does this work; extrusion? Any controls?) each vertices in shape define in filename are extrude to create a simple line (tree) same process as the --building option, so no control shapefiles --height Set the height to use for asscociated (Both buildings and/or forests?) overload the height value used to extrude building or forest shapefiles. --height-attribute Set the attribute name for height (Both buildings and/or forests?) attributes used in shapefile/dbase files. set the name of the osgSim::ShapeAttribute which contain the height value used to extrude the building or forest shapefile there are any other shapefile option During the osg DataBase creation process, in vpb::DestinationTile::createScene() method, each shapefile model are transformed and placed in the scene by a vpb::ShapeFilePlacer. This vpb::ObjectPlacer based class extrude and adjust position and elevation of the model to match the terrain elevation. this is the place to add shapefile feature. Then modify vpb::CommandLine to insert your own command line option. HTH David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Testing of OSG and VPB SVN in prep for nex dev releases and 2.4 stable release
Hi Robert, OSG and VPB build fine on Fedora 8, gcc 4.2 Cheers David Callu 2008/3/28, Robert Osfield [EMAIL PROTECTED]: Hi All, There has been a number of changes and new introduction this week so I'd very much appreciate another round of build and run tests across various platforms. if all goes well I'll make a OSG-2.3.7 and VPB-0.9.8 dev releases on Monday. Feature wise OSG is now ready for 2.4, so its just build and run testing now. If things looks really good OSG wise then perhaps we could even think about tagging 2.4 in the second half of next week. If not next week then we'll need to wait till mid April as I have on-site training booked in for the 2nd week of April. It'd be kinda nice to have 2.4 done and dusted before I go, but not great sweat if it doesn't happen. VPB-1.0 won't be till the end of April though as I still have a couple more items to complete first, OSG-2.4 also needs to be out first as VPB-1.0 won't compile with OSG-2.2. Thanks in advance for you efforts, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Testing of OSG and VPB SVN in prep for nex devreleases and 2.4 stable release
Hi all I have the same problem (directory already exist ...) but I have many copy of OSG SVN. I have tested your solution Robert, and svn cleanup is required after all command. I have try an svn rm include/OpenThreads to keep subversion more aware of the action but this not solved the problem. BTW, the svn:externals property on my trunk directory is still here. It is just an empty property. I have removed it (svn pd svn:externals in OpenSceneGraph directory), and do ''svn update to check if it come back, but nothing. I think end user have to remove it manually. So for end users : cd OpenSceneGraph rm include/OpenThreads rm src/OpenThreads svn update svn cleanup svn propdel svn:externals Cheers David Callu 2008/4/1, Robert Osfield [EMAIL PROTECTED]: Hi Paul, On Tue, Apr 1, 2008 at 12:22 PM, Paul Melis [EMAIL PROTECTED] wrote: Just curious: did you remove the svn:externals and add the OpenThreads files _in the same svn revision_? I would expect that a revision in which the svn:externals is removed followed by a revision in which the files are added to work correctly without needing the above manual stuff. The order of changes to my local OpenSceneGraph was: Removed old svn:external entries Manually removed the include/OpenThreads and src/OpenThreads directories svn copy from osg/OpenThreads/include/OpenThreads to osg/OpenSceneGraph/include/OpenThreads svn copy from osg/OpenThreads/src/OpenThreads to osg/OpenSceneGraph/src/OpenThreads svn commit So both the change the svn:externals properties and the addition of the include/src as local copies all happen in the same checkin and therefore revision. Usually svn is great at handling directory changes etc, but it looks like removal of svn:externals directories is a weak point. When making my own local changes I removed the svn:external entries but SVN didn't remove the directories associated with them so perhaps it's not too surprising that it's done the same thing for end users too. So for end users I guess the best plan of action is: cd OpenSceneGraph rm include/OpenThreads rm src/OpenThreads svn update Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Testing of OSG and VPB SVN in prep for nex devreleases and 2.4 stable release
Hi Paul, Oupps Well see, thanks So for end users : cd OpenSceneGraph rm include/OpenThreads rm src/OpenThreads svn update svn cleanup 2008/4/1, Paul Melis [EMAIL PROTECTED]: David Callu wrote: BTW, the svn:externals property on my trunk directory is still here. It is just an empty property. I have removed it (svn pd svn:externals in OpenSceneGraph directory), and do ''svn update to check if it come back, but nothing. I think end user have to remove it manually. Well, I wouldn't expect the externals property to come back in this case, as it is just like making a local modification to a file. If you then do an svn update you wouldn't expect the file to be reverted to its previous state. You need to revert in order to get the property back: 14:26|[EMAIL PROTECTED]:~ cd c/osg-svn/ 14:26|[EMAIL PROTECTED]:~/c/osg-svn svn proplist . Properties on '.': svn:externals 14:27|[EMAIL PROTECTED]:~/c/osg-svn svn pd svn:externals . property 'svn:externals' deleted from '.'. 14:27|[EMAIL PROTECTED]:~/c/osg-svn svn up At revision 8022. 14:27|[EMAIL PROTECTED]:~/c/osg-svn svn proplist . 14:27|[EMAIL PROTECTED]:~/c/osg-svn svn revert . Reverted '.' 14:27|[EMAIL PROTECTED]:~/c/osg-svn svn proplist . Properties on '.': svn:externals Robert can do a delete on the property on his side and everybody will get it on the next update. Paul So for end users : cd OpenSceneGraph rm include/OpenThreads rm src/OpenThreads svn update svn cleanup svn propdel svn:externals Cheers David Callu 2008/4/1, Robert Osfield [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi Paul, On Tue, Apr 1, 2008 at 12:22 PM, Paul Melis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Just curious: did you remove the svn:externals and add the OpenThreads files _in the same svn revision_? I would expect that a revision in which the svn:externals is removed followed by a revision in which the files are added to work correctly without needing the above manual stuff. The order of changes to my local OpenSceneGraph was: Removed old svn:external entries Manually removed the include/OpenThreads and src/OpenThreads directories svn copy from osg/OpenThreads/include/OpenThreads to osg/OpenSceneGraph/include/OpenThreads svn copy from osg/OpenThreads/src/OpenThreads to osg/OpenSceneGraph/src/OpenThreads svn commit So both the change the svn:externals properties and the addition of the include/src as local copies all happen in the same checkin and therefore revision. Usually svn is great at handling directory changes etc, but it looks like removal of svn:externals directories is a weak point. When making my own local changes I removed the svn:external entries but SVN didn't remove the directories associated with them so perhaps it's not too surprising that it's done the same thing for end users too. So for end users I guess the best plan of action is: cd OpenSceneGraph rm include/OpenThreads rm src/OpenThreads svn update 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 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] osg user meeting in Paris
Hi Cedric, Yes it is, I'm like you (I not follow the course and I live at Paris), and I will come. See you soon. David Callu 2008/4/1, Cedric Pinson [EMAIL PROTECTED]: Hi everyone, Is it open to people who does not follow the course ? I live in Paris and i would like to meet osg users too, to have a drink or restaurant. It would be nice to have a meeting. Cedric Art Tevs wrote: Hi Serge, ok, thats sounds nice. I couldn't live without tasting the french beer ;-)) I think if Paul is ok with that location, we should start some counting of users (and their companions) who want to attend the user-meeting. cheers, Art --- Serge Lages [EMAIL PROTECTED] schrieb: Hi Art, Don't worry, after the work meeting, we can off course go to a pub or anywhere to drink some beers. :) They are plenty of them next to our offices. We are really at the center of Paris and it should be easy to find a nice place. So we can first meet at the office to start talking and showing our work (from 6pm to 8pm for example), and then go to a pub or a restaurant to continue talking in a better atmosphere. On Tue, Apr 1, 2008 at 10:35 AM, Art Tevs [EMAIL PROTECTED] wrote: Hmm,.. I should also say anything in french now, but I cann't ;-)... I would suggest to have a user-meeting in some cafe or restaurant, or maybe bowling-bar or anything else where we could spend also the free time not only on showing our work each other, but also making more fun-like stuff, I think. In this way we could also create more social like contacts, I suppose ;-) Serge, do you know such a place. Or maybe just type in under google.fr something like location events paris meetings (of course in french) or something similar to find such a place. Cheers, Art --- Serge Lages [EMAIL PROTECTED] schrieb: Bonjour à tous, As I've said early but without giving any news, It should be possible to make it at our offices in Paris. We are located here http://maps.google.fr/maps?f=qhl=frgeocode=q=5+rue+d%27uz%C3%A8s+parissll=47.15984,2.988281sspn=13.09218,33.09082ie=UTF8ll=48.871998,2.34498spn=0.012364,0.032315z=15iwloc=addr . We have a big assembly hall available, and we should be able to bring some food and drinks. :) But it depends on the number of people we are, I think that if we are less than 20 it's possible, more than that we should look for another place. On Mon, Mar 31, 2008 at 6:29 PM, Paul Martz [EMAIL PROTECTED] wrote: Bonjour, Art -- Oui, the OSG training is definitely on and will take place as scheduled. Regarding the users group meeting, I definitely want to have one. Ideally, it should be in a quiet and informal setting, so that we could have maybe some food and drinks while we discuss OSG and perhaps display our work using laptops. Monday 28 April, 6pm-9pm would be a good time. I admit I haven't had any time to research a location. I again call on any Paris locals to investigate possible locations. If there is something suitable, but it requires payment, then email me offline - perhaps I can cover the cost, if it isn't too much. Cordialement, Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Art Tevs Sent: Monday, March 31, 2008 9:00 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] osg user meeting in Paris Hi folks, as far as we all already know there will be a training course in Paris from 25 to 30 April. However there were still no information if and where an official user meeting afterwards will take place. Hence couple of questions: 1. Will there be an official osg-user-meeting? 2. Which date and time? 3. Which location? Paul, maybe you can clarify this ;-) Best regards, Art Lesen Sie Ihre E-Mails jetzt einfach von unterwegs. www.yahoo.de/go ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Lesen Sie Ihre E-Mails auf dem Handy. www.yahoo.de
Re: [osg-users] Paris OSG Users Group directions
Thanks Paul, see you soon. David 2008/4/28 Paul Martz [EMAIL PROTECTED]: To all who will attend the Paris OSG Users Group tonight... This message from Serge tells you how to get there, and how to get in the door once you're there. See you tonight! -Paul -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Serge Lages *Sent:* Wednesday, April 02, 2008 9:22 AM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OSG user meeting in Paris - Monday 28 April Hi all, About the place, here is the address : Tharsis Software - Paris Innovation 5 Rue d'Uzès 75002 Paris FRANCE The google map herehttp://maps.google.fr/maps?f=qhl=frgeocode=q=5,+Rue+d%27Uz%C3%A8s,+75002+2%C3%A8me+Arrondissement,+Parissll=47.15984,2.988281sspn=13.09218,33.09082ie=UTF8ll=48.871998,2.34498spn=0.012364,0.032315z=15iwloc=addror : http://maps.google.fr/maps?f=qhl=frgeocode=q=5,+Rue+d'Uz%C3%A8s,+75002+2%C3%A8me+Arrondissement,+Parissll=47.15984,2.988281sspn=13.09218,33.09082ie=UTF8ll=48.871998,2.34498spn=0.012364,0.032315z=15iwloc=addrhttp://maps.google.fr/maps?f=qhl=frgeocode=q=5,+Rue+d%27Uz%C3%A8s,+75002+2%C3%A8me+Arrondissement,+Parissll=47.15984,2.988281sspn=13.09218,33.09082ie=UTF8ll=48.871998,2.34498spn=0.012364,0.032315z=15iwloc=addr It's next to the subway Grands Boulevards, or Bourse. When you'll be in front of the door, you'll have to press the button P on the digicode (is it the same word in English ?) to enter. Then in front of you, you'll have a new door with another digicode, here you'll have to push the button Accueil and the door will open. And finally, you'll just have to get up the stairs in front of you. Don't worry, it's easier than it seems... :) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Viewer remove event handler
Hi michele, seem good, send it to Robert on osg-submissions mailing list. Cheers David 2008/4/28 Michele Bosi [EMAIL PROTECTED]: In case anyone is interested here's my implementation of the removeEventHandler(), it's a simple removal from the std::list used by OSG, don't know if there are other interactions that one should take care of though: void removeEventHandler(osgGA::GUIEventHandler* eventHandler) { osgViewer::View::EventHandlers::iterator it = std::find(_eventHandlers.begin(), _eventHandlers.end(), eventHandler); if ( it != _eventHandlers.end() ) _eventHandlers.erase( it ); } On Mon, Apr 28, 2008 at 2:08 PM, David Callu [EMAIL PROTECTED] wrote: Hi Michele Other correct me if i am wrong, but I don't found any method to remove EventHandler from an osgViewer::View. Fell free to implement one :-). HTH David Callu 2008/4/28 Michele Bosi [EMAIL PROTECTED]: Hello, I need to remove an event handler added to a Viewer using addEventHandler (osgGA::GUIEventHandler *eventHandler) I expected to find something like remove/delete/eraseEventHandler but couldn't find anything, how can I remove then an event handler? Thanks, Michele ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problems with a new geometry
Hi Vincent, 2008/4/30 Vincent Bourdier [EMAIL PROTECTED]: Hi all, Trying for hours to create a new geode, I'am having a bug I can't fix Doing _root-addChild(createSun(config-Sunpath)); the program crashes This is the code of createSun osg::Geode* createSun(std::string texturePath) { int nb_edge = 30; float radius = SUN_RADIUS/UNIT_METER/SUN_DIVIDER; osg::Vec3 center = osg::Vec3(SUN_CENTER); center.normalize(); center *= SUN_DISTANCE/UNIT_METER/SUN_DIVIDER; osg::ref_ptrosg::Billboard billboard = new osg::Billboard(); problem is here, you create a pointer in a osg::ref_ptr, it will be unref and deleted when you exit of the current scope (osg::Geode* createSun(std::string texturePath) scope) so you return a deleted pointer, and ARggg crach osg::Geometry* geometry = new osg::Geometry(); osg::Vec3Array* vertices = new osg::Vec3Array(); osg::Vec3Array* normals = new osg::Vec3Array(); osg::Vec4Array* colors = new osg::Vec4Array(); //1st point is the center of the triangle fan vertices-push_back(osg::Vec3(0,0,0)); for(int i=1; inb_edge; ++i) { vertices-push_back(osg::Vec3(radius * cos(osg::DegreesToRadians(i/(float)(nb_edge/360.0f))), radius * sin(osg::DegreesToRadians(i/(float)(nb_edge/360.0f))), .0f )); } geometry-setVertexArray(vertices); normals-push_back(osg::Vec3(0,0,1)); geometry-setNormalArray(normals); geometry-setNormalBinding(osg::Geometry::BIND_OVERALL); colors-push_back(osg::Vec4(1,1,0,1)); geometry-setColorArray(colors); geometry-setColorBinding(osg::Geometry::BIND_OVERALL); osg::DrawElementsUShort* primitive = new osg::DrawElementsUShort(osg::PrimitiveSet::TRIANGLE_FAN); primitive-push_back(0); for(int i=1; inb_edge; ++i) primitive-push_back(i); geometry-addPrimitiveSet(primitive); billboard-addDrawable(geometry,center); billboard-setMode(osg::Billboard::POINT_ROT_EYE); center.normalize(); billboard-setNormal(-center); return billboard.get(); } On crash it return the error: Exception non gérée à 0x10028b41 (osg25-osgd.dll) dans 3DEM.exe : 0xC005: Violation d'accès lors de la lecture de l'emplacement 0xfeeefeee Do you see any mistake ? Thanks a lot Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Cheer David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgfx::bumpmapping example ?
Hi Vincent, Take a look to osgfxbrowser, there are an example of bump mapping use. In fact, all is in osgfx::BumpMapping::setUpDemo() HTH David Callu 2008/5/2 Vincent Bourdier [EMAIL PROTECTED]: Hi all, I just want to set a bump mapping effect on a geode, but the only thing I obtain is the geode all colored in black. I didn't found any example of BumpMapping, and I didn't succed setting it on my geode doing : osgFX::BumpMapping* bump = new osgFX::BumpMapping(); bump-addChild(geodeMoon); bump-setLightNumber(0); bump-setDiffuseTextureUnit(0); bump-setNormalMapTextureUnit(1); bump-prepareChildren(); In my exemple, the texture1 and texture0 are the same, but I just want to test if I have a result How do you use it ? Thanks. Regards, Vincent ___ 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] MultiThreads in OSG
Hi Renan 2008/5/6 Renan Mendes [EMAIL PROTECTED]: Hi, everyone. I've tried creating another thread in my application using the windows API (CreateThread, etc), but it seems that this thread has become a main thread, here it's probably misuse of multithreading. i.e, my program is not working as a multithreaded application. In my case, this means that I'm not even displaying the OSG default screen - all I have is the prompt display, printing some information I wanted. Does OSG have support for multithreading? yes it is, but only to render the scene. When you have multi camera or multi graphics context, you can render them in multithreaded operations. HTH David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Set userdata in Plugins
Hi Om 2008/5/6 Mike Weiblen [EMAIL PROTECTED]: You'll probably get the best and most exact answer by looking at the source code for the plugin. Probably the first reflex to have ;-) for a simple thing like .shp plugin. I have implemented this part of shp plugin. The only thing done by the .bdf loader is extracting shape attribut for each shape and store them in ShapeAttribut HTH David Callu -- mew On Mon, May 5, 2008 at 12:02 PM, om [EMAIL PROTECTED] wrote: Thanks for your reponse Paul, but I wanted to know what it does in the .dbf plugin, it would be great if somebody can tell what are the functionalities of .dbf plugin. What I understood is that it reads the dbf file and stores the data as ShapeAttribute, but is that all it does? Thanks Om Paul Martz wrote: It's like a void* in C. user data can be any pointer to a Referenced object. The data can be used any way your application wants. -Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of om Sent: Monday, May 05, 2008 7:44 AM To: OpenSceneGraph Users Subject: [osg-users] Set userdata in Plugins Hi, I am having some problems with the .dbf plugin. Can sombody please tell what setUserData() method (in ESRIShapeReaderWriter.cpp)does? or where the data passed to the method is used? Thanks Om ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.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 -- Mike Weiblen -- Austin Texas USA -- http://mew.cx/ ___ 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] fedora spec files
Hi Eric, Hi Timo, Fedora 8 repository already have OpenSceneGraph package for OSG 2.0. You can take the source package and use its spec file. HTH David Callu 2008/5/15 Eric Sokolowsky [EMAIL PROTECTED]: Timo Penndorf wrote: Hello, i want to create rpm packages of osg for fedora. Are there spec files? I had a spec file for OSG 1.2, but it's woefully out of date. I intend to update it for OSG 2.4 at some point but I have to get my application working with 2.4 first. If you want to start with my spec file it's attached. I did remove glut support and introspection so if you want those pieces you'll have to add them yourself. It's possible that the original author (Ralf Corsepius) has maintained this file more thoroughly than I have. -Eric # # Copyright (c) 2005, 2006 Ralf Corsepius, Ulm, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # %define apivers 1.0 %define osgvers 1.2 %define otvers 1.5 %define prodvers 1.1 Name: OpenSceneGraph Version:%{osgvers} Release:svs11.rh5%{?dist} Summary:High performance real-time graphics toolkit Group: Applications/Multimedia License:OSGPL URL:http://www.openscenegraph.org/ Source0 http://www.openscenegraph.org/Source0: http://www.openscenegraph.org/downloads/snapshots/OSG_OP_OT-%{osgvers}.ziphttp://www.openscenegraph.org/downloads/snapshots/OSG_OP_OT-%%7Bosgvers%7D.zip Patch0: OpenSceneGraph-%{osgvers}.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: flex bison #BuildRequires: libGL-devel #BuildRequires: libGLU-devel #BuildRequires: libXmu-devel #BuildRequires: libX11-devel BuildRequires: Inventor-devel #BuildRequires: freeglut-devel BuildRequires: libjpeg-devel BuildRequires: giflib-devel BuildRequires: libtiff-devel BuildRequires: libpng-devel BuildRequires: doxygen Requires: libstdc++ = 4.0.2 %{?_with_gdal:BuildRequires:gdal-devel} %{?_with_demeter:BuildRequires: demeter-devel} %description The OpenSceneGraph is an OpenSource, cross platform graphics toolkit for the development of high performance graphics applications such as flight simulators, games, virtual reality and scientific visualization. Based around the concept of a SceneGraph, it provides an object oriented framework on top of OpenGL freeing the developer from implementing and optimizing low level graphics calls, and provides many additional utilities for rapid development of graphics applications. %prep %setup -q -n OSG_OP_OT-%{osgvers} %patch0 -p1 # backup, we hack this file later cp OpenSceneGraph/Make/dependencies \ OpenSceneGraph/Make/dependencies.bak # Propagate RPM_OPT_FLAGS for file in OpenSceneGraph/src/osgWrappers/*/GNUmakefile; do sed -i -e '/^OPTF.*$/d' $file done for dir in OpenThreads Producer OpenSceneGraph; do # Add DESTDIR # Remove bogus -lstdc++ # Install examples to %%{_bindir} sed -i \ -e 's,^\(INST_LOCATION[ ]*?=\).*$,\1 $(DESTDIR)%{_prefix},g' \ -e 's,^\(INST_INCLUDE[ ]*=\).*$,\1 $(DESTDIR)%{_includedir},g' \ -e 's,^\(INST_SHARE[ ]*=\).*$,\1 $(DESTDIR)%{_datadir},g' \ -e 's,^\(INST_LIBS[ ]*=\).*$,\1 $(DESTDIR)%{_libdir},g' \ -e 's,^\(INST_EXAMPLES[ ]*=\).*$,\1 $(DESTDIR)%{_bindir},g' \ -e 's,\(^[ \t]*LIBS[ ]*=.*\) -lstdc++,\1,g' \ -e 's, -lXi,,g' \ -e 's,^\([ ]*LDFLAGS.*soname.*$\),# \1,g' \ $dir/Make/makedefs # Propagate RPM_OPT_FLAGS echo OPTF = $RPM_OPT_FLAGS $dir/Make/makedefs # Fix quoting bug sed -i \ -e 's, DOF=$(OPTF) , DOF=$(OPTF) ,g' \ $dir/Make/makerules # Fix broken shell fragments sed -i \ -e 's,do\\,do \\,g' \ -e 's,else\\,else \\,g' \ -e 's,fi\\,fi;\\,g' \ -e 's,done\\,done;\\,g' \ -e 's,then\\,then \\,g' \ $dir/Make/*rules find $dir -name GNUmakefile -exec grep -l '^[ ]*LIB[ ]*=' {} \; | \ xargs sed -i \ -e 's,\(^include.*makedefs\)[ ]*$,\1\ninclude \$(TOPDIR)/Make/libdefs,' # Fix libdir sed -i \ -e 's,^prefix=.*$,prefix = %{_prefix},' \ -e 's,^includedir=.*$,includedir = %{_includedir},' \ -e 's,^libdir=.*$,libdir = %{_libdir},' \ -e 's,^Version:.*$,Version: %{apivers},' \ -e '/^Conflicts:$/d' \ $dir/Make/$(echo $dir | tr [:upper:] [:lower:]).pc done %build rm -rf $RPM_BUILD_ROOT %ifarch x86_64 export LD_LIBRARY_PATH=$PWD/Producer/lib/Linux64:$PWD/OpenThreads/lib/Linux64 %else export LD_LIBRARY_PATH=$PWD/Producer/lib/Linux32:$PWD/OpenThreads/lib/Linux32 %endif # configure echo # Fedora custom settings OpenSceneGraph/Make/dependencies echo COMPILE_EXAMPLES = yes OpenSceneGraph/Make/dependencies #echo COMPILE_INTROSPECTION = yes OpenSceneGraph/Make/dependencies echo INVENTOR_INSTALLED = yes OpenSceneGraph/Make/dependencies #echo GLUT_INSTALLED = yes OpenSceneGraph/Make/dependencies %{?_with_gdal:echo
Re: [osg-users] (no subject)
Hi Pecoraro thank to spot the bug please send your submissions on osg-submissions the next time. after review the original code, at line Optimizer.cpp:1561 lod-getNumRanges() is used to know how many iteration will be done in the for loop, and getNumRanges have to be equal to getNumChild, so lod-getChild(i) at line 1563 is not the problem. Perhaps you LOD is not synchronised (num of children and num of range are not equal)i don't know why or how is possible. Anyway, in a case of a PagedLOD, only the code of LOD is used, so not special case for a PagedLOD. correct me if i'm wrong. Cheers David Callu 2008/6/6 Pecoraro, Alexander N [EMAIL PROTECTED]: I think there is a bug in the osgUtil::Optimizer::CombineLODVisitor - at line 1530 of Optimizer.cpp it does a dynamic_cast on and osg::Node* to osg::LOD* and then at line 1563 it calls getChild(i) (even if getNumChildren() == 0) on the dynamically casted LOD node. This works fine when the node is an LOD node, but when it is a PagedLOD node then it causes in invalid access to the _children vector. I attached a screen shot to show what I mean. This situation would only ocurr when a PagedLOD node was a sibling of an LOD node, which is probably why it hasn't been spotted before. Not sure if this is the accepted way to submit a fix, but anyway I made a fix to the Optimizer code (version 2.4) and attached it to the email. Alex ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shader Problem
hi CG when you remove a shader, osg::Program need to be relinked. this is done by osgUtil::GLObjectVisitor in osgViewer::Renderer::draw method. So this seem can be done at runtime. Which OSG version did you use ? Did you use osgViewer ? David Callu 2008/6/12 CG [EMAIL PROTECTED]: Hi all, Are there any ways to remove the shader during runtime? I've tried the removeShader function but the effect of the shader is still applied to my models (e.g tank) i.e. the appearance of the models do not go back to the state before shader is applied. Regards, Cg -- Chat online and in real-time with friends and family! Windows Live Messenger http://get.live.com/messenger/overview ___ 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] BlueMarble example
Hi Michael osgDB::ImageOptions class is in the SVN trunk. I can't found osgbluemarble in the SVN trunk so no idea what is wrong. perhaps an include issue... can you send an exact error message. David Callu 2008/6/12 Michael W. Hall [EMAIL PROTECTED]: I was using some code from the osgbluemarble.cpp example. I am getting an error stating that ImageOptions is not a member of osgDB. I have been looking in the documentation on the website and have not found anything. Can someone tell me what has replaced this or where it is now? Thanks. ___ 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] Shader Problem
Hi CG When your remove a shader, void Program::dirtyProgram() is called to request a relink in the next frame. Program is relinked in the next frame in void Program::apply( osg::State state ) const method. Follow your code in a debugger to see if all is properly done. Are you sure your shader is well removed from your program ? HTH David Callu 2008/6/12 CG [EMAIL PROTECTED]: Hi David, I'm using osg 2.4 and osgViewer. Regards, Cg -- Date: Thu, 12 Jun 2008 11:09:49 +0200 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Shader Problem hi CG when you remove a shader, osg::Program need to be relinked. this is done by osgUtil::GLObjectVisitor in osgViewer::Renderer::draw method. So this seem can be done at runtime. Which OSG version did you use ? Did you use osgViewer ? David Callu 2008/6/12 CG [EMAIL PROTECTED]: Hi all, Are there any ways to remove the shader during runtime? I've tried the removeShader function but the effect of the shader is still applied to my models (e.g tank) i.e. the appearance of the models do not go back to the state before shader is applied. Regards, Cg -- Chat online and in real-time with friends and family! Windows Live Messenger http://get.live.com/messenger/overview ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Always-on security tools provide safer ways to connect and share anywhere. Find out more. Windows Live http://get.live.com/familysafety/overview ___ 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] Problem compiling OSG from 10 seconds ago
Hi Mario Same thing for me. Seem Robert have forgetten to commit include/osgDB/DatabasePager. just do this your trunk directory then all build fine. # svn up -r8433 HTH David Callu 2008/6/12 Mario Valle [EMAIL PROTECTED]: On Linux Scanning dependencies of target osgDB [ 0%] Building CXX object src/osgDB/CMakeFiles/osgDB.dir/DatabasePager.o /local/OSG/OpenSceneGraph/src/osgDB/DatabasePager.cpp:243: error: 'class osgDB::DatabasePager::ReadQueue' has not been declared /local/OSG/OpenSceneGraph/src/osgDB/DatabasePager.cpp:243: error: ISO C++ forbids declaration of 'ReadQueue' with no type /local/OSG/OpenSceneGraph/src/osgDB/DatabasePager.cpp: In function 'int ReadQueue(osgDB::DatabasePager*, const std::string)': /local/OSG/OpenSceneGraph/src/osgDB/DatabasePager.cpp:243: error: only constructors take base initializers /local/OSG/OpenSceneGraph/src/osgDB/DatabasePager.cpp:247: error: '_block' was not declared in this scope etc. etc. -- Ing. Mario Valle Data Analysis and Visualization Services | http://www.cscs.ch/~mvalle http://www.cscs.ch/%7Emvalle Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60 v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82 ___ 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] [Not OSG related question] Virtual memory management on Windows
power linux Serge ;-). Regards David Callu 2008/6/25 Serge Lages [EMAIL PROTECTED]: Hi all, I have a question not related to OSG but I can't find any answer, and this is something that some of you probably knows. That's why I try here to find some help. Here is my problem : I have a big image database with some images larger than 1.5Go uncompressed, and I fail to load them (Win XP SP2 32bits with Visual Studio 8). My computer has 3Go of virtual memory and the option /3GB is activated on the system. In this document (page 13) : http://actes.sstic.org/SSTIC05/Vulnerabilites_et_gestion_des_limites_memoire/SSTIC05-article-Delalleau-Vulnerabilites_et_gestion_des_limites_memoire.pdf It says it's not possible to allocate more than 1.3Go in one call, and it's actually the limit where it crashs. If I do 2 allocations of 1Go each, it works, but 1 allocation of 1.4Go crashs... Has someone any idea if it's possible to change this limit ? My only hope will be to make smaller images, or even to develop under Linux ? :) Thanks in advance ! -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test svn/trunk in prep for 2.7.7 dev release
Hi Robert, Hi all OSG 2.7.7 already tagged but always good to know build report. Fedora 8 GCC 4.1.2 OSG - SVN 9345 - except DCMTK, FOX, INVENTOR, ITK, OPENVRML, Performer release and debug build fine exemples run fine too. Cheers David Callu 2008/12/12 Robert Osfield robert.osfi...@gmail.com Hi Cedric, On Fri, Dec 12, 2008 at 6:31 PM, Cedric Pinson morni...@plopbyte.net wrote: did you merge osgWidget branch with ? No I haven't merged in recent changes from the osgWidget branch. I'm inclined to get 2.7.7 out the door, then merge osgWidget. My plan is to start making dev release more regularly now we are closing in on 2.8. Because if yes we need to sync data, i updated osgAnimation, examples, bvh plugin, and data. I created a data repository here http://hg.plopbyte.net/osg-data that is sync with our branch. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with 2D and 3D text in the same scene
Hi Frank, This is a bug. I take a look. more in next episode. Cheer David Callu 2009/2/18 frankmil...@jhmi.edu Greetings, I am experiencing problems rendering osgText::Text and osgText::Text3D in the same scene. I have boiled it down to a nice bite-size chunk of code which I have attached. I am running version 2.8. Is this a bug? Frank ___ 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] Problem with 2D and 3D text in the same scene
Hi Frank Problem: osgText::Text and osgText::Text3D use the same font file. The first really load the file and obtain an osgText::Font object, the second use the cache created during the first load of the font file, and so obtain an osgText::Font object instead of osgText::Font3D object. To obtain an osgText::Font3D object, osgText::Text3D call osgDB::readObjectFile(...) with an option to specify the plugin we want an osgText::Font3D instead of osgText::Font. Generalised Problem: In osgDB::Registry, loaded file cache is referenced by the name of this file, so if I load a file with some options, and the cache already contain object for this filename, I obtain an object potentially not loaded with my options. Behaviours: Cache management is delegate to osgDB::Registry, but cache coherence (load a file with option then reuse it, deactivate the cache when load a specific file or don't cached the loaded file) is user's responsibility. Text3D case: Delegate the cache coherence of font file in osgText to the user is not a good idea. So to fix this I think to 2 solution: - never use the cache when load a font for a Text3D. Just because to load a Font3D, we use option in osgDB::readObjectFile() - move osgText::Font3D implementation in osgText::Font, suffix ex-Font3D method with 3D in osgText::Font (so osgText::Font3D::getGlyph() become osgText::Font::getGlyph3D() ) And so Text and Text3D use the same osgText::Font object which contain 2D and 3D glyph. Thought, Robert, Other ? David Callu 2009/2/19 David Callu led...@gmail.com Hi Frank, This is a bug. I take a look. more in next episode. Cheer David Callu 2009/2/18 frankmil...@jhmi.edu Greetings, I am experiencing problems rendering osgText::Text and osgText::Text3D in the same scene. I have boiled it down to a nice bite-size chunk of code which I have attached. I am running version 2.8. Is this a bug? Frank ___ 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] Problem with 2D and 3D text in the same scene
Hi Robert I think merging the osgText::Font and Font3D implementations would be the cleanest approach. I think too ... but ... Another, more hacky approach would be to postfix the font file name by .Text3D or something similar and then have the freetype plugin return Font3D when it detects this. This solution is really smart, it not break the scalability of osgText. I don't know which use can be done with a font except 2D or 3D glyph, but this keep the door open to other thing. osgText::Text3D have to ensure that name of font file is ended by .Text3D and font file cache coherence is not delegate to the user. I have try this solution and work fine. I prepare a submission if you prefer the second solution. Or implement the first one otherwise. As you want. David Robert. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] What about User-Meeting in Europe - osgInEurope?
Hi all +1 for Paris ;-) See you soon David Callu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=7869#7869 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenThreads : which config for win32 VC7 ?
Hi Fabien _OPENTHREADS_ATOMIC_USE_MUTEX is the default configuration. It use a mutex to lock osg::Referenced instance for multi threaded access. _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED is only use if compilator support it. When you run cmake to configure the project, a test is done to determine if _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED can be used. It seem that VC7 didn't support it. HTH David Callu 2009/3/4 Fabien Dachicourt d...@spaceyes.fr Hi All, I noticed that on Win32 VC7, (OSG 2.8) Cmake auto shift OpenThread atomic config to _OPENTHREADS_ATOMIC_USE_MUTEX In which case can we use_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED, is it possible on VC7 Win32 ? Is it risky to use the config _OPENTHREADS_ATOMIC_USE_MUTEX ? Thanks in advance, -- Fabien ___ 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] Bug in RenderBin (?)
Hi Paul, Hi Christof What is smells fishy is the use of proto-className() to identify the renderBin prototype to remove in removeRenderBinPrototype(); code void RenderBin::removeRenderBinPrototype(RenderBin* proto) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list proto) { // something wrong there RenderBinPrototypeList::iterator itr = list-find(proto-className()); if (itr != list-end()) list-erase(itr); } } /code proto-className() return always RenderBin because this is the name of the class :). Instead, in void RenderBin::removeRenderBinPrototype(RenderBin* proto) we need something like this code void RenderBin::removeRenderBinPrototype(const std::string binName, RenderBin* proto) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list proto) { RenderBinPrototypeList::iterator itr = list-find(binName); if (itr != list-end()) list-erase(itr); } } /code Thought ? David Callu 2009/3/12 Paul Melis p...@science.uva.nl Christof Krüger wrote: I'm using the current 2.8.0 stable release. I used the 'Browse Source' to check the current trunk version of RenderBin.cpp and I see no change since. The actual crash occurs later in static object destruction when s_renderBinPrototypeList is destructed itself. I don't understand enough of osg to know what's exactly wrong. However, the s_registerDepthSortedBinProxy doesn't release the object it created and this looks very suspicious to me. The fact that two different instances of RenderBin get registered under the same name indeed smells fishy :) Paul ___ 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] Bug in RenderBin (?)
Hi Robert What about the case of register two prototype with the same name. There are any warning message for the user. I fix this like that void RenderBin::addRenderBinPrototype(const std::string binName, RenderBin* proto) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list proto) { RenderBinPrototypeList::iterator itr = list-find(binName); if (itr != list-end()) osg::notify(osg::WARN) Warning: RenderBinPrototype named \ binName \ already registered std::endl; else (*list)[binName] = proto; } } void RenderBin::removeRenderBinPrototype(const std::string binName, RenderBin* proto) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list proto) { RenderBinPrototypeList::iterator itr = list-find(binName); if (itr != list-end()) { if (itr-second != proto) osg::notify(osg::WARN) Warning: Registered RenderBinPrototype named \ binName \ not match the instance proto std::endl; else list-erase(itr); } } } thought ? David 2009/3/12 Robert Osfield robert.osfi...@gmail.com HI David Christof et. al, On Thu, Mar 12, 2009 at 10:13 AM, David Callu led...@gmail.com wrote: What is smells fishy is the use of proto-className() to identify the renderBin prototype to remove in removeRenderBinPrototype(); Well spotted David, the addRenderBinPrototype() correctly uses binName, while the removeRenderBinProtoype() attempts to use the className() as it's binName. The later is definitely a bug, and one that is easy to fix... Instead, in void RenderBin::removeRenderBinPrototype(RenderBin* proto) we need something like this code void RenderBin::removeRenderBinPrototype(const std::string binName, RenderBin* proto) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list proto) { RenderBinPrototypeList::iterator itr = list-find(binName); if (itr != list-end()) list-erase(itr); } } /code Thought ? There is no need to use the binName, one just needs to search for the pointer in the map by hand, and remove it. I'm just tested the following code and it looks to be working properly : void RenderBin::removeRenderBinPrototype(RenderBin* proto) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list proto) { for(RenderBinPrototypeList::iterator itr = list-begin(); itr != list-end(); ++itr) { if (itr-second == proto) { list-erase(itr); return; } } } } I've attached the modified file. Christof could you test this and let me know how you get on. If things look fine I'll check the changes into svn/trunk and OSG-2.8 branch. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple question: How to set the icon that willbe used when a viewer is realized?
Hi Matt Can you put your submissions in osg-submissions mailing list. Take a look to submissions protocolhttp://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocolfor more detail. Cheer David Callu 2009/3/11 Matt McPheeters mmcpheet...@rscusa.com Hi Robert, These source files came from OpenSceneGraph-2.7.4, which I checked out first from subversion. Please find the only three modified files attached. Thanks -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] On Behalf Of Guy Sent: Wednesday, March 11, 2009 2:06 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Simple question: How to set the icon that willbe used when a viewer is realized? Robert, I'm probably stating the obvious, but besides Matt changes I guess icon loading implementation for each of the platforms except windows will be required too. Guy. Hi Matt, Could you post the whole modified files, I can then review then with a view to merging them or something similar. Cheers, Robert. On Tue, Mar 10, 2009 at 6:43 PM, Matt McPheeters mmcpheet...@rscusa.com wrote: Awesome, it worked. The icon I was talking about is the one in the upper left hand corner of the window. But it also appears in the taskbar and the alt-tab popup menu. This is a Windows platform so the solution I came up with is not platform independent, but I believe I implemented it in the same generic way that GraphicsWindow::setWindowName() is done. In GraphicsWindow (header file, line 121): /** Set the icons the window uses */ virtual void setWindowIcons(const std::string /*iconPath*/) { osg::notify(osg::NOTICE)GraphicsWindow::setWindowIcons(..) not implemented.std::endl; } /** Set the name of the window */ virtual void setWindowName(const std::string /*name*/) { osg::notify(osg::NOTICE)GraphicsWindow::setWindowName(..) not implemented.std::endl; } In GraphicsWindowWin32 (header file, line 85): /** Set the icons for the window */ virtual void setWindowIcons(const std::string /*iconPath*/); /** Set the name of the window */ virtual void setWindowName(const std::string /*name*/); (and on line 151, the member variables): HWND_hwnd; HDC _hdc; HGLRC _hglrc; HCURSOR _currentCursor; HICON _currentIcon; In GraphicsWindowWin32.cpp (source file, line 959, the constructor): GraphicsWindowWin32::GraphicsWindowWin32( osg::GraphicsContext::Traits* traits ) : _hwnd(0), _hdc(0), _hglrc(0), _currentCursor(0), _currentIcon(0), (and on line 1006, the destructor): GraphicsWindowWin32::~GraphicsWindowWin32() { if (_currentIcon != NULL) { DestroyIcon(_currentIcon); } close(); destroyWindow(); } (and on line 1878, the Windows implementation of the new function): void GraphicsWindowWin32::setWindowIcons( const std::string iconPath ) { HINSTANCE hinst = ::GetModuleHandle(NULL); _currentIcon = ExtractIcon(hinst, iconPath.c_str(), 0 ); if (_currentIcon != NULL) { SendMessage(_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)_currentIcon ); SendMessage(_hwnd, WM_SETICON, ICON_BIG, (LPARAM)_currentIcon ); } } void GraphicsWindowWin32::setWindowName( const std::string name ) { _traits-windowName = name; SetWindowText(_hwnd, name.c_str()); } Here is the code from my ::osgViewer application. Names have been changed to protect the innocent (haha): viewer.realize(); osgViewer::Viewer::Windows windows; viewer.getWindows( windows ); std::string windowName; windowName.assign( fooViewer ); windows[0]-setWindowName( windowName ); windows[0]-setWindowIcons( barney.ico ); All that is required is that barney.ico exists in the same directory that the executable is run from and contains a valid icon. However, I verified that this code works even if the iconPath parameter contains full path information. I did a test: windows[0]-( C:\\WINDOWS\\nvidia icons\\Portal_32x32.ico ); And it worked like a charm. If the file doesn't exist or exists but doesn't actually contain a valid icon, the viewer doesn't crash. You just get the same default icon from before. Thanks for the great hints, -Matt -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Guy Sent: Monday, March 09, 2009 11:24 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Simple question: How to set the icon that will beused when a viewer is realized? Hi, I guess it depends on your platform. I haven't seen generic implementation for it but I guess it could be added to display settings or something like that (maybe
Re: [osg-users] Qt4.5 problem
Hi Martin With the last version of Virtual Box 2.1, you can enable 3D acceleration. HTH for your test with -graphicssytem opengl. Cheer David 2009/3/12 Martin Beckett osgfo...@tevs.eu Installed Qt4.5/Osg2.8.0 on Ubuntu in a VM and tested on that. with --QOSGWidget the osgviewerQT runs but doesn't redraw at all, there is no mouse movement. With adaptor widget the model displays correctly. It doesn't seem possible to run -graphicssytem opengl in a VM (at least in Virtualbox) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8371#8371 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Building from CMAKE on Windows - missing PNG_PNG_INCLUDE_DIR
Hi Andrew Just check the 'Show Advanced Values' check box on the top right of cmake window. HTH David 2009/3/12 Andrew osgfo...@tevs.eu I am building the 2.8.0 Windows VS 2005 projects using CMAKE 2.6 and I get these (expected) messages in the CMAKE GUI log Window Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) Unfortunately, the PNG_PNG_INCLUDE_DIR or PNG_LIBRARY are missing in the list of settable CMAKE variables - unlike the others. I noticed this in 2.6.1 as well. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8387#8387 ___ 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] Bug in RenderBin (?)
Hi Christof Robert prefer search the RenderBin instance that you want to remove instead of search the name of a render bin. like this : void RenderBin::removeRenderBinPrototype(RenderBin* proto) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list proto) { for(RenderBinPrototypeList::iterator itr = list-begin(); itr != list-end(); ++itr) { if (itr-second.get() == proto) { list-erase(itr); return; } } } } Can you test this solution ? David 2009/3/13 Christof Krüger osgfo...@tevs.eu Changing the removeRenderBinPrototype to use the binName instead of the classname fixes the crash. For this, you need to also add a member string variable to the Proxy object in order to remember the binName. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8445#8445 ___ 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 trunk crash when use osgdb_osgparticle plugin
Hi all osgviewer crash when i try to load any data which require osgdb_osgparticle, in release and debug mode - osgviewer cessnafire.osg - osgviewer spaceship.osg - osgviewer fountain.osg - osgviewer osgcool.osg - osgviewer SmoxeBox.osg - osgblendequation (it use cessnafire.osg) Crash occure when osgdb_osgparticle is loaded and used. If i do # osgviewer my_osg_path/osgdb_osgparticle.so cow.osg all work fine. I use the last OSG SVN version Linux Fedora 10 GCC 4.3.2 glibc 2.9 backtrace : *** glibc detected *** osgviewer: corrupted double-linked list: 0x09d89930 *** === Backtrace: = /lib/libc.so.6[0xa84e1f] /lib/libc.so.6[0xa8692d] /lib/libc.so.6(__libc_calloc+0xef)[0xa8848f] /lib/libc.so.6[0xa43ae1] /lib/libc.so.6(__cxa_atexit+0x20)[0xa43bc0] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/osgPlugins-2.9.1/osgdb_osgparticle.so[0x7c03db] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/osgPlugins-2.9.1/osgdb_osgparticle.so[0x7c8dfd] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/osgPlugins-2.9.1/osgdb_osgparticle.so(_init+0x2c)[0x7af940] /lib/ld-linux.so.2[0x4521ed] /lib/ld-linux.so.2[0x4568d2] /lib/ld-linux.so.2[0x451db6] /lib/ld-linux.so.2[0x455f5e] /lib/libdl.so.2[0x43897c] /lib/ld-linux.so.2[0x451db6] /lib/libdl.so.2[0x43805c] /lib/libdl.so.2(dlopen+0x4f)[0x4389ff] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/libosgDB.so.56(_ZN5osgDB14DynamicLibrary16getLibraryHandleERKSs+0xef)[0x8ce1af] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/libosgDB.so.56(_ZN5osgDB14DynamicLibrary11loadLibraryERKSs+0x52)[0x8ceed2] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/libosgDB.so.56(_ZN5osgDB8Registry11loadLibraryERKSs+0x8f)[0x8f6b3f] ... ... ... This bug seem to be really tricky so if anyone could test this commande line # osgviewer cessnafire.osg and report the result and the OSG version / platform, this could be a nice help for track this bug. Or if anyone have a solution, i am be happy to know it ;-) David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG trunk crash when use osgdb_osgparticle plugin
Hi J-S Thanks for report I will try some old SVN version and test again. Cheer David 2009/3/13 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi David, This bug seem to be really tricky so if anyone could test this commande line # osgviewer cessnafire.osg and report the result and the OSG version / platform, this could be a nice help for track this bug. Using OSG SVN (as of midnight Eastern time), Windows Vista 32-bit, cessnafire.osg runs ok. I wonder if Robert's fix for the possible divide by zero has something to do with this? I don't know when that was checked in, but perhaps my OSG was compiled before it went in. Then again, perhaps it has nothing to do with your crash. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.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] OSG trunk crash when use osgdb_osgparticle plugin
Hi Robert 2009/3/13 Robert Osfield robert.osfi...@gmail.com Hi David, Just tried various .osg files with particles systems and they all work fine with svn/trunk + 2.9.1. My guess is that you have an out of sync set of libs/plugins, try a clean build and make sure that you don't have older but the same so version number libs hanging around. I do a complet rebuild and the problem is always there. I try some old version of OSG, and the problem is different but still there ... g This seem to be a glibc/std-c++/gcc/other-thing issue. So I search .. Thanks for your report. We can close this thread David Robert. On Fri, Mar 13, 2009 at 2:22 PM, David Callu led...@gmail.com wrote: Hi all osgviewer crash when i try to load any data which require osgdb_osgparticle, in release and debug mode - osgviewer cessnafire.osg - osgviewer spaceship.osg - osgviewer fountain.osg - osgviewer osgcool.osg - osgviewer SmoxeBox.osg - osgblendequation (it use cessnafire.osg) Crash occure when osgdb_osgparticle is loaded and used. If i do # osgviewer my_osg_path/osgdb_osgparticle.so cow.osg all work fine. I use the last OSG SVN version Linux Fedora 10 GCC 4.3.2 glibc 2.9 backtrace : *** glibc detected *** osgviewer: corrupted double-linked list: 0x09d89930 *** === Backtrace: = /lib/libc.so.6[0xa84e1f] /lib/libc.so.6[0xa8692d] /lib/libc.so.6(__libc_calloc+0xef)[0xa8848f] /lib/libc.so.6[0xa43ae1] /lib/libc.so.6(__cxa_atexit+0x20)[0xa43bc0] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/osgPlugins-2.9.1/osgdb_osgparticle.so[0x7c03db] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/osgPlugins-2.9.1/osgdb_osgparticle.so[0x7c8dfd] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/osgPlugins-2.9.1/osgdb_osgparticle.so(_init+0x2c)[0x7af940] /lib/ld-linux.so.2[0x4521ed] /lib/ld-linux.so.2[0x4568d2] /lib/ld-linux.so.2[0x451db6] /lib/ld-linux.so.2[0x455f5e] /lib/libdl.so.2[0x43897c] /lib/ld-linux.so.2[0x451db6] /lib/libdl.so.2[0x43805c] /lib/libdl.so.2(dlopen+0x4f)[0x4389ff] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/libosgDB.so.56(_ZN5osgDB14DynamicLibrary16getLibraryHandleERKSs+0xef)[0x8ce1af] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/libosgDB.so.56(_ZN5osgDB14DynamicLibrary11loadLibraryERKSs+0x52)[0x8ceed2] /home/ledocc/graphisme/osg/SVN/OpenSceneGraph/release/lib/libosgDB.so.56(_ZN5osgDB8Registry11loadLibraryERKSs+0x8f)[0x8f6b3f] ... ... ... This bug seem to be really tricky so if anyone could test this commande line # osgviewer cessnafire.osg and report the result and the OSG version / platform, this could be a nice help for track this bug. Or if anyone have a solution, i am be happy to know it ;-) David ___ 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] Bug in RenderBin (?)
Hi Christof, Hi Robert Christof talk about the thread Bug in RenerBin (?) in date of 13 march 2009 - herehttp://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/41482 for the last message herehttp://article.gmane.org/gmane.comp.graphics.openscenegraph.user/41604 Robert, Your code seem to work fine. Cheer David 2009/3/23 Christof Krüger o...@christof-krueger.de I'm afraid your new email has started a new thread... so one will have to do manual searches to know exactly what you might be on about... could you give us some more clues I did merge some changes to the destruction of RenderBin's, is this the code? Sorry abut this, I'm using the forum and have no clue what went wrong. What I meant was the code posted by ledocc (David Callu) on Marth, 13th in the Bug in RenderBin (?) thread. He asked me to test the code and it worked fine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9008#9008 ___ 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] osgText - size is half of font resolution
Hi Sherman, I download the FontForge http://fontforge.sourceforge.net/ editor on sourceforge. When I examine a Glyph of arial.ttf font with a size of 12 : - A, there are 9 line for the glyph and 3 blank line under. - a, there are 2 blank line on the top, 7 line for the glyph and 3 blank line under. - q, there are 2 blank line on the top, 10 line for the glyph. My conclusion is when you specify a size for a font, this ensure that all glyph of the font have a height lesser to the specified size. But the place of the glyph is for someone largely over the base line ( for example `), and for other under the base line, _. So all the height is used by the font. Other source: In Qt documentation, for a given Font, height is equal to ascend of this Font (space over the base line) + descend of this Font (space under the base line) + 1 ( for the base line) pixels. try attached example, I take your code and adapt it in a main function. I print text with height equal to the screen height (1024 for me, modify the SCREEN_SIZE in file osgtext_sherman2 : l.11 if you need). When the text is display in fullscreen, you are sure that all text have a height less or equal to the screen height, many time the glyph height is half of the screen height, but for some glyph ( for example the | or $ glyph) the height is 3/4 of the screen height. HTH David Callu 2008/8/22 sherman wilcox [EMAIL PROTECTED] Can someone explain why the code below consistently produces text that is half the height specified? If I render this text, take a screenshot and measure the height of the text ABC in a paint program it will measure up as approximately 64 pixels tall for a character size / resolution of 128. I change the 128 to 256, the text will then measures 128 and so on. Always measures half of what I specify. Should this not render text that is approximately 128 pixels in height? I understand that the characters won't be exactly the width/height I specify, but half? Is this a bug or what? { osg::Vec3d pos(osg::DegreesToRadians(someLat), osg::DegreesToRadians(someLon), 0); ellipsoidModel-convertLatLongHeightToXYZ(pos[0], pos[1], pos[2], pos[0], pos[1], pos[2]); osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform(); mt-setMatrix(osg::Matrix::identity()); mt-setMatrix(osg::Matrix::translate(pos)); osg::ref_ptrosgText::Text text = new osgText::Text; text-setFont(Arial.ttf); osgText::Text::BackdropType type = osgText::Text::OUTLINE; text-setBackdropType(type); text-setColor(osg::Vec4(1,1,1,1)); text-setBackdropColor(osg::Vec4(0,0,0,1)); text-setAlignment(osgText::TextBase::CENTER_CENTER); text-setAutoRotateToScreen(true); text-setText(ABC); text-setCharacterSizeMode( osgText::TextBase::SCREEN_COORDS ); text-setCharacterSize(128); text-setFontResolution(128, 128); osg::ref_ptrosg::Geode geode = new osg::Geode(); geode-addDrawable(text.get()); mt-addChild(geode.get()); mt-getOrCreateStateSet()-setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); root-addChild(mt.get()); } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org #include osg/Geode #include osg/MatrixTransform #include osgText/Text #include osgGA/TrackballManipulator #include osgGA/StateSetManipulator #include osgViewer/Viewer #include osgViewer/ViewerEventHandlers //#include #define SCREEN_SIZE 1024 int main() { osgViewer::Viewer viewer; viewer.setCameraManipulator(new osgGA::TrackballManipulator()); viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()-getOrCreateStateSet()) ); viewer.addEventHandler(new osgViewer::WindowSizeHandler); viewer.addEventHandler(new osgViewer::StatsHandler); osg::ref_ptrosgText::Text text = new osgText::Text; text-setFont(arial.ttf); text-setBackdropType(osgText::Text::OUTLINE); text-setColor(osg::Vec4(1, 1, 1, 1)); text-setBackdropColor(osg::Vec4(0, 0, 0, 1)); text-setAlignment(osgText::TextBase::CENTER_CENTER); text-setAutoRotateToScreen(true); text-setText(!\#$%'()*+,-./123456789:;=[EMAIL PROTECTED]|}~); text-setCharacterSizeMode(osgText::TextBase::SCREEN_COORDS); text-setCharacterSize(SCREEN_SIZE); text-setFontResolution(SCREEN_SIZE, SCREEN_SIZE); osg::ref_ptrosg::Geode geode(new osg::Geode()); geode-addDrawable(text.get()); osg::ref_ptrosg::Group root = new osg::Group(); root-addChild(geode.get()); root-getOrCreateStateSet()-setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); viewer.setSceneData(root.get() ); viewer.setThreadSafeReferenceCounting(true); viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); viewer.realize(); while (viewer.done() == false) { viewer.frame(); } return 0
Re: [osg-users] Example osgtexture1d
oups .. forgotten OSG svn rev 8956 David Callu 2008/9/29 David Callu [EMAIL PROTECTED] Hi Mathieu Same thing for me. Fedora 8, kernel 2.6.26 gcc 4.1.3 driver NVidia 173.14.12 David Callu 2008/9/29 Mathieu MARACHE [EMAIL PROTECTED] Hi, While playing with the example osgtexture1d, I wasn't able to see the changes from object linear to eye linear mode. I've run the example both on linux and windows with latest svn version. I would have expected to see bands of colours linked to the object in OBJECT_LINEAR and eye linked bands of colours in EYE_LINEAR mode. But it seems to me that only the OBJECT_LINEAR mode is working... Could someone please test it and see if the dumptruck changes it's texture every other second to eliminate a possible driver issue ? Thanks in advance -- Mathieu ___ 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] avoid writing some node on osgDB::writeNodeFile
Hi Alexandre You can just copy the Scene Graph structure (osg::Node, osg::Group, ...) and share every other thing (StateSet, Drawable, texture, ...) You can specify which object to share and which to clone with the osg::CopyOp class. HTH David Callu 2008/10/6 amalric alexandre [EMAIL PROTECTED] Hi osg-users, I would have know if it was possible to avoid to write some node in a scene when calling osgDB::writeNodeFile on the current scene. Let's assume I got a group of nodes and I wand to save this group on disk without saving some chosen nodes from the group. But I don't want to modify the group because I need it to stay the same. My first choice was to make a copy from the group, modifying the copy keeping the original and writing the copy. But I think it's a bad choice because I got very big nodes (300Mo and more) and making a copy use more memory. If someone has a great idea, please let me know Thank you, -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ 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] Please buil test OpenSceneGraph SVN
Hi All build on Linux , GCC 4.1.2, in 32 min with icecreamhttp://en.opensuse.org/Icecreamdistributed C/C++ compiler and 4 dual core :-) warning during compilation : OpenSceneGraph/src/osgUtil/SceneView.cpp:878: warning: unused variable 'state' OpenSceneGraph/include/osgTerrain/ValidDataOperator:27: warning: unused parameter 'value' OpenSceneGraph/include/osgTerrain/Layer:55: warning: unused parameter 'offset' OpenSceneGraph/include/osgTerrain/Layer:55: warning: unused parameter 'scale' OpenSceneGraph/src/osgTerrain/Layer.cpp:198: warning: unused parameter 'i' OpenSceneGraph/src/osgTerrain/Layer.cpp:198: warning: unused parameter 'j' OpenSceneGraph/src/osgTerrain/Layer.cpp:198: warning: unused parameter 'value' OpenSceneGraph/src/osgTerrain/Layer.cpp:204: warning: unused parameter 'i' OpenSceneGraph/src/osgTerrain/Layer.cpp:204: warning: unused parameter 'j' OpenSceneGraph/src/osgTerrain/Layer.cpp:204: warning: unused parameter 'value' OpenSceneGraph/src/osgTerrain/Layer.cpp:210: warning: unused parameter 'i' OpenSceneGraph/src/osgTerrain/Layer.cpp:210: warning: unused parameter 'j' OpenSceneGraph/src/osgTerrain/Layer.cpp:210: warning: unused parameter 'value' OpenSceneGraph/src/osgTerrain/GeometryTechnique.cpp:376: warning: unused variable 'optimizeOrientations' example execution : all seem good Cheers David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please buil test OpenSceneGraph SVN
arggg, sorry, I forgot some warning OpenSceneGraph/include/osgManipulator/Dragger: In copy constructor 'osgManipulator::PointerInfo::PointerInfo(const osgManipulator::PointerInfo)': OpenSceneGraph/include/osgManipulator/Dragger:128: warning: 'osgManipulator::PointerInfo::_eyeDir' will be initialized after OpenSceneGraph/include/osgManipulator/Dragger:122: warning: 'std::liststd::pairstd::vectorosg::Node*, std::allocatorosg::Node* , osg::Vec3f, std::allocatorstd::pairstd::vectorosg::Node*, std::allocatorosg::Node* , osg::Vec3f osgManipulator::PointerInfo::_hitList' OpenSceneGraph/include/osgManipulator/Dragger:38: warning: when initialized here ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Serialization of draw dispatch on multi GPU systems
Hi I use eclipse under Linux. First you have the cmakeed http://www.cthing.com/CMakeEd.asp plugin to write your CMakeLists.txt. Then execute cmake ./path/of/your/project Then Menu - Project - C/C++ Make Project, set your path, target ... Then Control + B and Build !!! Cheers David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Tutorials
better to keep examples into the OpenSceneGraph/examples to keep sync with OSG core isn't it ?? 2007/8/25, Robert Osfield [EMAIL PROTECTED]: Where to host the example source... 1) I see three options - zip files attached to the wiki 2) A svn repository for tutorial examples 3) Putting tutorial examples into the OpenSceneGraph/examples as part of the core OSG. Keeping the tutorials separate from the core OSG will require a maintainer for it, any volunteers? Keeping it separate does have an advantage of show how one builds applications outwith the standard OSG distribution. Putting tutorials into the core OSG has the advantage is that the code will be as easily any of the core OSG examples. Thoughts? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Max 9 Crashing
Hi all osgDesigner is temporally suspended due to my end-study internship. But it finishs at the end of august. (in 3 day) The project is out of date and I am starting a new design (osgIntrospection is immoderately used and interface is not really intuitive). So this will take a while before having a new release. But I will be proud if osgDesigner was to be host on osgforge. I could use it to develop the next release and to find contributors ... :-) Thoughts? David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Friend functions
try it 2007/9/1, Renan Mendes [EMAIL PROTECTED]: Hello, I've got a small question that I've not been able to answer looking at c++ tutorials: - Can friend functions call other methods from the classes they are friends with? Example class First { public: void function1(); }; class Second { public: void function2(); friend void First::function1(); }; First::function1() { function2(); } Thanks. Renan M Z Mendes ___ 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] Eclipse and OSG
Hi osg-users, Hi Felix This is not a real OSG topic but more an eclipse topic. Felix have problem to launch osg application with eclipse so i will try to do a small tutorial to HOWTO use OSG with eclipse. Felix i need to finish the osg compilation to finish the tutorial and test it. wait a couple of hours and stop to mail in all thread :-), I speed up. Cheers David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Eclipse and OSG
Hi all, # = console command line E# = action in Eclipse I take for project example OSG. 1) - Prepare the build system Eclipse don't know how work CMake so we need to prime the pump # svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunkOpenSceneGraph # cd OpenSceneGraph # mkdir release cd release # cmake .. you are now ready to only use eclipse. So launch Eclipse. 1) - Eclipse use E# Menu - File -Switch workspace : choose the directory where OpenSceneGraph directory is. E# Menu - File - New - Project - General - Project : give the same name to the project that the directory where is the code. So OpenSceneGraph In the Project Explorer window, you have OpenSceneGraph [OpenSceneGraph/trunk] but this not yet a C++ Project E# Right click on this line - New - Convert to a C/C++ Make Project : Now this is a C/C++ project. Eclipse scan the project directory, index the code, found binaries, ... E# Menu - Project - Properties - C/C++ Build : change the build location and select OpenSceneGraph/release for me this look like this : ${workspace_loc:/OpenSceneGraph/release} E# Control + B : launch the build E# Menu - Project - Properties - Run/Debug Setting. Press the New button and select C/C++ Local Application. Set the Name (for example the name of the program) Set the C/C++ Application In the Environment Tab, define the OSG_LIBRARY_PATH if not already done in the Eclipse processus Environment Click the OK button E# Run - Open Run Dialog ... Choose your application and click the Run button. All work fine and you win. Hope help someone. Cheers David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Eclipse and OSG
Hi felix, This mean you try to run a Java application. Are you sure that : - your project is know by eclipse like a C/C++ project ? - your do E# Menu - Run - Open Run Dialog - Select C/C++ Application and click the New button ? David 2007/9/5, Felix Bwire [EMAIL PROTECTED]: Hi David, Thanks very much. The only problem am now having is that when I run, I get the error message: Error launching OpenSceneGraph. Reason: Java.lang.NullPointerException. Have you got the same error before or could you please guide me on how to go about it. Thanks alot. Felix On 9/5/07, David Callu [EMAIL PROTECTED] wrote: Hi all, # = console command line E# = action in Eclipse I take for project example OSG. 1) - Prepare the build system Eclipse don't know how work CMake so we need to prime the pump # svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunkOpenSceneGraph # cd OpenSceneGraph # mkdir release cd release # cmake .. you are now ready to only use eclipse. So launch Eclipse. 1) - Eclipse use E# Menu - File -Switch workspace : choose the directory where OpenSceneGraph directory is. E# Menu - File - New - Project - General - Project : give the same name to the project that the directory where is the code. So OpenSceneGraph In the Project Explorer window, you have OpenSceneGraph [OpenSceneGraph/trunk] but this not yet a C++ Project E# Right click on this line - New - Convert to a C/C++ Make Project : Now this is a C/C++ project. Eclipse scan the project directory, index the code, found binaries, ... E# Menu - Project - Properties - C/C++ Build : change the build location and select OpenSceneGraph/release for me this look like this : ${workspace_loc:/OpenSceneGraph/release} E# Control + B : launch the build E# Menu - Project - Properties - Run/Debug Setting. Press the New button and select C/C++ Local Application. Set the Name (for example the name of the program) Set the C/C++ Application In the Environment Tab, define the OSG_LIBRARY_PATH if not already done in the Eclipse processus Environment Click the OK button E# Run - Open Run Dialog ... Choose your application and click the Run button. All work fine and you win. Hope help someone. Cheers David Callu ___ 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] Eclipse and OSG
Hi Felix, now I am able to run the osg applications such as osgviewer, osgconv, osgarchive and osgversion. Great. My question is, if I am to create a program, do I do so under the same OpenSceneGraph directory or it has to be a different one. And Understand that Eclipse is just a front-end for your development tool-chain (emacs, gcc, gdb). If your application could be launch in a console without eclipse, your environment is well defined. I mean to say your 3rdparty library directory or everything need by your program is accessible. Else you need to adjust your environment. It's the same thing for eclipse, but you can define specific Environment variable for each application E# Menu - Run - Open Run Dialog ... - choose your application - Envirnment Tab -New To have completion in case you use different workspace. E# Menu - Project - Properties - C/C++ General - Path and Symbols - Includes Tab add header directory of the library you need. thereafter, what do I do. I am not sure to understand the question. Coding your project perhaps :-) HTH Cheers David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Link error
ok 2007/9/6, Robert Osfield [EMAIL PROTECTED]: On 9/6/07, David Callu [EMAIL PROTECTED] wrote: Hi Anders, Hi Robert, I introduce the getOsgVertion in osgIntrospection and forgotten to link with osg, Sorry for that. But osgIntrospection is totally independant to osg. Could be interesting to reimplement the getOsgVersion function in osgIntrospection to keep this independence. In theory one could use osgIntrospection separately from the OSG, but in practice its role is in support of the OSG so I don't see a big problem in have a link in there. If we need to refactor things in the future to get the full independence then we can cross the bridge of making the version number independent as well, its pretty trivial, but right now its certainly more practical to keep the versioning based on the core OSG one. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Error in Image.cpp
oups sorry Default flags with gcc have not -W or -Wall or other warning flag You can enable it with set ON the OSG_USE_AGGRESSIVE_WARNINGS cmake variable or add -W -Wall in the CMAKE_CXX_FLAGS cmake variable Cheers Davi Callu 2007/9/7, David Callu [EMAIL PROTECTED]: Hi Art Default flags with gcc h 2007/9/7, Jean-Sébastien Guay [EMAIL PROTECTED]: Hello Art, I suspect the else should be binding2DArray = GL_FALSE; it should be binding2DArray = GL_FALSE; Hmm, strange why does compiler do not see that this is a non-sense instruction... Are the -Wall Flags activated, Robert? On my side (Visual C++ 2005) I only get a warning: 2..\..\..\src\osg\Image.cpp(541) : warning C4552: '-' : operator has no effect; expected operator with side-effect g++ would probably give something similar, which has perhaps not been spotted when compiling such a large number of files... J-S -- __ Jean-Sebastien Guay [EMAIL PROTECTED] http://whitestar02.webhop.org/ This message was sent using IMP, the Internet Messaging Program. ___ 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] Error in Image.cpp
-W -Wall is the default flags with the old build system and disappear with the CMake build system Involuntary or not, I don't know. But with the OSG_USE_AGGRESSIVE_WARNINGS available, I never submit patch to fix this lack. Robert, Luigi , what do you think about this ? David 2007/9/7, Art Tevs [EMAIL PROTECTED]: Aha, I see , thanks. Is there a reason why do not to use the -Wall flag for the osg compilation per default? Art *David Callu [EMAIL PROTECTED]* schrieb: oups sorry Default flags with gcc have not -W or -Wall or other warning flag You can enable it with set ON the OSG_USE_AGGRESSIVE_WARNINGS cmake variable or add -W -Wall in the CMAKE_CXX_FLAGS cmake variable Cheers Davi Callu 2007/9/7, David Callu [EMAIL PROTECTED]: Hi Art Default flags with gcc h 2007/9/7, Jean-Sébastien Guay [EMAIL PROTECTED]: Hello Art, I suspect the else should be binding2DArray = GL_FALSE; it should be binding2DArray = GL_FALSE; Hmm, strange why does compiler do not see that this is a non-sense instruction... Are the -Wall Flags activated, Robert? On my side (Visual C++ 2005) I only get a warning: 2..\..\..\src\osg\Image.cpp(541) : warning C4552: '-' : operator has no effect; expected operator with side-effect g++ would probably give something similar, which has perhaps not been spotted when compiling such a large number of files... J-S -- __ Jean-Sebastien Guay [EMAIL PROTECTED] http://whitestar02.webhop.org/ This message was sent using IMP, the Internet Messaging Program. ___ 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 -- Yahoo! Cleverhttp://de.rd.yahoo.com/evt=48210/*http://de.answers.yahoo.com/;_ylc=X3oDMTEyYTEwYzVhBF9TAzIxMTQ3MTgxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU-- Sie haben Fragen? Yahoo! Nutzer antworten Ihnen. ___ 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] osgmanipulator example questions
Hi, Can you send the osgmanipulator.cpp modified and your scene to test? David Callu 2007/9/10, hesicong2006 [EMAIL PROTECTED]: I know why. root should add an Child include the scene. But another question. I can drag the Teapot01, but the whole scene now has two Teapot. Then how can I fix it? hesicong2006 wrote: Hi, Robert Someday before I asked a question about drag object in OSG and you told me to see osgmanipulator example. It's great. I tried to modify it as I want to move one object in the scene but the whole scene. I tried to do this in addDraggerToScene function: osg::Node* addDraggerToScene(osg::Node* scene, osgManipulator::CommandManager* cmdMgr, const std::string name) { scene-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON); osg::Node* selectedObject=FindByName(Teapot01); osgManipulator::Selection* selection = new osgManipulator::Selection; selection-addChild(selectedObject); osgManipulator::Dragger* dragger = createDragger(name); osg::Group* root = new osg::Group; root-addChild(dragger); root-addChild(selection); root-addChild(createHUD()); float scale = selectedObject-getBound().radius() * 1.6; dragger-setMatrix(osg::Matrix::scale(scale, scale, scale) * osg::Matrix::translate(selectedObject-getBound().center())); cmdMgr-connect(*dragger, *selection); return root; } And here my scene has two objects, one teapot, one box. But when I run the program, I see only the Teapot01 which really can drag and move, but the box is lost! I don't know how to only move one object in the scene. Please give me some ideas. Thanks. ___ 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] put a uniform array in my GLSL shader ?
Hi mael never try but probably with osg::Uniform::setArray(FloatArray * array); David Callu 2007/9/11, Mael Blanchard [EMAIL PROTECTED]: Hi all, I would like to put in my GLSL shader a uniform array variable, I know how to put a simple float or int value with osg::Uniform, but for an array I don't know Is anyone can help me? thanks Mael. ___ 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] Reading models from encrypted compressed file
Hi Ivan You need to found or write a Read/Write plugin for your encrypted compressed file format. David Callu 2007/9/11, Ivan Bolčina [EMAIL PROTECTED]: I know that similar question has been asked before, but I was wondering, if anyone has a solution to this. Or at lease steps I need to implement. Thanks ___ 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] Job request
Hi cedric http://www.openscenegraph.org/projects/osg/wiki/Community/WikiLogIn David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test SVN version of OpenSceneGraph
Hi All Fedora 7, gcc 4.2.1, all build fine !! 2007/9/11, Art Tevs [EMAIL PROTECTED]: yes, it seems that math.h does not define the log2 function on some systems. Sorry, for this. My proposition is to patch the osg's Math file to support for log2 method. I attached the patched file, which contains log2 function. Best regards, Art --- sicong he [EMAIL PROTECTED] schrieb: It seems that VS2005 c++ library do not have log2() function defined. So I change log2() function to log()/log(2.0), I don't know if it is slower than log2() but it really works. 2007/9/11, sicong he [EMAIL PROTECTED]: I fixed this by change all log2(x) to: log((double)maximum(...))/log(2.0) Then I successfully built under VS2005. Attachment is my patch for this problem. Please test it. 2007/9/11, Shue, John [EMAIL PROTECTED]: I'm getting same compiler error on FreeBSD: Texture1D.cpp:417: error: `log2' was not declared in this scope I did: # svn update # ./configure # make -john -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *sicong he *Sent:* Tuesday, September 11, 2007 10:21 AM *To:* Public OpenSceneGraph Users discussion list. *Subject:* Re: [osg-users] Please test SVN version of OpenSceneGraph I get latest version and build under VS2005. But in these line: TextureRectangle.cpp Line 561, TextureCubeMap.cpp Line 387, Texture3D.cpp Line 459, Texture2DArray.cpp Line 467, Texture2D.cpp Line 411, Texture1D.cpp Line 417 These lines VS2005 reports: error C3861: log2 can't find symbol Is there some header lost? 2007/9/11, Robert Osfield [EMAIL PROTECTED]: Hi All, I have merged quite a few changes to the OSG over the last few days, these could break the build, so I'd like some feedback on how the OSG is build and running on various platforms before I go ahead the weekly dev release (2.1.10). Thanks in advance, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org This communication, along with any attachments, is covered by federal and state law governing electronic communications and may contain company proprietary and legally privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, use or copying of this message is strictly prohibited. If you have received this in error, please reply immediately to the sender and delete this message. Thank you. ___ 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 Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail ___ 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] fails compilation on linux (Ubuntu Feisty Fawn)
Hi Rafa, I had the same problem 1 week ago. I use Linux Fedora 7. When compiling, the default glext.h used is the glext.h provide by the mesa package. I have a Nvidia graphic card and the nvidia package for fedora provide an up to date glext.h. But this header is in the /usr/include/nvidia/GL/ directory I just do a symbolic link from /usr/include/nvidia/GL/glext.h to /usr/include/GL/glext.h All build fine now. Cheers David Callu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OpenGL Extension definition in OSG Headers
Hi Robert, After seen and changed the patch provide by Art Tevs on the GL_EXT_gpu_shader4 extension. I have remarked that the extension guard #ifndef GL_EXT_gpu_shader4 don't do #define GL_EXT_gpu_shader4 I go through the glext.h and I see that it is define with the extension functions definition. ex of the Nvidia glext.h: #ifndef __glext_h_ #define __glext_h_ #ifdef __cplusplus extern C { #endif /* blablabla */ ... lot of define ... #ifndef GL_EXT_gpu_shader4 #define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 #define ... #endif ... lot of define ... #ifndef GL_EXT_gpu_shader4 #define GL_EXT_gpu_shader4 1 #ifdef GL_GLEXT_PROTOTYPES extern void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); extern void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); extern GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); extern void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); ... So, to keep OSG consistent, we need to add #define GL_EXT... 1 after each #ifndef GL_EXT... concerned file are FragmentProgram, VertexProgram, GL2Extensions, PointSprite, Thought ? David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] fails compilation on linux (Ubuntu Feisty Fawn)
Define values are always the same on all platform so why. Moreover this seem clean and prevent redefine warning like I would fix in my other post. I am agree with this solution. Cheers David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] unsubscribe
you can do it yourself : http://lists.openscenegraph.ohttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org rg/listinfo.cgi/osg-users-openshttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org cenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org login then unsubscribe David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Addition and Subtraction
Hi Renan If it just for display your CSG operation, there are openCSGhttp://www.opencsg.org/ If it is for building a eometrey then display it, there are effectively BRL CAD, or OpenCascade http://www.opencascade.org/. The best I found is CGAL http://www.cgal.org/ but it have a double licence like Qt, depending if you do opensource or close source application. HTH David 2007/9/16, Renan Mendes [EMAIL PROTECTED]: I'll check into that. Thanks, both of you. Renan M Z Mendes ___ 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] window restored to center of screen
Hi Johan, This done by the osgViewer::WindowSizeHandler::toggleFullScreen() method. You can reimplement your own Handler to do what you want like you want :-) Cheers David 2007/9/17, Johan Johnsson [EMAIL PROTECTED]: as i press f in fullscreenmode the windowmode arrives, the window appears in the center of the screen. is there anyway to control this position ? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph with Qt multiple windowing problem
Hi arnaud I can't reproduce your problem. I have 4 osg window in the mainWindow and all have the same frame rate. Can you describe you plateform driver vertion OSG, Qt OSG_OPTIMIZE and OSG_CAMERA_THREAD env var ... another think is thit is preferable to use osgViewer::CompositeViewer and osgViewer::View instead of osgViewer::Viewer when you have many scene and so many view. With this, all update/cull/draw/ operations are done with the Thread Model choose in the osgViewer::CompositeViewer, and so do the best management of all update/cull/draw/ operation of each View. This include to swapping OpenGL buffer all together. I never could notice this but a thread on the ML talk about this. according to this thread, swapping all OpenGL buffer together give best performance. Thank David Joint the modified 2007/9/19, arnaud houegbelo [EMAIL PROTECTED]: Hi Robert, Please find in attached file the source code of a small project based on osgViewerQT. This project create a QApplication with a mdi. You can open many OsgWidget (inherits of osgViewerQT) via the menu (File - Open). If you open many viewers you will see that the last viewers opened are very slow and if you close some previous viewers they delete some objects in the others viewers. I hope that this exemple will be useful to you to find the problem. many thanks and best Regards Arnaud Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph with Qt multiple windowing problem
Oups forgotten I use Linux Fedore 7 Gcc 4.2.1 AMD Athlon(tm) XP 3200+ NVidia GForce 7600 GT OSG_THREADING = SingleThreaded OSG_OPTIMIZER = DEFAULT 2007/9/19, David Callu [EMAIL PROTECTED]: Hi arnaud I can't reproduce your problem. I have 4 osg window in the mainWindow and all have the same frame rate. Can you describe you plateform driver vertion OSG, Qt OSG_OPTIMIZE and OSG_CAMERA_THREAD env var ... another think is thit is preferable to use osgViewer::CompositeViewer and osgViewer::View instead of osgViewer::Viewer when you have many scene and so many view. With this, all update/cull/draw/ operations are done with the Thread Model choose in the osgViewer::CompositeViewer, and so do the best management of all update/cull/draw/ operation of each View. This include to swapping OpenGL buffer all together. I never could notice this but a thread on the ML talk about this. according to this thread, swapping all OpenGL buffer together give best performance. Thank David Joint the modified 2007/9/19, arnaud houegbelo [EMAIL PROTECTED]: Hi Robert, Please find in attached file the source code of a small project based on osgViewerQT. This project create a QApplication with a mdi. You can open many OsgWidget (inherits of osgViewerQT) via the menu (File - Open). If you open many viewers you will see that the last viewers opened are very slow and if you close some previous viewers they delete some objects in the others viewers. I hope that this exemple will be useful to you to find the problem. many thanks and best Regards Arnaud Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow ___ 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] Displaying stats
Hi Marcus just a simple question. How can I use the stats? Do you want use the state os stats ? state if toggleUseTexture (key t), ToggleWireFrame (key w), ToggleLight (key l), ... stats is a grap draw on the top of the scene and displaying performance of the application (key s) I have added viewer.addEventHandler( new osgGA::StateSetManipulator( viewer.getCamera()-getOrCreateStateSet() ) ); to my program, but I think this is not enough. I am using the new OSG 2.0. osg-users correct me if I am wrong but just add Handler to the view is require. look the osgviewer example David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Displaying stats
sorry, this is in the old one Provide by Producer. 2007/9/20, Marcus Fritzen [EMAIL PROTECTED]: Thank you both. Like Robert said, atm there is no automatically count of the triangles in the StatsHandler. I am not sure what you mean with the display in the stats graph, David? I have taken a look at the osgViewer examples, but they all use the StatsHandler, which I am using right now, too. David Callu wrote: lol synchronized That is all, but another question. Is there also a possibility to count the triangles in the scene? this is display in the Stats graph David ___ 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] (no subject)
Hi Jan Take a look to the ShapeDrawable::accept(const HeightField field) to see how osg render a height field. Take a look to the osgtexture2d example to know how to enable and render texture. HTH David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Still problems turning off the light
Hi philipp try to do getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE); 2007/9/28, Philipp Siemoleit [EMAIL PROTECTED]: Hi, i try to turn off the light on my scene - without success :( Here is the example code: int main(int argc, char* argv[]) { osgViewer::Viewer v; osg::ref_ptrosg::Node node = osgDB::readNodeFile(bau_Bauernhaus.flt); node-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF); v.setSceneData(node.get()); v.setLightingMode(osg::View::NO_LIGHT); v.getCamera()-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF); return v.run(); } What's wrong? Thanks for answers! Philipp ___ 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] Call for feedback : glu.h does it contain _GLUfuncptr?
2007/10/1, Andy Skinner [EMAIL PROTECTED]: Although I sent stuff that started this, let me be specific. Here are maci with the glu.h we use, and a bit about glu.h we don't use. Here are also linux 32 bit and solaris 64 information. I get the info from building Tessellator.i. On our Intel Mac build using CMake, we are getting /System/Library/Frameworks/OpenGL.framework/Headers/glu.h gluTessCallback is declared as: extern void gluTessCallback (GLUtesselator* tess, GLenum which, GLvoid (*CallBackFunc)()); The line that doesn't compile is: gluTessCallback(_tobj, 100107, (GLvoid (*)(...)) vertexCallback); I think ... comes from the bit in GLU. There is another glu.h in /usr/include/X11R6/GL, but we aren't using it. It defines gluTessCallback as: extern void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); and _GLUfuncptr as: /* Internal convenience typedefs */ #ifdef __cplusplus typedef GLvoid (*_GLUfuncptr)(); #else typedef GLvoid (*_GLUfuncptr)(GLvoid); #endif Our 32-bit linux uses /usr/include/GL/glu.h. It declares gluTessCallback as: extern void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); and _GLUfuncptr as: typedef void ( * _GLUfuncptr)(); The line that is failing is: gluTessCallback(_tobj, 100107, (GLvoid (*)()) vertexCallback); And on Solaris I get /usr/include/GL/glu.h. gluTessCallback is: extern void gluTessCallback ( GLUtesselator * tess , GLenum which , GLvoid ( * CallBackFunc ) ( ) ) ; The failing line is: gluTessCallback ( _tobj , 100107 , ( GLvoid ( * ) ( ) ) vertexCallback ) ; andy ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org same as Robert and Leif, Fedora 7 come from Package mesa-libGLU-devel-6.5.2-13.fc7 David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GUI Events and Available Tutorial
Hi Renan Have you take a look to OSG example? osgkeyboard and osgcamera could interest you. After this, you can also take a look to the source code ... ;-) The best source of information. David 2007/10/2, Renan Mendes [EMAIL PROTECTED]: Hello, everyone. Newbie speaking again. I've got the new version of OSG (2.0), but I've had access only to the old version's tutorial, found in http://www.nps.navy.mil/cs/sullivan/osgtutorials/. As I went through the Keyboard Handler Class and tried to implement some of the code available, I found out that some of the methods mentioned in the tutorial do not belong to a certain class they used to (others I couldn't even find in the reference guide anymore). So, my question is: where can I read more on GUI Events, Keyboard Handler and Mouse Selection in an up to date version of OSG. (I have the OSG Quick Start Guide and it's been helping me, but I just wanted some more sources to refer to when I don't understand the book entirely). Thanks again, Renan M Z Mendes ___ 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] camera config file?
Hi mike update your OpenSceneGraph-Data svn, there are osgViewer configuration file into. David 2007/10/4, Mike Wozniewski [EMAIL PROTECTED]: 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] .obj, 3DI import
Hi andrej osg load automatically the plugin require to read the file. This is based on extension of the file that you want read. OSG have a plugin to read .obj file but I don't know the .3DI format and I don't know if OSG can read this format. You can force OSG to use a specific loader by adding -l library or -e extension in commande line. HTH David 2007/10/4, andrej spilak [EMAIL PROTECTED]: Hello! As I'm pretty new to OSG, could anyone help me with reading .obj file extension? How should i import SolidWorks .3DI object then, which is pretty much similiar to the .obj? thanks in advance, andrej ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.2 stable released
Hi all There still are 1 Spanish site and 2 German site where need to post the OSG 2.2 release news. Need to be traduced in them respective language. Spanish and German osg-user, can you do this please. Thanks David 2007/10/4, Robert Osfield [EMAIL PROTECTED]: No that 2.2 has been tagged its time to tell the word about it, so I'd appreciate your efforts in passing on the word to various news websites etc. Usual websites we post to can be found on the SpreadingTheNews page: http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/SpreadingTheNews If you contact one of the sites please just change the (todo) to (done). Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems when rendering to a FBO texture and using that as a texture.
Hi Alberto, The strange thing is OpenGL FrameBufferObject extension don't use the windowing-api so the wglBindTextureImageARB have not to be called. your code seem to be good. take a look to osgprerender example. osgprerender --fbo use frame buffer object. HTH David 2007/10/8, Alberto Nortes [EMAIL PROTECTED]: Hi!, We have migrated all the code to the new osgViewer and everything is working marvelously, but: In OSG-2.2, with an Nvidia 7800 GT, I create an FBO to render the scene to a texture, this works correctly, but later if I want to use that texture as an input I get the following error: PixelBufferWin32::wglBindTexImageARB(), failed This used to work while working with osgProducer, but right now I dont know what can be wrong. Here is some code: //Render the current scene to a texture. camera-setRenderOrder(osg::CameraNode::PRE_RENDER); camera-setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER_OBJECT); camera-attach(osg::CameraNode::COLOR_BUFFER, _texture_fbo); camera-addChild(*_total_root*); _root_camera_fbo-addChild(camera); _root_camera_fbo-addChild(nested_quad_from_camera); viewer.setSceneData(_root_camera_fbo); //Then in another part of the code I do: osg::Texture2D* _imagen_fbo = getTextureFbo(); *_total_root*-addChild(group); group-getOrCreateStateset()-setTextureAttributeAndModes(0, _imagen_fbo,osg::StateAttribute::ON); //This last line provokes the warning. I belive I am doing something really really wrong like accesing the texture inside the same camera that renders it each frame... Please any comment would be very helpful. Thanks! ___ 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] Multisample problem
Hi Panagiotis 2007/10/6, Panagiotis Papadakos [EMAIL PROTECTED]: Hi. I want to add an option of using multisampling for my app. So I have setup DisplaySettings with setNumMultiSamples(4). The user is able to enable/disable multisampling as he feels in the app, by enabling/disabling the GL_MULTISAMPLE_ARB in the root stateset. My problem now is that initially I want to have multisampling disabled, which I can't figure out how to do. I have tried setting GL_MULTISAMPLE_ARB OFF in the root stateset, but this doesn't seem to help. Any ideas? This seem to be the good method. you can try 1) do root-getOrCreateStateSet()-setMode(GLL_MULTISAMPLE_ARB, osg::StateAttribut::OFF | osg::StateAttribut::OVERRIDE) 2) I think that number of sample is define when the OpenGL context is created so recreate a context on each switch of the number os sample you want. How did you know that multisample is enabling/disabling. Did you look the render ? Did you do a request to OpenGL about multisample ? David Thanks Panagiotis Papadakos ___ 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] osgViewer::Viewer and getSceneView
Hi Pasquale now you need to use the osgViewer::Viewer which derive from osgViewer::View which derive from osg::View You have access to - the scene graph by osgViewer::View::GetScene() - the camera by osgViewer::View::GetCamera() ... osgUtil::SceneView is use internally by osgViewer in osgViewer::Renderer. And inherited its setting form the camera that osgViewer::Renderer render. this is done in osgViewer::Renderer::updateSceneView. HTH David 2007/10/11, Pasquale Tricarico [EMAIL PROTECTED]: Hi, I'm updating a project to OSG-2.2, after several months (~6) of interrupted development, and I'm facing a problem. Before I based my code on the QT viewer example, with: class ViewerQT : public osgViewer::Viewer, public GraphicsWindowQT {...} and I could do: ViewerQT * viewerWindow = new ViewerQT; viewerWindow-getSceneView()-...; Now, I've updated my code using the latest osgviewerQT example, where: class AdapterWidget : public QGLWidget {...} class ViewerQT : public osgViewer::Viewer, public AdapterWidget {...} but now ViewerQT doesn't provide the getSceneView() method. How can I recover it? I needed it mainly to modify the near/far ratio: ...-getSceneView()-setNearFarRatio(1.0e-8); // big scene, with many tiny important details that need to be rendered and for debugging/verbose output such as: ...-getSceneView()-getProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, zFar); Maybe now OSG 2.2 offers better ways to perform these two tasks? Thanks a lot, Pasquale (BTW, the first line of osgviewerQT.cpp says OpenSceneGraph example, osganimate., got to love cut'n'paste ;) ___ 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] osg2.2 and TemplateIndexArray
Hi Guillaume This look like a use of library with different version Have you rebuild and reinstall OSG before run your test. David 2007/10/11, Poirier, Guillaume [EMAIL PROTECTED]: Hello ! I just downloaded version 2.2 and switched. The only modification I've made to my code that was working was to upgrade from SimpleViewerQT to ViewerQT, following the example. Since I upgraded I keep getting run-time errors in 0x2b78c03ff596 in osg::TemplateIndexArrayunsigned int, (osg::Array::Type)6, 1, 5125::index () from /usr/local/lib64/libosgUtil.so.25 Anyone has an idea ? cheers, bill ___ 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] Texture Memory supposed leak
2007/10/12, Argentieri, John-P63223 [EMAIL PROTECTED]: To clarify, I create OpenGL contexts, not osg::GraphicsContexts, and use a sceneview per window. If switching to osg::GraphicsContext would fix my texture memory issues, I would do it. If that is the case, is there a good example of using a osgUtil::SceneView with a osg::GraphicsContext that someone can refer me to? John -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Argentieri, John-P63223 *Sent:* Friday, October 12, 2007 10:21 AM *To:* osg-users@lists.openscenegraph.org *Subject:* [osg-users] Texture Memory supposed leak Hello, I read a message concerning texture memory cleanup. Robert asked the user if he was opening and closing contexts. I am also having texture memory issues, and I AM opening and closing contexts. How are these two things related? Thanks for your help. Sincerely, John ___ 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] Window resize
Hi Johan, HI Adrian Can you give more info on your platform? Can you develop why now the dimension is locked? Which method did you use ? David 2007/10/15, Johan Johnsson [EMAIL PROTECTED]: On Mon, 15 Oct 2007 11:40:53 +0200, Adrian Egli [EMAIL PROTECTED] wrote: think you got me wrong , i dont want to change the dimensions that the window initializes to, i want to make the window to be resizeable during the exekvation, because now the dimension is locked, i cant rezise it. Look into the source code, who it's done there. 2007/10/15, Adrian Egli [EMAIL PROTECTED] : UNIX/OSX/LINUX export OSG_WINDOW=50 50 200 50 Windows set OSG_WINDOW=100 100 512 512 2007/10/15, Johan Johnsson [EMAIL PROTECTED] : When the process runs in windowed mode, it is not possible to modify the size of the window. It should be possible to resize the window by standard MS Windows conventions. why does this occur and how can i fix this irritating problem? has it something to do with the traits struct? -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ 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] Multisample problem
Hi Panagiotis I attach a osgviewer based example of use of multisample You can switch on/off multisample with the key 'm' Cheers David 2007/10/14, Panagiotis Papadakos [EMAIL PROTECTED]: Hi David On Tue, 9 Oct 2007, David Callu wrote: Hi Panagiotis 2007/10/6, Panagiotis Papadakos [EMAIL PROTECTED]: Hi. I want to add an option of using multisampling for my app. So I have setup DisplaySettings with setNumMultiSamples(4). The user is able to enable/disable multisampling as he feels in the app, by enabling/disabling the GL_MULTISAMPLE_ARB in the root stateset. My problem now is that initially I want to have multisampling disabled, which I can't figure out how to do. I have tried setting GL_MULTISAMPLE_ARB OFF in the root stateset, but this doesn't seem to help. Any ideas? This seem to be the good method. you can try 1) do root-getOrCreateStateSet()-setMode(GLL_MULTISAMPLE_ARB, osg::StateAttribut::OFF | osg::StateAttribut::OVERRIDE) This is what I've been trying. More specifically root-getOrCreateStateSet()-setMode(GL_MULTISAMPLE_ARB, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED | osg::StateAttribute::OVERRIDE); after the viewer has been realized. 2) I think that number of sample is define when the OpenGL context is created so recreate a context on each switch of the number os sample you want. Why should I recreate a context? I think I should be able to enable/disable Multisampling with setting the state mode ON/OFF. How did you know that multisample is enabling/disabling. Did you look the render ? Yep, that is the case. I saw the render. Did you do a request to OpenGL about multisample ? David Thanks Panagiotis Papadakos ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This application is open source and may be redistributed and/or modified * freely and without restriction, both in commericial and non commericial applications, * as long as this copyright notice is maintained. * * This application is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #include osgDB/ReadFile #include osgUtil/Optimizer #include osg/CoordinateSystemNode #include osg/Multisample #include osg/Switch #include osgText/Text #include osgViewer/Viewer #include osgViewer/ViewerEventHandlers #include osgGA/TrackballManipulator #include osgGA/FlightManipulator #include osgGA/DriveManipulator #include osgGA/KeySwitchMatrixManipulator #include osgGA/StateSetManipulator #include osgGA/AnimationPathManipulator #include osgGA/TerrainManipulator #include iostream class SwitchMultisampleHandler : public osgGA::GUIEventHandler { public: SwitchMultisampleHandler(osg::StateSet * ss) : _useMultisample(false), _ss(ss) { _ss-setAttributeAndModes(new osg::Multisample, osg::StateAttribute::ON); _ss-setMode(GL_MULTISAMPLE, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE); } bool handle(const osgGA::GUIEventAdapter ea, osgGA::GUIActionAdapter ) { if (ea.getHandled()) return false; switch (ea.getEventType()) { case (osgGA::GUIEventAdapter::KEYUP): { if (ea.getKey() == 'm') { if (_useMultisample == false) { _ss-setMode(GL_MULTISAMPLE, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); _useMultisample = true; } else { _ss-setMode(GL_MULTISAMPLE, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE); _useMultisample = false; } return true; } break; } default: break; } return false; } private: bool _useMultisample; osg::ref_ptrosg::StateSet _ss; }; int main(int argc, char** argv) { // use an ArgumentParser object to manage the program arguments. osg::ArgumentParser arguments(argc,argv); arguments.getApplicationUsage()-setApplicationName(arguments.getApplicationName()); arguments.getApplicationUsage()-setDescription(arguments.getApplicationName()+ is the standard OpenSceneGraph example which loads and visualises 3d models.); arguments.getApplicationUsage()-setCommandLineUsage
Re: [osg-users] Multisample problem
Ok I have a not really clean fix but this work. I will investigate more on this issue. Keep you informed David 2007/10/17, Panagiotis Papadakos [EMAIL PROTECTED]: Hi David. Thanks for your time and the example. I have the same problem with your example as I have with my own code. Running ./a.out --samples 4 saved_model.osg, uses anti-aliasing when the application starts although SwitchMultisampleHandler disables it in constructor. Pressing 2 times 'm' disables it, as it also happens with my app. Panagiotis Papadakos On Wed, 17 Oct 2007, David Callu wrote: Hi Panagiotis I attach a osgviewer based example of use of multisample You can switch on/off multisample with the key 'm' Cheers David 2007/10/14, Panagiotis Papadakos [EMAIL PROTECTED]: Hi David On Tue, 9 Oct 2007, David Callu wrote: Hi Panagiotis 2007/10/6, Panagiotis Papadakos [EMAIL PROTECTED]: Hi. I want to add an option of using multisampling for my app. So I have setup DisplaySettings with setNumMultiSamples(4). The user is able to enable/disable multisampling as he feels in the app, by enabling/disabling the GL_MULTISAMPLE_ARB in the root stateset. My problem now is that initially I want to have multisampling disabled, which I can't figure out how to do. I have tried setting GL_MULTISAMPLE_ARB OFF in the root stateset, but this doesn't seem to help. Any ideas? This seem to be the good method. you can try 1) do root-getOrCreateStateSet()-setMode(GLL_MULTISAMPLE_ARB, osg::StateAttribut::OFF | osg::StateAttribut::OVERRIDE) This is what I've been trying. More specifically root-getOrCreateStateSet()-setMode(GL_MULTISAMPLE_ARB, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED | osg::StateAttribute::OVERRIDE); after the viewer has been realized. 2) I think that number of sample is define when the OpenGL context is created so recreate a context on each switch of the number os sample you want. Why should I recreate a context? I think I should be able to enable/disable Multisampling with setting the state mode ON/OFF. How did you know that multisample is enabling/disabling. Did you look the render ? Yep, that is the case. I saw the render. Did you do a request to OpenGL about multisample ? David Thanks Panagiotis Papadakos ___ 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] Multisample problem
oups forget the file ... 2007/10/17, David Callu [EMAIL PROTECTED]: Ok I have a not really clean fix but this work. I will investigate more on this issue. Keep you informed David 2007/10/17, Panagiotis Papadakos [EMAIL PROTECTED]: Hi David. Thanks for your time and the example. I have the same problem with your example as I have with my own code. Running ./a.out --samples 4 saved_model.osg, uses anti-aliasing when the application starts although SwitchMultisampleHandler disables it in constructor. Pressing 2 times 'm' disables it, as it also happens with my app. Panagiotis Papadakos On Wed, 17 Oct 2007, David Callu wrote: Hi Panagiotis I attach a osgviewer based example of use of multisample You can switch on/off multisample with the key 'm' Cheers David 2007/10/14, Panagiotis Papadakos [EMAIL PROTECTED]: Hi David On Tue, 9 Oct 2007, David Callu wrote: Hi Panagiotis 2007/10/6, Panagiotis Papadakos [EMAIL PROTECTED]: Hi. I want to add an option of using multisampling for my app. So I have setup DisplaySettings with setNumMultiSamples(4). The user is able to enable/disable multisampling as he feels in the app, by enabling/disabling the GL_MULTISAMPLE_ARB in the root stateset. My problem now is that initially I want to have multisampling disabled, which I can't figure out how to do. I have tried setting GL_MULTISAMPLE_ARB OFF in the root stateset, but this doesn't seem to help. Any ideas? This seem to be the good method. you can try 1) do root-getOrCreateStateSet()-setMode(GLL_MULTISAMPLE_ARB, osg::StateAttribut::OFF | osg::StateAttribut::OVERRIDE) This is what I've been trying. More specifically root-getOrCreateStateSet()-setMode(GL_MULTISAMPLE_ARB, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED | osg::StateAttribute::OVERRIDE); after the viewer has been realized. 2) I think that number of sample is define when the OpenGL context is created so recreate a context on each switch of the number os sample you want. Why should I recreate a context? I think I should be able to enable/disable Multisampling with setting the state mode ON/OFF. How did you know that multisample is enabling/disabling. Did you look the render ? Yep, that is the case. I saw the render. Did you do a request to OpenGL about multisample ? David Thanks Panagiotis Papadakos ___ 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 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This application is open source and may be redistributed and/or modified * freely and without restriction, both in commericial and non commericial applications, * as long as this copyright notice is maintained. * * This application is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #include osgDB/ReadFile #include osgUtil/Optimizer #include osg/CoordinateSystemNode #include osg/Multisample #include osg/Switch #include osgText/Text #include osgViewer/Viewer #include osgViewer/ViewerEventHandlers #include osgGA/TrackballManipulator #include osgGA/FlightManipulator #include osgGA/DriveManipulator #include osgGA/KeySwitchMatrixManipulator #include osgGA/StateSetManipulator #include osgGA/AnimationPathManipulator #include osgGA/TerrainManipulator #include iostream class SwitchMultisampleHandler : public osgGA::GUIEventHandler { public: SwitchMultisampleHandler(osg::StateSet * ss) : _useMultisample(false), _ss(ss) { _ss-setAttributeAndModes(new osg::Multisample, osg::StateAttribute::ON); _ss-setMode(GL_MULTISAMPLE, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE); } bool handle(const osgGA::GUIEventAdapter ea, osgGA::GUIActionAdapter ) { if (ea.getHandled()) return false; switch (ea.getEventType()) { case (osgGA::GUIEventAdapter::KEYUP): { if (ea.getKey() == 'm') { if (_useMultisample == false) { _ss-setMode(GL_MULTISAMPLE, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); _useMultisample = true; } else
Re: [osg-users] Outputting Movies in OpenSceneGraph
Hi Garrett A xine/Quicktime plugin is provide to read movie in OSG scene Take a look to osgmovie examples. But don't know any plugin to make a movie from an OSG Scene David 2007/10/19, Garrett Potts [EMAIL PROTECTED]: Hello All: I have been perusing the source and examples and I was wondering if there was a way to output movies in an OSG Scene. I know there are pbuffers and you can probably latch on to pbuffer generation after each framing and then couple to a movie generation library but I see that the osgDB has a nice plugin architecture for reading and writing and was wondering with the Movie based plugins if there was a way to feed a plugin (if one exists for movie writing) to output frames at given rate. So basically init the plugin with some setup parameters and then start writing. Has anyone ever researched this through a raw OSG implementation and not coupled to like a GUI or anything like that? Thank you all in advance for any help and time. Take care Garrett ___ 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] specular highlight with SEPARATE_SPECULAR_COLOR
Hi Riccardo Linux Fedora 7 OSG 2.2 NVidia GeForce 8800 All work fine for me. I just do osglight_modified cow.osg I join the osglight_modified.cpp simplified and updated to OSG2.2. Many bug has be fix and feature added since the OSG 1.2 Version. Perhaps an update to OSG 2.2 will be a good choice for you. HTH David 2007/10/23, Riccardo Corsi [EMAIL PROTECTED]: Hi all, I'm try to get a specular highlights effect by using the osg::LightModel::SEPARATE_SPECULAR_COLOR mode. If I got it straight, this should compute a second color for the specular component to be added after lighting and texturing. So for instance, by using a light with white specular component and on a material with white specular color, I'd expect a white highlight in the final result. Instead what I get is the highlight modulated by the texture, as if I were using osg::LightModel::SINGLE_COLOR mode. Any suggestion on where I might be wrong? Find attached a modified osgLight example to reproduce the problem with a sample model. I basically removed the model animation, set a white specular on the light number 2, and added these lines of code: osg::StateSet* pSS = rootnode-getOrCreateStateSet(); // set separate specular color osg::LightModel* pLightModel =new osg::LightModel; pLightModel-setLocalViewer(true); pLightModel-setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR); pSS-setAttributeAndModes(pLightModel, osg::StateAttribute::ON |osg::StateAttribute::OVERRIDE); I'm on osg 1.2 WinXP nVidia 7900 GTX (tried both older and latest drivers) Thank you Ricky ___ 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] specular highlight with SEPARATE_SPECULAR_COLOR
oups forget the file :-) 2007/10/23, David Callu [EMAIL PROTECTED]: Hi Riccardo Linux Fedora 7 OSG 2.2 NVidia GeForce 8800 All work fine for me. I just do osglight_modified cow.osg I join the osglight_modified.cpp simplified and updated to OSG2.2 . Many bug has be fix and feature added since the OSG 1.2 Version. Perhaps an update to OSG 2.2 will be a good choice for you. HTH David 2007/10/23, Riccardo Corsi [EMAIL PROTECTED]: Hi all, I'm try to get a specular highlights effect by using the osg::LightModel::SEPARATE_SPECULAR_COLOR mode. If I got it straight, this should compute a second color for the specular component to be added after lighting and texturing. So for instance, by using a light with white specular component and on a material with white specular color, I'd expect a white highlight in the final result. Instead what I get is the highlight modulated by the texture, as if I were using osg::LightModel::SINGLE_COLOR mode. Any suggestion on where I might be wrong? Find attached a modified osgLight example to reproduce the problem with a sample model. I basically removed the model animation, set a white specular on the light number 2, and added these lines of code: osg::StateSet* pSS = rootnode-getOrCreateStateSet(); // set separate specular color osg::LightModel* pLightModel =new osg::LightModel; pLightModel-setLocalViewer(true); pLightModel-setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR); pSS-setAttributeAndModes(pLightModel, osg::StateAttribute::ON |osg::StateAttribute::OVERRIDE); I'm on osg 1.2 WinXP nVidia 7900 GTX (tried both older and latest drivers) Thank you Ricky ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org #include osgViewer/Viewer #include osg/Group #include osg/Node #include osg/Material #include osg/Light #include osg/LightSource #include osg/StateAttribute #include osg/Geometry #include osg/Point #include osg/MatrixTransform #include osg/PositionAttitudeTransform #include osgDB/Registry #include osgDB/ReadFile #include osgUtil/Optimizer #include osgUtil/SmoothingVisitor #include osgViewer/ViewerEventHandlers #include osgGA/TrackballManipulator #include osgGA/StateSetManipulator #include iostream // rigky #include osg/LightModel osg::Node* createLights(osg::StateSet* rootStateSet) { osg::Group* lightGroup = new osg::Group; // create a spot light. osg::Light* myLight1 = new osg::Light; myLight1-setLightNum(0); myLight1-setPosition(osg::Vec4(10.0f, 10.0f, 10.0f, 1.0f)); myLight1-setAmbient(osg::Vec4(1.0f,0.0f,0.0f,1.0f)); myLight1-setDiffuse(osg::Vec4(1.0f,0.0f,0.0f,1.0f)); myLight1-setSpecular(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); //myLight1-setSpotCutoff(20.0f); //myLight1-setSpotExponent(50.0f); myLight1-setDirection(osg::Vec3(-1.0f,-1.0f,-1.0f)); osg::LightSource* lightS1 = new osg::LightSource; lightS1-setLight(myLight1); lightS1-setLocalStateSetModes(osg::StateAttribute::ON); lightS1-setStateSetModes(*rootStateSet,osg::StateAttribute::ON); lightGroup-addChild(lightS1); // create marker for point light. osg::Geometry* marker = new osg::Geometry; osg::Vec3Array* vertices = new osg::Vec3Array; vertices-push_back(osg::Vec3(0.0,0.0,0.0)); marker-setVertexArray(vertices); marker-addPrimitiveSet(new osg::DrawArrays(GL_POINTS,0,1)); osg::StateSet* stateset = new osg::StateSet; osg::Point* point = new osg::Point; point-setSize(4.0f); stateset-setAttribute(point); marker-setStateSet(stateset); osg::Geode* markerGeode = new osg::Geode; markerGeode-addDrawable(marker); //lightGroup-addChild(markerGeode); return lightGroup; } int main( int argc, char **argv ) { // use an ArgumentParser object to manage the program arguments. osg::ArgumentParser arguments(argc,argv); // set up the usage document, in case we need to print out how to use this program. arguments.getApplicationUsage()-setDescription(arguments.getApplicationName()+ is the example which demonstrates use of OpenGL vertex lighting.); arguments.getApplicationUsage()-setCommandLineUsage(arguments.getApplicationName()+ [options] filename ...); arguments.getApplicationUsage()-addCommandLineOption(-h or --help,Display this information); // construct the viewer. osgViewer::Viewer viewer(arguments); // set up the value with sensible default event handlers. //viewer.setUpViewer(osgViewer::Viewer::STANDARD_SETTINGS); // get details on keyboard and mouse bindings used by the viewer. viewer.getUsage(*arguments.getApplicationUsage()); // if user request help write it out to cout. if (arguments.read(-h) || arguments.read(--help
Re: [osg-users] using osgIntrospection for own library
Hi Manu 2007/12/5, Emmanuel Roche [EMAIL PROTECTED]: Helle there !! I'm currently testing the osg reflection framework, so I got GenWrapper, an now I'm using it to try to build wrappers for my own libraries... Here is the situation: I've got a file typedefs.h containing something like: #include osg/Node #include osg/ref_ptr typedef osg::ref_ptrosg::Node RefNode; And when I use genwrapper with such a file, just before the output * INFO: creating file `gen/src/osgWrappers/ogl/Typedefs.cpp' I get: * WARNING: could not write a reflector for undefined type `osg::ref_ptr osg::Node ' I'm quite new to the introspection, so please correct me if I'm wrong: 1) Am I right to assume that this warning is not important and everything will be all right as long as I load the osg wrapper library as this one would provide everything needed to access the reflector for this type ? You right 2) And, if it's really the case, is this assumption dangerous because osg::ref_ptr osg::Node is a particularly common type and the same assumption would not work for something more exotic (like using osg:ref_ptr MyObjectType where MyObjectType is introspected in a first library (lib1) and this referenced type defined only in a second library... If someone sees what I mean...) ? I am not sure to see what you mean. can you explain this please David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Still on osgintrospection...
Hi Manu 2007/12/5, Emmanuel Roche [EMAIL PROTECTED]: Suppose I have a class MyClass introspected I also some kind of template class MyTemplaceclass T, which can be built with the type T=MyClass, BUT this construction is done nowhere in our base library... I guess if I try to generate wrappers, the type MyTemplateMyClass will not be defined (ie reflected). What is best way to solve this problem ? Template reflection is not supported in osgIntrospection. You have to reflect each class create with a template. Done automatically by genWrapper when it found a template instantiation. Take a look to src/osgWrapper/osg/Array, each osg::Vec2, osg::Vec2s, osg::Vec3 ... are reflected. And by the way, I noticed that (with the SVN version of the genwrapper at least) it is not possible to use the option -p to generate VisualStudio project files. The option simply doesn't appear anywhere in the source code in fact, it that normal ? Well. really few person use genWrapper. I use it on Linux, Robert too. Never try on Windows. So perhaps this feature is firstly intended but never implemented. You can do it if you want :-) Manu. ___ 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] osgIntrospection and operators ?
Hi Manu 2007/12/5, Emmanuel Roche [EMAIL PROTECTED]: It's me again, sorry to ask so much, but I keep being surprised with this introspection stuff: Correct me if I'm missing something but since the operators of a class are not reflected (why ?), Well, you right again. Operator are not supported in osgIntrospection. how can you expect to do something as simple as the addition of two osg::Vec3 introspectively ??? Good question. OSG is bind in many other language than C++ with osgIntrospection and I don't know how this bind does to use operator. Perhaps simply not use operator at all. After look in OsgDotNet TODO list, a see that operator have to be implemented. So no solution for now. Again, feel free to do it :-). David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] using osgIntrospection for own library
2007/12/6, Emmanuel Roche [EMAIL PROTECTED]: Hi David, What I mean in my ponit 2 is: - Suppose I have a library lib1 where I define my class Class1 - Suppose I build a wrapper for this library: lib1_wrapper Now, I build another library, lib2 where I define a templated class Class2T In this second library, I define the typedef : typedef Class2Class1 MyTypedef; - And now I try to build a wrapper for this lib2, lib2_wrapper. As Class1 is not in lib2, I guess the genwrapper will complain about no reflector being built for Class2 Class1 , GenWrapper work on one Header at time. So if your typedef Class2Class1 MyTypedef; is define in the same file of the template definition Class2T, It will create the Class2Class1 reflector. I also have a similar question on the same issue, more generally speaking: Suppose in my lib1, I define Class1 and the template Class2T, but never instantiating Class4Class1... Would there be a way to instanciate this type with through the wrapper then ? If you think to add typedef Class4Class1 myClass; in the wrapper source with the optional genWrapper.conf file, this is theoretically possible (from the compiler and linker view). But genWrapper don't support this kind of operation. A solution is to create a template reflector for your template Class2 and instanciate this template reflector in the wrapper source. Alre Manu. 2007/12/6, David Callu [EMAIL PROTECTED]: Hi Manu 2007/12/5, Emmanuel Roche [EMAIL PROTECTED] : Helle there !! I'm currently testing the osg reflection framework, so I got GenWrapper, an now I'm using it to try to build wrappers for my own libraries... Here is the situation: I've got a file typedefs.h containing something like: #include osg/Node #include osg/ref_ptr typedef osg::ref_ptrosg::Node RefNode; And when I use genwrapper with such a file, just before the output * INFO: creating file `gen/src/osgWrappers/ogl/Typedefs.cpp' I get: * WARNING: could not write a reflector for undefined type `osg::ref_ptr osg::Node ' I'm quite new to the introspection, so please correct me if I'm wrong: 1) Am I right to assume that this warning is not important and everything will be all right as long as I load the osg wrapper library as this one would provide everything needed to access the reflector for this type ? You right 2) And, if it's really the case, is this assumption dangerous because osg::ref_ptr osg::Node is a particularly common type and the same assumption would not work for something more exotic (like using osg:ref_ptr MyObjectType where MyObjectType is introspected in a first library (lib1) and this referenced type defined only in a second library... If someone sees what I mean...) ? I am not sure to see what you mean. can you explain this please David ___ 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] osgIntrospection: areArgumentsCompatible() issue
Hi Manu, You right :-). I think in the introspection concept implemented by Marco Jez, If you use a getCompatibleConstructor(...) or other low-level method in osgIntrospection, you have to know the API as same as you write your code without introspection. David 2007/12/13, Emmanuel Roche [EMAIL PROTECTED]: Hi there ! in the osgIntropsection framework, we use getCompatibleConstructor(...) or getCompatibleMethod(...), etc... to get a function considering the parameters offered. But it this process do the framework take into account the possible implicit parameter constructions ? I tried to check the sources, and as far as I understand, everything would happen in the function if it was the case (for example for the implicit convertion of a const char* object to std::string): bool Reflection::accum_conv_path(const Type source, const Type dest, ConverterList conv, std::vectorconst Type* chain, CastType castType) { // break unwanted loops if (std::find( chain.begin(), chain.end(), source) != chain.end()) return false; // store the type being processed to avoid loops chain.push_back(source); // search a converter from source StaticData::ConverterMapMap::const_iterator i = getOrCreateStaticData().convmap.find(source); if (i == getOrCreateStaticData().convmap.end()) return false; // search a converter to dest const StaticData::ConverterMap cmap = i-second; StaticData::ConverterMap::const_iterator j = cmap.find(dest); if (j != cmap.end() (j-second-getCastType() == castType)) { conv.push_back(j-second); return true; } // search a undirect converter from source to ... to dest for (j=cmap.begin(); j!=cmap.end(); ++j) { if ((j-second-getCastType() == castType) accum_conv_path(*j-first, dest, conv, chain, castType)) { conv.push_front(j-second); return true; } } return false; } ... but I can't see anything concerning the type constructors here, so I guess that to call a function you need to pass the exact type of parameter needed (with an exception for the derived classes, and inheritance system), for example: with the function void myfunc(std::string arg1, osg::Node* obj) the reflection framework would find a compatible method with the arguments : { std::string(test) , and osg::Group* myGroup } but it won't find anything with the pair { test, osg::Node* myNode }... Am I wrong ?? regards, Manu. ___ 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] Big fonts in current SVN
Hi All, After a long search in OSG SVN revision, I found this is a fonts file issue. I downdate my SVN and rebuild OSG for the revision 7648, just before integration of Text3D 7500, 7300, 7000, 6900, 6500, ~ here begin dependancy with external OpenThreads 6400, ~ here begin dependancy with external Producer 6200, 6000 problem is always present I downdate my freetype version to 2.2 2.1.10 2.1.9 2.0.9 problem is always present g finally .. I try to my own arial.ttf file provide by the package mstcorefonts-2.0.1. This package is created with a script provided by mstcorefont project. This script download font on Microsoft site and make a rpm with them. To conclude, this is a font file problem. I submit the file on osg-submissions now. Cheers David 2007/12/17, Robert Osfield [EMAIL PROTECTED]: Hi Paul, On Dec 16, 2007 7:53 PM, Paul Martz [EMAIL PROTECTED] wrote: Thanks, Robert -- Unfortunately, this change had no effect. Maybe another avenue of attack might be to add DEBUG_INFO messages to osgText to display components that contribute to the final size of SCREEN-aligned glyphs? Then we could compare my DEBUG_INFO output against yours to see if that sheds any light? Today is going to be a very busy day for me so I won't be able to go chase this up right now. A close review of the changes that David made might reveal some possibilities. Adding more debugging as you suggest might also provide more time. Something for later in the week, unless others can jump in and help. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Big fonts in current SVN
Hi Jeremy I submit patch to Robert. So coming soon If all work fine. David David 2007/12/18, Jeremy Moles [EMAIL PROTECTED]: On Fri, 2007-12-14 at 20:23 +, Robert Osfield wrote: Hi Jeremy, The alignment problem is a known problem that David (the author of the recent changes to osgText) knows about and will be looking into. Should this be fixed in 2.3? If so, I'm still seeing it in SVN. Just wondering if it's me, or still an unresolved issue... The texture based fonts themselves haven't actually changed apart from the internals being reworked in terms of the new TexBase class, the actual rendering process should be the same. Robert. On Dec 14, 2007 5:53 PM, Jeremy Moles [EMAIL PROTECTED] wrote: I would just like to jump in here and say I'm also having font problems w/ SVN as of either yesterday or the day before. My problems aren't like the ones Paul is seeing, but they're definitely new differences that weren't there Tuesday... Attached is a picture of the osghudlabel example from osgHUD. In the past, the text rendered has been nice and reasonably compact, but now there is almost an entire row of blank space between real row of text. This is the case for both my own fonts and the Times font provided w/ OSG. HOWEVER, this could just be my imagination, but was the font clarity improved with the recent changes to osgText? Even the spacing is wonky, I can swear they actually look a little crisper... not subpixel-aligned (as that would take a minimum of 3 passes so I hear), but still good. :) On Thu, 2007-12-13 at 13:11 -0700, Paul Martz wrote: Current SVN head seems to have extra-large screen oriented fonts. See the attached screen shots. This is on Windows VS8; don't know about other platforms? I get the same for screen oriented fonts in the osgtext example. While my failing eyesight certainly appreciates the increased font size, I can't help but think this is a bug. :-) Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB in SVN
Hi Robert, Have you put -W -Wall in CMAKE_CXX_FLAGS. I have a lot of warning too, but I know that your code work fine with this warning. So I never take the time to fix them. Cheers David 2008/1/9, Robert Osfield [EMAIL PROTECTED]: On Jan 9, 2008 3:45 PM, Jean-Sébastien Guay [EMAIL PROTECTED] wrote: OK, I'll probably be able to help there in the coming weeks. Great, much appreciated. I didn't mean warnings, there are some errors that should show up on any compiler, such as a method declared as bool someMethod() not returning a value... For example, in include/vpb/FileCache : bool sync() { if (_requiresWrite) write(_filename); } should be bool sync() { if (_requiresWrite) return write(_filename); return false; } or something to that effect. I would have thought gcc would give an error there... MSVC certainly does. I've just done a clean build and g++ isn't reporting any warnings whatsoever. The above is an error of course, I'll fix this. BTW, to correct the methods, I would like to know what is your standard for methods returning error? 0/false = no error and 1/true = error? Or 0/false = failed and 1/true = succeeded? Typically true for succeeded/did operation. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VBP installation: missing headers
Hi Jc Sorry :-). 2008/1/23, Jean-Christophe Lombardo [EMAIL PROTECTED]: I was trying to use the vpb::HeightFieldMapper in own application... By the way, I also have a corrected version of the vpbheightfieldmapping application. I mean one which does not load files on ledocc's computer (David tu es incorrigible !) but take filenames from command lines. If you are interested, just met me now... jcl This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. ___ 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] Cleaning out Community/JobOffers -- osg
Hi Roland BTW, I see my job request is still on JobRequests wiki pagehttp://www.openscenegraph.org/projects/osg/wiki/Community/JobRequests I create an account on the trac and login to remove it, but I haven't WIKI_MODIFY permission (don't know why). Can you remove my job request please ? Or fix my permission if you can ? Or anyone can help me ? David Callu 2009/10/26 Chris 'Xenon' Hanson xe...@alphapixel.com Roland Smeenk wrote: Done. I added the some of the rules for the jobs page in the past. Typically companies don't take the effort to remove jobs when filled so I don't take the effort to contact them and remove the jobs when they are old enough. If it's not OK they can always restore the data from the page history. Thanks Roland! Roland -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cleaning out Community/JobOffers -- osg
ok Thanks Roland David 2009/10/26 Roland Smeenk roland.sme...@tno.nl Please, contact Jose Luis Hidalgo to let him update your Wiki permissions. -- Roland -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18701#18701 ___ 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] crash with setTextureAttributeAndModes
Hi Otto We don't have enough information to solve you problem. Have you try to debug you application ? Have you an available callstack to found where you application crash ? Have you a simple program test which isolate the problem ? but more simply, is your datasetList array store texture pointer in osg::ref_ptr ? Nobody can help you with this too little description. This probably a misusing of osg code more than a bug in OSG. HTH David Callu 2009/10/27 Otto Cologne schur...@gmx.de Hi, I'm having a crash with setTextureAttributeAndModes I don't know how to fix. To explain the issue. I have a list of data sets which hold a pointer to a osg::Texture3D. The texture mixing is done in a shader and my texture update function containing the following loop is called from an update callback. Since the order of the textures can/must change i loop over the textures and do this Code: osg::StateSet* sliceState = m_sliceNode-getOrCreateStateSet(); for ( size_t i = 0; i datasetList.size(); ++i) { osg::Texture3D* texture3D = datasetList[i] )-getTexture3D(); sliceState-setTextureAttributeAndModes( i, texture3D, osg::StateAttribute::ON ); } This works just find when adding one texture after another. However when the order changes, thus overwriting a different order it crashes. So apparently I'm doing it wrong. Any help would be greatly appreciated. ... Thank you! Cheers, Otto -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18753#18753 ___ 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