Search Results

Search found 6 results on 1 pages for 'openscenegraph'.

Page 1/1 | 1 

  • Updating Textures on Runtime in OpenSceneGraph

    - by Abhishek Bansal
    I am working on a project in which i am required to capture frames from external device video and render them on openSceneGraph Node. I am also using GLSL shaders. But i dont know how to update textures on runtime. For other uniforms we need to make callbacks but do we also need to make callbacks for samplers in glsl and openSceneGraph ? My code looks like this. All i am getting right now is a black window. osg::ref_ptr<osg::Geometry> pictureQuad = osg::createTexturedQuadGeometry(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(_deviceNameToImageFrameMap[deviceName].frame->s(),0.0f,0.0f), osg::Vec3(0.0f,0.0f,_deviceNameToImageFrameMap[deviceName].frame->t()), 0.0f, 1.0f,_deviceNameToImageFrameMap[deviceName].frame->s(), _deviceNameToImageFrameMap[deviceName].frame->t()); //creating texture and setting up parameters for video frame osg::ref_ptr<osg::TextureRectangle> myTex= new osg::TextureRectangle(_deviceNameToImageFrameMap[deviceName].frame.get()); myTex->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); myTex->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR); myTex->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); myTex->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); _videoSourceNameToNodeMap[sourceName].geode = new osg::Geode(); _videoSourceNameToNodeMap[sourceName].geode->setDataVariance(osg::Object::DYNAMIC); _videoSourceNameToNodeMap[sourceName].geode->addDrawable(pictureQuad.get()); //apply texture to node _videoSourceNameToNodeMap[sourceName].geode->getOrCreateStateSet()->setTextureAttributeAndModes(0, myTex.get(), osg::StateAttribute::ON); _videoSourceNameToNodeMap[sourceName].geode->getOrCreateStateSet()->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); _videoSourceNameToNodeMap[sourceName].geode->setDataVariance(osg::Object::DYNAMIC); //Set uniform sampler osg::Uniform* srcFrame = new osg::Uniform( osg::Uniform::SAMPLER_2D, "srcFrame" ); srcFrame->set(0); //Set Uniform Alpha osg::Uniform* alpha = new osg::Uniform( osg::Uniform::FLOAT, "alpha" ); alpha->set(.5f); alpha->setUpdateCallback(new ExampleCallback()); //Enable blending _videoSourceNameToNodeMap[sourceName].geode->getOrCreateStateSet()->setMode( GL_BLEND, osg::StateAttribute::ON); //Adding blend function to node osg::BlendFunc *bf = new osg::BlendFunc(); bf->setFunction(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); _videoSourceNameToNodeMap[sourceName].geode->getOrCreateStateSet()->setAttributeAndModes(bf); //apply shader to quad _videoSourceNameToNodeMap[sourceName].geode->getOrCreateStateSet()->setAttributeAndModes(program, osg::StateAttribute::ON); //add Uniform to shader _videoSourceNameToNodeMap[sourceName].geode->getOrCreateStateSet()->addUniform( srcFrame ); _videoSourceNameToNodeMap[sourceName].geode->getOrCreateStateSet()->addUniform( alpha );

    Read the article

  • OpenSceneGraph C++ Access Violation reading location 0x00421000

    - by Kobojunkie
    Working with OpenSceneGraph, and I keep running into this violation issue that I would appreciate some help with. The problem is with the particular line below which happens to be the first in my main function. osg::ref_ptr<osg::Node> bench = osgDB::readNodeFile("Models/test.IVE"); I have my models folder right in my directory. The error is as below. Unhandled exception at 0x68630A6C (msvcr100.dll) in OSG3D.exe: 0xC0000005: Access violation reading location 0x00421000. And this is where the problem seems to be coming up. /** Read an osg::Node from file. * Return valid osg::Node on success, * return NULL on failure. * The osgDB::Registry is used to load the appropriate ReaderWriter plugin * for the filename extension, and this plugin then handles the request * to read the specified file.*/ inline osg::Node* readNodeFile(const std::string& filename) { return readNodeFile(filename,Registry::instance()->getOptions()); } I would appreciate details on how best to tackle this kind of exception message in the future. Are there tools that make this easy to debug or are there ways to capture the exact issues and fix them? I would appreciate any help with this. My ultimate goal is to learn how to better debug C++ related issues please. With this, it means reading through the compiler error list http://msdn.microsoft.com/en-us/library/850cstw1(v=vs.71).aspx is not enough

    Read the article

  • Transform between two 3d cartesian coordinate systems

    - by Pris
    I'd like to know how to get the rotation matrix for the transformation from one cartesian coordinate system (X,Y,Z) to another one (X',Y',Z'). Both systems are defined with three orthogonal vectors as one would expect. No scaling or translation occurs. I'm using OpenSceneGraph and it offers a Matrix convenience class, if it makes finding the matrix easier: http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00403.html.

    Read the article

  • Looking for a small, light scene graph style abstraction lib for shader based OpenGL

    - by Pris
    I'm looking for a 'lean and mean' c/c++ scene graph library for OpenGL that doesn't use any deprecated functionality. It should be cross platform (strictly speaking I just dev on Linux so no love lost if it doesn't work on Windows), and it should be possible to deploy to mobile targets (ie OpenGLES2, and no crazy mandatory dependencies that wouldn't port well to modern mobile frameworks like iOS, Android, etc), with a license that's compatible with closed source software (LGPL or more liberal). Specific nice-to-haves would be: Cameras and Viewers (trackball, fly-by, etc) Object transform hierarchies (if B is a child of A, and you move A, B has the same transform applied to it) Simple animation Scene optimization (frustum culling, use VBOs, minimize state changes, etc) Text I've played around with OpenSceneGraph a lot and it's pretty amazing for fixed function pipeline stuff, but I've had a few of problems using it with the programmable pipeline and after going through their mailing list, it seems several people have had similar issues (going back years). Kitware's VES looks neat (http://www.vtk.org/Wiki/VES), but VES + VTK is pretty heavy. VTK is also typically for analyzing scientific data and I've read that it's not that appropriate for a general use case (not that great at rendering a lot of objects on scene,etc) I'm currently looking at VisualizationLibrary (http://www.visualizationlibrary.org/documentation/pag_gallery.html) which looks like it offers some of the functionality I'd like, but it doesn't explicitly support mobile targets. Other solutions like Ogre, Horde3D, Irrlicht, etc tend to be full on game engines and that's not really what I'm looking for. I'd like some suggestions for other libraries that I may have missed... please note I'm not willing to roll my own solution from scratch.

    Read the article

  • CodePlex Daily Summary for Tuesday, April 27, 2010

    CodePlex Daily Summary for Tuesday, April 27, 2010New ProjectsActive Directory User Properties Change: A complete application in VS 2005 and VB.NET, for Request Request in User Details in Active Directory, with flow to HR and then to IT for approval ...AVR Terminal: A Windows application for connecting to an AVR via RS232 serial or USB-to-COM FTDI ports. Works on Arduino, Bare Bones Board, and any custom board...Battle Droids: AVR-based Network Combat!: A Battle Droid is an AVR® microcontroller running the BattleDroid firmware. This firmware turns your AVR into a lean, mean, fighting machine, and ...Camp Foundation: Camp Foundationchakma: chakma is a question - answer based web application to make people get questions from anybody around the world and being able to answer them. c...Document.Editor: Document.Editor is a multitab text editor for Windows. It includes plain and rich text format support, multi tab interface so you can edit multiple...Dot Net Marche Music Store Demo Application: This is a demo application that the DotNetMarche user gorup (www.dotnetmarche.org) use to make experiments and prepare demos for our workshopselivators: a monitor which enables the user to view the movement of the elivators in a buildingExtended SSIS Package Execute: The SSIS package execute task is flawed as it does not support passing variables. Here we have a custom task that will pass items in a dataflow as...File tools: File toolsFileExplorer.NET: FileExplorer.NET is a .net usercontrol which tries to mimic the Windows FileExplorer treeview.Kazuku: ASP.NET MVC 2 Content Management SystemKSharp Ajax Control Toolkit Library: Built ontop of the Microsoft ASP.NET Ajax Control Toolkit, this library offers enhanced versions of the controls found in the Ajax Control Toolkit....Nitrous - An Aspx ViewEngine for ASP.NET MVC: Near drop-in replacement ASP.NET ViewEngine for MVC.Open Data Protocol - Client Libraries: This is an Open Source release of the .NET and Silverlight Client Libraries for the Open Data Protocol (OData). For more information on odata, see ...ORAYLIS BI.SmartDiff: BI.SmartDiff is a helper to connect the functionality of BIDS Helper – SmartDiff to TortoiseSVN. BIDS Helper – SmartDiff helps you to get more read...RicciWebSiteSystem: soon websiteSynapse:Silverlight A Simple Silverlight Framework: Synapse:Silverlight is a simplified framework for Silverlight. It's purpose is to help developers and designers produce basic LOB solutions that do...TestProjectMB: Testing Team Foundation ServerThoughtWorks Cruise Notification Interceptor: Cruise notification interceptorThreadSafeControls: ThreadSafeControls is a C# project that greatly simplifies the process of transitioning Windows Forms applications to a multithreaded environment b...Unscrambler: Unscrambler is a multitouch WPF word game built with MVVM Light in order to show how to use the touch maniupation and inertia features included in ...Web Utilities: web utilitiesNew Releases7zbackup - PowerShell Script to Backup Files with 7zip: 7zBackup v. 1.7.1 Stable: Bug Solved : Presence of junction.exe is wrongly referred to 7z.exeAVR Terminal: AVR Terminal v0.2: Here is an Alpha-almost-BETA release of the AVR Terminal. That being said, I use it almost daily and it shouldn't break anything on your system, b...Bistro FSharp Extensions: 0.9.7.0: This is the VS 2010 release of BistroFS extensions. This release focused on usability, adding key functionality such as resource aliasing and secur...Bojinx: Bojinx Dialog Management V1.0: Stable release of the Bojinx Dialog Management library.BOWIE: BOWIE 2010: This new version works on Outlook 2007/2010 and TFS 2008/2010 RTM. Details about all features in this version on the Home Page : http://bowie.code...Catharsis: Catharsis 2.5 on catarsa.com: The Catharsis framework has finally its own portal http://catarsa.com Example - documented steps to create Web-Application http://catarsa.com/Arti...Colorful Expression: Expression Blend 3: Alpha Version, Read Issues and Installing! Colorful Expression is an add-in for Expression Blend and Expression Design that brings you the Adobe K...Colorful Expression: Expression Blend 4: Read Issues and Installing! Colorful Expression is an add-in for Expression Blend and Expression Design that brings you the Adobe Kuler and ColorLo...Courier: Version 1.0: This release includes integration with the Reactive Framework for more elegant message handling and allowing more succinct client code. Full suite...CRM 4.0 Contract Utilities: Release 1.0: Project Description List of Contract Utilities (i.e. custom workflow actions) 1. Change contract status from Active to Draft 2. Copy Contract (with...Document.Editor: 0.9.0: Whats New?: New icon set Bug fix'sDotNetNuke® Blog: 04.00.00: Minimum Required DNN Version: 4.06.02General Code organization * Converted project to .NET 3.5 * Converted solution to Visual Stud...EPiAbstractions: EPiAbstractions 1.2: Updated for EPiServer CMS 6. Only features abstractions for EPiServer CMS. For abstractions for EPiServer.Common and EPiServer.Community use versio...Fluent ViewModel Configuration for WPF (MVVM): FluentViewModel Alpha2: Added support for view model validation using FluentValidation (http://fluentvalidation.codeplex.com/) Fixed exception from Blend while in design...GArphics: Beta v0.9: Beta v0.9. Practically all of the planned features have been implemented and are available to the users. For the version 1.0 mainly just some minor...HTML Ruby: 6.22.2.1: Fixed a bug where HTML Ruby's options window will generate entries in the error log when applying option changes (regression from 6.21.8)HTML Ruby: 6.22.3: Add/remove stop spacing event listener as needed for possible fix to 4620iTuner - The iTunes Companion: iTuner 1.2.3768 Beta 3b: Beta 3 requires iTunes 9.1.0.79 or later A Librarian status panel showing active and queued Librarian scanners. This will be hidden behind the "bi...LiveUpload to Facebook: LiveUpload to Facebook 3.2.3: Version 3.2.3Become a fan on Facebook! Features Quickly and easily upload your photos and videos to Facebook, including any people tags added in W...Maintainance Schedule: Maintenance Scheduler: The first Alpha release of the project.NetSockets: NetSockets (1.2): The NetSockets library (DLL)NSIS Autorun: NSIS Autorun 0.1.2: NSIS Autorun 0.1.1 This release includes source code, application binary, and example materials.OpenSceneGraph glsl samples: OsgGlslSamples Win32 binaries: Project binary release for Windows. The effects shown are: Ambient Occlusion, Depth of Field, DoF with alpha channel, Fire effects, HDR, Light Ma...ORAYLIS BI.SmartDiff: ORAYLIS BI.SmartDiff 0.6.1: First public versionpatterns & practices - Windows Azure Guidance: Code Drop 4 - Content Complete: This release includes documentation and all code samples intended for this first guide. As before, this code release builds on the previous one an...Pex Custom Arithmetic Solver: Custom Solver Package: This is the custom solvers packaged together. To use simply include the dll in your project and add [assembly: PexCustomArithmeticSolver] to your P...PokeIn Comet Ajax Library: PokeIn v08 x86: New FeatureFrom this version forward, PokeIn will define a way between the main page and client side automaticly based to security level. Add "pub...Proxi [Proxy Interface]: Proxi Release 1.0.0.426: Proxi Release 1.0.0.426QuestTracker: QuestTracker 0.3: This release includes recurring quests! Now you can set a quest to uncomplete itself every X minutes, hours, or days! And the quests still retain t...Rensea Image Viewer: RIV 0.4.5: RIV Fix Version. You would need .NET Framework 4.0 to make it run RIVU Improved Version. With separated RIV up-loader, to upload images to Renjian...SCC Switch Provider: Provides a GUI to Switch Source Code Control Provi: Transferred from GotDotNet Workplace. Initial public Release. Downloaded ~922 times from original post.sTASKedit: sTASKedit v0.7a (Alpha): + Fixed: XOR text encoding + Fixed: adding timed rewards missing values + Fixed: occupations in clone()Synapse:Silverlight A Simple Silverlight Framework: Synapse Silverlight Alpha Release: Initial Road-map is being defined.ThoughtWorks Cruise Notification Interceptor: 1.0.0: Initial release.UDC indexes parser: UDC indexex parser Beta 2: Добавлена возможность работать с распределением определителей как если бы генератор был бы LALR(2) То что осталось: Если текстовое дополнение начи...Unscrambler: Release 1.0: Here's the first release of Unscrambler.WinXound: WinXound 3.3.0 Beta 2 for Mac OsX: New: Code Repository (for UDO and personal code) New: Format Code - Added the ability to format only the selected text of the code New: Explore...WPF Inspirational Quote Management System: Release 1.2.2: - Fixed issue some users were having when the application is minimised.Most Popular ProjectsRawrWBFS ManagerAJAX Control ToolkitSilverlight Toolkitpatterns & practices – Enterprise LibraryMicrosoft SQL Server Product Samples: DatabaseWindows Presentation Foundation (WPF)ASP.NETMicrosoft SQL Server Community & SamplesPHPExcelMost Active Projectspatterns & practices – Enterprise LibraryRawrGMap.NET - Great Maps for Windows Forms & PresentationParticle Plot PivotBlogEngine.NETNB_Store - Free DotNetNuke Ecommerce Catalog ModuleFarseer Physics EngineIonics Isapi Rewrite FilterN2 CMSDotNetZip Library

    Read the article

1