[osg-users] Video display problem on Andoid
Hi, I am trying to play the video on android device. I did the coding as follows. in ".H" file. Code: osg::ref_ptr geode; osg::ref_ptr mVideoTexture; osg::Image* img; osg::ref_ptr videoStream[2]; osg::ref_ptr mtForMarker[2]; osg::ref_ptr modelSwitch; In ".CPP" file Code: int idx=0; img = osgDB::readImageFile("1.mp4.mpeg"); videoStream[idx] = dynamic_cast(img); if (videoStream[idx].valid()) { LOG( "Got movie"); videoStream[idx]->setLoopingMode( osg::ImageStream::NO_LOOPING); videoStream[idx]->seek(0); videoStream[idx]->play(); } else { LOG( "No movie!"); } aspectRatio = (float)img->t() / (float)img->s(); videoWidth = img->s(); videoHeight =videoWidth * aspectRatio; mVideoTexture = new osg::Texture2D; geode = new osg::Geode; mVideoTexture->setImage( videoStream[idx].get() ); geode->addDrawable(osg::createTexturedQuadGeometry( osg::Vec3(0.0f, 0.0f, 0.0f), osg::Vec3(videoWidth, 0.0f, 0.0f), osg::Vec3(0.0f, 0.0f, videoHeight) )); geode->getOrCreateStateSet()->setTextureAttributeAndModes(0, mVideoTexture, osg::StateAttribute::ON ); mtForMarker[idx] = new osg::MatrixTransform(); mtForMarker[idx]->addChild(geode.get()); modelSwitch->addChild(mtForMarker[idx]); With this code the video displayed in a small size (like 50X50) around the centre of the device (Not exactly at the centre of the device). The original video size is 640X480. Video is also displaying in upside down. I am sung ffmpeg plug in for android. Can you please suggest me what could be the mistake. ... Thank you! Cheers, Koduri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55425#55425 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] virtual file system code
For what it's worth, here's a brain dump of the current virtual file system code in my game. This week I've been trying to finalize this and put some decent comments on it. It lets you specify archives (I've only tested .zip files) in OSG_FILE_PATH just like you would specify directories. I thought it might be useful to anyone trying to do the same. The attachment includes the patch I'm using to add this functionality to OSG 3.2. It also includes an attempt at implementing this functionality with callbacks and no mods to OSG. However, this method has too many ugly little workarounds, so I don't like it very much. I included it because it has some decent notes about the gotchas you'll run into with this method. -- Terry Welsh www.reallyslick.com virtualfilesystem.tar.gz Description: GNU Zip compressed data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Shadow camera and MRTs
Hi All, I'm looking at extending the VDSM functionality to write some extra info to additional RTs. So far, everything is working fine except the fact that fragments outside of the shadowed area of the shadow map aren't sent to the shader. This makes sense, as the rest of the non-casting geometry would have been culled, but I'm trying to write the other RTs for *all* of the visible geometry from the shadow camera view. Does this sound reasonable without removing the culling? Or would I need to do two passes - one pre-cull, one post? We are using our own shader and the current VDSM implementation. ... Thank you! Cheers, Garrett -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55423#55423 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OpenSceneGraph-3.2.0 stable release tagged!
Hi All, This afternoon I tagged the 3.2.0 stable release, and just now have begun updating the OSG website. We don't have any binaries yet, if you will be building some let me know and I can provide links to them. Press release (a bit combled together, feel free to suggest revisions ;-) http://www.openscenegraph.org/index.php/community/press-releases/143-openscenegraph-3-2-release Downalods page: http://www.openscenegraph.org/index.php/download-section/stable-releases Source code: Zip file containing source code : OpenSceneGraph-3.2.0.zip Subversion tag for 3.2.0 : svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.2.0 OpenSceneGraph Key deliverables: Improvements to OpenGL ES 1.1 and 2.0 support, including platform specific extensions Revamped QTKit, imageio and quicktime plugins for improved support of iOS and OSX New avfoundation plugin for reading video on iOS and OSX New ktx plugin for reading Khronos Texture Files New OpenGL extensions support including compute shaders, tessellation shaders, integer array formats and associated Vec* classes, primitive restart Improvements to osgManipulator NodeKit that introduce new manipulators and improve flexibility and customizability Updates to osgQt to support Qt5 and provide better support for Qt4 New osgGA::Device base class for recieving from and sending events to both real and virtual devices in a generic, extensible way New ZeroConf, RestHTTP and OSC plugins to enable remote control of applications such as controlling desktop systems from tablets and phones Improvements to osgVolume NodeKit and DICOM plugin for better medical visualization New TrackVis .trk track files plugin for the visualization of brain scans. Improvements to osgPresentation NodeKit and Present3D application to make it possible to create non-linear interactive, remote controlled shows New osgViewer::ViewConfig class with range of implementations to make it easier to configure viewers for advanced rendering support Support for GPU based Keystone correction with onscreen editing making it possible to use low cost projectors in off axis setups Clean up of osg::Geometry class removing all deprecated slow path API's resulting in a smaller and faster Geometry class Addition of deprecated_osg namespace and deprecated_osg::Geometry class that provides deprecated BIND_PER_PRIMITIVE and array indices APIs to add with porting New ViewDependentShadowMap shadow rendering class that combines enables robust combining of parallel split and perspective shadow map techniques Updates of plugins to work with the latest FBX, ffmpeg, NVTT, OpenVRML, LibVNCServer releases Many thanks to everyone that has contributed to this release, both in coding and testing/debugging. You've been awesome!! Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgdb_shp plugin's XBaseParser may have aerror
Hi ChaosWong, On 24/07/2013 2:59, ChaosWong wrote: > I work under windows, and which platform do you work? Linux and OS X. > so I think it's never return 0, because 0 is usually represent "Standard > input (stdin)". > If function fail, it should return -1, i think. Yes, it will return -1 on error, but it can return 0 as well, if stdin/stdout/stderr are closed (like for a daemon). But that wasn't my main point, the solution that you and Robert worked out is correct (no close in the error case). After reading the code it is clear that 'parse(fd)' will actually close the file descriptor when it's done reading. Unless an error occurred, in which case the fd will never be closed and effectively leak. Also, if it succeeds with fd=0 it will close stdin! Funny things can happen when you do that. I realize that you didn't write the code but thought that if you're doing modifications in that area this might be worth fixing as well. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Winding up to OpenSceneGraph-3.2 stable release
Hi All, I now update the NEWS.txt to reflect the major feature deliverables for 3.2, made a couple of minor revisions today in response to reports from user testing but as no major issues have been raised am working on the assumption that the code base is pretty well ready for release. If there are any issues please raise them now as I'm pretty well ready ;-) Thanks, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org