[osg-users] Aspect Ratio Issue
Hi, I also tried posting on the forums but they seem out of order. I'm trying to render a scene onto a UIView that's part of a UIViewController, so that I can have iOS UI overlay on top of the OSG view. I tried to achieve this by using the GraphicsWindowIOS class and binding it to my internal view. This works fine except for one issue, the scene seems stretched horizontally (in landscape orientation), even though its rendered at fullscreen and there's no resizing happening. This is the relevant part of the code I'm using: [code] osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits; CGRect lFrame = [self.osgView convertRect:self.osgView.frame fromView:[UIApplication sharedApplication].keyWindow]; unsigned int w = lFrame.size.width * [[UIScreen mainScreen] scale]; unsigned int h = lFrame.size.height * [[UIScreen mainScreen] scale]; osg::DisplaySettings* settings = osg::DisplaySettings::instance(); settings-setNumMultiSamples(4); osg::ref_ptrosgViewer::GraphicsWindowIOS::WindowData windata = new osgViewer::GraphicsWindowIOS::WindowData(self.osgView, osgViewer::GraphicsWindowIOS::WindowData::LANDSCAPE_LEFT_ORIENTATION, -1.0f); // Setup the traits parameters traits-x = lFrame.origin.x * [[UIScreen mainScreen] scale]; traits-y = lFrame.origin.y * [[UIScreen mainScreen] scale]; traits-width = w; traits-height = h; traits-windowDecoration = false; traits-doubleBuffer = true; traits-sharedContext = 0; traits-setInheritedWindowPixelFormat = false; traits-inheritedWindowData = windata; // Create the Graphics Context osg::ref_ptrosg::GraphicsContext graphicsContext = osg::GraphicsContext::createGraphicsContext(traits.get()); _root = new osg::MatrixTransform(); osg::ref_ptrosg::Node model = (osgDB::readNodeFile("full.ive")); _root-addChild(model); _viewer = new osgViewer::Viewer(); if(graphicsContext) { _viewer-getCamera()-setGraphicsContext(graphicsContext); _viewer-getCamera()-setViewport(new osg::Viewport(traits-x, traits-y, traits-width, traits-height)); } _viewer-setSceneData(_root.get()); _cameraManipulator = new osgGA::MultiTouchTrackballManipulator(); _viewer-setCameraManipulator(_cameraManipulator); _viewer-realize(); // draw a frame _viewer-frame(); [/code] I noticed that if I do not use a graphics context (for example by commenting out the setGraphicsContext line) the view appears on the entire screen (like before) but with the correct aspect ratio, again, even though there is seemingly no difference in the view's size. I'm relatively new to OSG and I've been struggling with this issue for a couple of days now so any tips on how to fix it will be appreciated. Thank you!Walla! Mail - Get your free unlimited mail today ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Aspect Ratio Issue
Hi Hagai? Hanan? Could you sign with the name so we know how to address you :-) On 30 July 2013 08:41, Hagai Hanan quad...@walla.com wrote: I also tried posting on the forums but they seem out of order. I will raise a disucssion about the issues this week. Previous problems have been down to lack of volunteers to moderate the forum so it could be the same problem. I don't personally manage the forum, just the mailing list so I can't directly influence it, it's really down to the community to support it. I'm trying to render a scene onto a UIView that's part of a UIViewController, so that I can have iOS UI overlay on top of the OSG view. I tried to achieve this by using the GraphicsWindowIOS class and binding it to my internal view. This works fine except for one issue, the scene seems stretched horizontally (in landscape orientation), even though its rendered at fullscreen and there's no resizing happening. ... My guess is that you aren't setting the Camera's projection matrix to fit the aspect ratio of your window and will just be getting the defaults. The Camera::setProjectionMatrixAsPerspective(..) method is what controls the views aspect ratio, from the include/osg/Camera header: /** Create a symmetrical perspective projection, See OpenGL gluPerspective documentation for further details. * Aspect ratio is defined as width/height.*/ void setProjectionMatrixAsPerspective(double fovy,double aspectRatio, double zNear, double zFar); Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgLeap Leap Motion Integration
Hello, On Mon, Jul 29, 2013 at 10:03 PM, Johannes Scholz osg-supp...@vtxtech.net wrote: Hi, my development environment is MSVC++ 2008 Express. Compiler support for 2010 to 2012 and GCC is planned, but that are topics for the next days. Jan, could you please send you CMakeCache.txt so that I may review your settings? Thanks in advance! I have checked out your current SVN to make sure I don't send you some of my hacks I was trying yesterday and now it compiles after there is proper Release/Debug support. I guess that the OSG macros you are using are not happy with the debug;foo_d.lib;optimized;foo.lib format I have used for the LEAP_LIBRARY variable before. However, I had to fix this: Index: CMakeLists.txt === --- CMakeLists.txt (révision 11) +++ CMakeLists.txt (copie de travail) @@ -55,6 +55,7 @@ ${OPENGL_INCLUDE_DIR} ${OSG_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src +${CMAKE_SOURCE_DIR}/include ) ADD_SUBDIRECTORY(src) Without adding of the include folder the compiler won't find the osgLeap/LeapManipulator header. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgLeap Leap Motion Integration
Hi Jan, today I installed both MSVC++ 2010 and MSVC++ 2012 and I had the include directory missing as well. The include fix is now patch and committed. osgLeap now compiles on MSVC++ 2008, 2010 and 2012 (x86). Building x64 is tested on 2008, only. I would appreciate anybody confirming x64 compilation works on 2010 or 2012, but they should work either. Thank you! Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55483#55483 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Solving forum.openscenegraph.org problems
Hi All, While I don't use or am involved in the admin/maintenence of the forum.openscenegraph.org I am aware of the increase problems that users of the forum are having. New users in particular seem hardest hit waiting for approval. I believe the issue stems from the lack of moderators to manage the forum. Art Tevs the creator of the forum now working in a job that doesn't involve the OSG we no longer have anyone able to keep things ticking on the forum day in day out. Calls or moderators and a replacement admin for the forum have gone out over the last few years and apart from one person stepping forward the calls have gone ignored by the forum community. Unfortuantely that lone person who volunteered does not look to be still actively moderatoring the forum, not suprising really as it's a job that really needs to be shared amoungst the community. The situation is pretty sad, both from how bad an experience that forum users now get and just how little effort forum users themselves are willing to help manage the forum. Not only will this be damaging the forum users experience but also will damanging the OSG project as a whole, great community support is something that the OSG used to known for, but now the majority of new users who go the forum route will be get stonewalled by the lack of moderator to approve and manage new users and threads. The OSG-3.2 release was the quietest I've ever seen in terms of community activity testing out release candidates, partly this will be down to summer holidays, but I also believe it's likely due to problems with forum. Less testing means more build breaks and bugs get through the net so long term this is likely to result in a real struggle to maintain the quality of software for all users. Fixing support issues will help testing and debugging process and help drive quality improvements. What to do? Short term we need volunteers that can help out with moderating the forum and start clearing the backlog. If you want to volunteer then please email me directly, or step forward on this thread. I don't personal know the details of what moderating exactly involves or how to set you up so I'll have to defer to Art Tevs or others that have done it in the past. What I do know is that lots of people sitting on their hands expecting others to pick up the slack hasn't worked and won't work. The short term route is to fall back to the osg-users mailing list, over the years has been very reliable with just a few outages due to server issues, and while I'm the admin it really doesn't take me much work to maintain. The OSG community grew up around the mailing list and while new users seem to prefer using forums the mailing list has remained a back bone. In terms of falling back perhaps we should not be listing the forum on website, or at least notifiing it's currently having problems and point new users and existing users of the forum to the mailing list to get reliable support. Longer term I'm open to suggestions. I believe having one community for support is important - I simply don't have the time to do support on both mailing list and forum. Personally I really dislike using forums - I find them unproducttive and disjointed, any time I get a private message through the forum I hate it as I have to jump through hoops just to answer what should be just a couple clicks if it had been an email. The dual forum - mailing list that we have had when it worked well was pretty impressive with posts to the forum and mailing list being cross posted reasonably reliable. There have been problems though - attachments are unreliable on the forum especially when being posted to the mailing list, also forum users tend to converse in slightly different ways to way people do on mailing lists. Might there be better mailing list/forum solutions out there? I'm open to suggestions, so let's here what you think and what you'll be able to help with :-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [ANN] Visual Studio 2012 Binaries Available
Hello dear OSG-community, I have pre-built binaries for OSG 3.0.1 and 3.2.0 for Visual Studio 2012 in both 32 and 64-bit configurations (release and debug) available for download along with 3rd Party libraries suitable for building on your own. http://www.helleboreconsulting.com/index.php/open-source/openscenegraph Best regards, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55487#55487 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Solving forum.openscenegraph.org problems
Robert, All, I've been using OSG for a little more than a year now, and started to post on the mailing list/forum (tried to :P) this week. Before that I was using google to look for answers about OSG, and from what I've experienced, search results lead more often to the forum than to content of the mailing list, so IMHO removing the forum would not be a good idea. But I agree that advertising a feature that is not working may make new users turn around, as younger ppl are more used to forums and are afraid of old-shool mailing list (I am :P). I do not have a better alternative solution to suggest, unfortunately (at least for now). -- Alexandre Vaillancourt 2013/7/30 Robert Osfield robert.osfi...@gmail.com Hi All, While I don't use or am involved in the admin/maintenence of the forum.openscenegraph.org I am aware of the increase problems that users of the forum are having. New users in particular seem hardest hit waiting for approval. I believe the issue stems from the lack of moderators to manage the forum. Art Tevs the creator of the forum now working in a job that doesn't involve the OSG we no longer have anyone able to keep things ticking on the forum day in day out. Calls or moderators and a replacement admin for the forum have gone out over the last few years and apart from one person stepping forward the calls have gone ignored by the forum community. Unfortuantely that lone person who volunteered does not look to be still actively moderatoring the forum, not suprising really as it's a job that really needs to be shared amoungst the community. The situation is pretty sad, both from how bad an experience that forum users now get and just how little effort forum users themselves are willing to help manage the forum. Not only will this be damaging the forum users experience but also will damanging the OSG project as a whole, great community support is something that the OSG used to known for, but now the majority of new users who go the forum route will be get stonewalled by the lack of moderator to approve and manage new users and threads. The OSG-3.2 release was the quietest I've ever seen in terms of community activity testing out release candidates, partly this will be down to summer holidays, but I also believe it's likely due to problems with forum. Less testing means more build breaks and bugs get through the net so long term this is likely to result in a real struggle to maintain the quality of software for all users. Fixing support issues will help testing and debugging process and help drive quality improvements. What to do? Short term we need volunteers that can help out with moderating the forum and start clearing the backlog. If you want to volunteer then please email me directly, or step forward on this thread. I don't personal know the details of what moderating exactly involves or how to set you up so I'll have to defer to Art Tevs or others that have done it in the past. What I do know is that lots of people sitting on their hands expecting others to pick up the slack hasn't worked and won't work. The short term route is to fall back to the osg-users mailing list, over the years has been very reliable with just a few outages due to server issues, and while I'm the admin it really doesn't take me much work to maintain. The OSG community grew up around the mailing list and while new users seem to prefer using forums the mailing list has remained a back bone. In terms of falling back perhaps we should not be listing the forum on website, or at least notifiing it's currently having problems and point new users and existing users of the forum to the mailing list to get reliable support. Longer term I'm open to suggestions. I believe having one community for support is important - I simply don't have the time to do support on both mailing list and forum. Personally I really dislike using forums - I find them unproducttive and disjointed, any time I get a private message through the forum I hate it as I have to jump through hoops just to answer what should be just a couple clicks if it had been an email. The dual forum - mailing list that we have had when it worked well was pretty impressive with posts to the forum and mailing list being cross posted reasonably reliable. There have been problems though - attachments are unreliable on the forum especially when being posted to the mailing list, also forum users tend to converse in slightly different ways to way people do on mailing lists. Might there be better mailing list/forum solutions out there? I'm open to suggestions, so let's here what you think and what you'll be able to help with :-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list
Re: [osg-users] Solving forum.openscenegraph.org problems
Hi Alexandre, On 30 July 2013 15:00, Alexandre Vaillancourt alexandre.vaillancourt.l...@gmail.com wrote: I've been using OSG for a little more than a year now, and started to post on the mailing list/forum (tried to :P) this week. That's an impressive amount of time to work without support :-) Before that I was using google to look for answers about OSG, and from what I've experienced, search results lead more often to the forum than to content of the mailing list, so IMHO removing the forum would not be a good idea. All forum traffic is mirrored on the mailing list and visa-versa so in theory the same content should be available in the mailing list archives as they are on the forum. I'd guess that the difference will be the search engines are listing the forum content higher, the non forum content should be their too. But I agree that advertising a feature that is not working may make new users turn around, as younger ppl are more used to forums and are afraid of old-shool mailing list (I am :P). Be afraid, be very afriad some might even email you!!! ;-) Funny how different generations of internet users have differnet affinities. I wonder if this might also be why volunterring to help might also be an aspect of this new generation that is differnet. Everyone knows how to use but not contribute directly to management of forums. It does just require rolling ones sleeve up to learn new stuff like using email! Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Solving forum.openscenegraph.org problems
Funny how different generations of internet users have differnet affinities. Perhaps some people just prefer forums because they don't know about email filters and don't have an email reader with threading support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Solving forum.openscenegraph.org problems
On Tue, Jul 30, 2013 at 5:53 PM, Daniel Trstenjak daniel.trsten...@gmail.com wrote: Funny how different generations of internet users have differnet affinities. Perhaps some people just prefer forums because they don't know about email filters and don't have an email reader with threading support. Ehm, Thunderbird is both free and has decent threading. GMail works quite well too. On the other hand, a lot of people have never used a mailing list before, many younger people haven't even seen a classic e-mail (or usenet!) client at all - e-mail today being synonymous with things like GMail, Yahoo, Hotmail and other stuff that grandma uses - normal people write a message on the Facebook wall instead. So doing things like having to use a crummy web interface trying to emulate a somewhat passable text editor to post a message somewhere that is trying the darnedest to chase the usability of an Usenet reader from 20 years ago (and still frequently fails at it) is normal for them, because that is how everyone does it everywhere. E.g. I haven't seen a gaming community use anything else but a forum for their communication. The Cyanogen project (custom Android ROM for mobile phones) is even releasing their software by posting into a forum - that makes it wonderfully easy to find bugs for the current release from the page 1 at the end of a 1000+ pages long thread accumulated over months and years ... One thing that doesn't help with the mailing lists is that generally the archives and searching of them is often terrible. There are exceptions like GMane, but few people know about them and use them. If the forum users don't step up to help run the forum, I would suggest to bite the bullet and shut it down. Granted, that isn't going to be popular, but I think few people can be expected to sit on the forum all day long to deal with the issues when we have jobs to do ... Best regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgLeap Leap Motion Integration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/30/2013 01:12 PM, Johannes Scholz wrote: Hi Jan, today I installed both MSVC++ 2010 and MSVC++ 2012 and I had the include directory missing as well. The include fix is now patch and committed. osgLeap now compiles on MSVC++ 2008, 2010 and 2012 (x86). Building x64 is tested on 2008, only. I would appreciate anybody confirming x64 compilation works on 2010 or 2012, but they should work either. x64 works for me on 2012. Well, works - as much as the Leap itself works, the device is really underwhelming after all that hype. Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iD8DBQFR9/Ngn11XseNj94gRAjJBAKDfKnU5Z4g08wkDfNRo2o7ry8Az4wCgi7lo QZSgEeSoCvtMwG/fYAtcaT4= =BnPQ -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgLeap Leap Motion Integration
Jan Ciger wrote: x64 works for me on 2012. Well, works - as much as the Leap itself works, the device is really underwhelming after all that hype. Actually that's true it gets kind of hyped. From what I learned by now the tracking is not that stable and reliable as one in an industrial field or even a gamer might have wished. I work in a Virtual Reality environment where the ball-marker-based infrared ART Tracking is still state of the art since years. It is very robust and reliable while delivering good precision, altought not on a sub-mm level. Now on the other hand its very expensive, we're talking about many 1000 Euros. The Leap costs 1-2% of that solution, so some kind of drawback might be acceptable. ButI think although the Leap is not perfect, you can make great stuff when using the Leap correctly. Finger tracking is not that reliable, but hand tracking is quite good I think. After some training I can now use the LeapManipulator to navigate through my models reliably. But it can do more... I will try to make some demos of what I have in mind in the next weeks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55493#55493 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Solving forum.openscenegraph.org problems
Hi Robert et al, I would love for the forum to keep working. The forum is usually my goto place to find new information about OpenSceneGraph and I actually like the format better then the e-mail lists. Although the current state of the forum makes me a bit sad for the new users. I have been contemplating volunteering to do some basic moderation, ie. proof reading the first messages that users post before getting forum approval. My main hesitation has been, as I guess for all of you, lack of time. I also tend to work with OSG related project in irregular time periods. I have actually been working with OSG on and off since 2002. (My first experience with OSG was at a presentation that Robert held in Stockholm in November 2001). I usually work with it for a month or two and then I am away from the community for a couple of months doing other projects. The forum is perfect for this on-and-off lifestyle since it doesn't clog up my e-mail folders when I am inactive as a OSG user. (Registering and unregistering from the email lists became rather tedious.) So rather then letting the forum die, I would like to volunteer as moderator. Although I probably would be a moderator that would be rather inactive during some periods. But if there are more moderators our inactive periods hopefully shouldn't overlap too much. TLDR; I hereby volunteer as a forum moderator. Best regards, Björn Blissing -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55494#55494 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Solving forum.openscenegraph.org problems
Hi Robert, I'm currently working on the Chinese translation of OpenGL Programming Guide 8th Edition, as well as some client projects. It's heavy work for me so sorry for not being with the community these days. Fortunately I'm going to have a few more time later and will be back for more tests and feature addtions :-) In 2008, I started a Chinese OSG forum (bbs.osgchina.org), and have been managing it until now, which has about 7 housand members and more than 50 thousand posts. My experience is simply that you can hardly satisfy everyone who has questions in the forum. In most cases, askers will only put the questions like 'why my scene is black' or 'how to implement 3DGIS software', and it is nearly impossible to give a complete answer. I will always ignore such topics or just give an one-line answer to save their time and my time at that time. :-) We had better support forums and even social networks for OSG users, especially those young men, to get in touch with each other. This will also help OSG itself to grow more quickly and get more attentions when related news are coming. Release news will also receive more feedbacks if published on forum. In fact, in my opinion, the forum should not be somewhere filled with questions and answers, but a place for sharing ideas and achievements, making friends, and looking for opportunities. We need not only moderators but also active members to publish news, feature suggestions, discussions and project galleries in the forum, to attract more people to attend and encourage them to share their ideas, too. Wang Rui 2013/7/31 Björn Blissing bjorn.bliss...@vti.se Hi Robert et al, I would love for the forum to keep working. The forum is usually my goto place to find new information about OpenSceneGraph and I actually like the format better then the e-mail lists. Although the current state of the forum makes me a bit sad for the new users. I have been contemplating volunteering to do some basic moderation, ie. proof reading the first messages that users post before getting forum approval. My main hesitation has been, as I guess for all of you, lack of time. I also tend to work with OSG related project in irregular time periods. I have actually been working with OSG on and off since 2002. (My first experience with OSG was at a presentation that Robert held in Stockholm in November 2001). I usually work with it for a month or two and then I am away from the community for a couple of months doing other projects. The forum is perfect for this on-and-off lifestyle since it doesn't clog up my e-mail folders when I am inactive as a OSG user. (Registering and unregistering from the email lists became rather tedious.) So rather then letting the forum die, I would like to volunteer as moderator. Although I probably would be a moderator that would be rather inactive during some periods. But if there are more moderators our inactive periods hopefully shouldn't overlap too much. TLDR; I hereby volunteer as a forum moderator. Best regards, Björn Blissing -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55494#55494 ___ 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] OpenGL ES 2.0 on windows
Hi Robert, working with OpenGL ES 2.0 with Angle ( I also checked ATI OpenGL ES SDK ) with osg 3.2 I have a warning Detected OpenGL error invalid enumerant on this line in State.cpp glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords); ( in following part of code in function void State::initializeExtensionProcs() ) if ( osg::getGLVersionNumber() = 2.0 || osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) || OSG_GLES2_FEATURES) { glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits); glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords); } I asked Angle project list that maybe they are wrong here ( but still ATI ES SDK also lacks GL_MAX_TEXTURE_COORDS ) and they responded they are not, the GL_MAX_TEXTURE_COORDS is underfined for OpenGL ES 2.0 So, possibly here there should be a code like if ( osg::getGLVersionNumber() = 2.0 || osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) || OSG_GLES2_FEATURES) { glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits); if(OSG_GLES2_FEATURES) { _glMaxTextureCoords = _glMaxTextureUnits; } else glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords); } ? Best regards Sergey ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Node visitor pattern
Hi. I finally started to implement the described Timer functionality and was faced with almost the same question: how do I subscribe to osgViewer each frame update? Should I add my class to osgViewer::ViewerBase::setUpdateVisitor? 2012/6/22 Robert Osfield robert.osfi...@gmail.com Hi Michael, On 22 June 2012 10:30, michael kapelko korn...@gmail.com wrote: Am I understanding correctly that Object::STATIC is a flag that says something won't be traversed/updated each frame (based on some internal decision), and Object::DYNAMIC says: traverse/update it each frame? DataVariance on Node's isn't used during the normal frame traversals like update, event and cull traverals, it's only used as hint to the osgUtil::Optimizer traversals to know whether it can optimize away/modify nodes for scene graph optimization purposes. However, the DataVarinace on StateSet and Drawable is used during draw dispatch when using the DrawThreadPerContext and CullThreadPerCameraDrawThreadPerContext threading models - it's used to prevent the next frame from commensing while there are still dyanmic leaves to be dispatched to OpenGL. 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] Node visitor pattern
Hi Micahel, On 31 July 2013 05:17, michael kapelko korn...@gmail.com wrote: Hi. I finally started to implement the described Timer functionality and was faced with almost the same question: how do I subscribe to osgViewer each frame update? Should I add my class to osgViewer::ViewerBase::setUpdateVisitor? There are several ways the best will depend upon your specific needs. One approach would be to implement your own frame() loop rather than rely upon run(), in this frame() loop you could updating your timer code right after the call to viewer.advance(); Another approach would be to subclass osgViewer and override the updateTraversal() method. Another would be to use an update callback attached to a node in the scene graph. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL ES 2.0 on windows
Hi Sergey, You suggested change looks reasonable. Curious that others including myself haven't spotted this error so I can only presume that quite a few GLES implementations do indeed included support for GL_MAX_TEXTURE_COORDS. Once you have the code working cleanly could you post the modified file to osg-submissions. Thanks, Robert. On 31 July 2013 04:18, Sergey Kurdakov sergey.fo...@gmail.com wrote: Hi Robert, working with OpenGL ES 2.0 with Angle ( I also checked ATI OpenGL ES SDK ) with osg 3.2 I have a warning Detected OpenGL error invalid enumerant on this line in State.cpp glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords); ( in following part of code in function void State::initializeExtensionProcs() ) if ( osg::getGLVersionNumber() = 2.0 || osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) || OSG_GLES2_FEATURES) { glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits); glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords); } I asked Angle project list that maybe they are wrong here ( but still ATI ES SDK also lacks GL_MAX_TEXTURE_COORDS ) and they responded they are not, the GL_MAX_TEXTURE_COORDS is underfined for OpenGL ES 2.0 So, possibly here there should be a code like if ( osg::getGLVersionNumber() = 2.0 || osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) || OSG_GLES2_FEATURES) { glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits); if(OSG_GLES2_FEATURES) { _glMaxTextureCoords = _glMaxTextureUnits; } else glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords); } ? Best regards Sergey ___ 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] OpenGL ES 2.0 on windows
Hi Robert, Once you have the code working cleanly could you post the modified file to osg-submissions. ok, checking now. Regards Sergey On Wed, Jul 31, 2013 at 9:29 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Sergey, You suggested change looks reasonable. Curious that others including myself haven't spotted this error so I can only presume that quite a few GLES implementations do indeed included support for GL_MAX_TEXTURE_COORDS. Once you have the code working cleanly could you post the modified file to osg-submissions. Thanks, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org