Search Results

Search found 7104 results on 285 pages for 'dynamic usercontrols'.

Page 172/285 | < Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >

  • 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

  • Java JIT compiler compiles at compile time or runtime ?

    - by Tony
    From wiki: In computing, just-in-time compilation (JIT), also known as dynamic translation, is a technique for improving the runtime performance of a computer program. So I guess JVM has another compiler, not javac, that only compiles bytecode to machine code at runtime, while javac compiles sources to bytecode,is that right?

    Read the article

  • Linqbuilder Query with an OrderBy

    - by Renshai
    I have a 1 : M relationship. I built a dynamic query based on input from users to return the listing of parents entities along with their children (using predicate builder: (done successfully new TDataContext().Ps.Where(predicate) )... but need to order the results by a field found only on the child entities. I'm at a loss: new TDataContext().Ps.Where(predicate).OrderBy(p = p.Cs. ??) where Ps = parents collection relationship with Cs = child entities any help appreciated.

    Read the article

  • jQuery - Set min-height of div

    - by Kenny Bones
    This is probably really easy for most of you. But I'm in need of a small snippet that looks up the current height of a div (the div has a dynamic height based on the content inside it) and then set that value in the css class's min-height value. Basically what this means is that I want this container to have it's min-height to be the exact same value as it's current height. This is probably a quick one :)

    Read the article

  • Flex Button Size Setting For Implementing Multilanguage

    - by user961496
    I'm creating a flex app with multilanguage support. But there's a problem with the design when I try to implement multilanguage support. For example : In Chinese : ?? In English : Good Morning The button size is not enough when I change the language to English. Although I set the button width with dynamic size, but the button will closing the objects around it Code is here http://pastebin.com/7fDB2VU2

    Read the article

  • What is the best 3-D technology for the "Online Room Planner" site?

    - by Omega
    The main user-case is: Create the 2D floor plan See the 3D view of the room in colors and in dynamic lighting (switching on and off the lamps) Select the furniture from the large library of predefined samples. Change the color and texture of the furniture samples. Create the photos of the 3D room view from different points. Also user can move and turn the camera in the room and discover the view.

    Read the article

  • How do I do a cross domain GET of an XML feed in a WordPress plugin?

    - by MM.
    I would like to use AJAX to display dynamic content via my wordpress plugin. The data source is an xml feed from a remote domain (not owned by me). I have tried using JQuery plugins that use YQL to do cross domain Ajax calls; however, they are geared towards json and tend to return the data to me in a mangled state. My question is, is there a way of obtaining an xml feed using ajax from a remote domain?

    Read the article

  • Iterating through struct fieldnames in MATLAB.

    - by Noio
    My question is easily summarized as: "Why does the following not work?" teststruct = struct('a',3,'b',5,'c',9) fields = fieldnames(teststruct) for i=1:numel(fns) fns(i) teststruct.(fns(i)) end output: ans = 'a' ??? Argument to dynamic structure reference must evaluate to a valid field name. Especially since teststruct.('a') does work. And fns(i) prints out ans = 'a'. I can't get my head around it.

    Read the article

  • How do I output installation status using gtk in c?

    - by Runner
    int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); gtk_main (); return 0; } The above is just a empty winform,I want to output dynamic information in it(not editable), how should I do that?

    Read the article

  • XHTML/CSS layout to ASP.NET

    - by Zai
    I am trying to build a website consist of three pages but with a contact form using ASP.NET. Now that I have build the layout and all xhtml/css and some javascript and next I wan to convert it so that it's dynamic and can send email. Do I need to convert it using Visual Studio or just rename files from .html to .aspx? and then create a form in Visual studio?... Confused :(

    Read the article

  • How to remove strings from a compiled binary (.so)

    - by Stéphane
    How do I remove strings from / obfuscate a compiled binary? The goal is to avoid having people read the names of the functions/methods inside. It is a dynamic library (.so) compiled from C++ code for Android with the NDK tools (includes GCC) I compile with -O3 and already use arm-eabi-gcc -g mylib.so to remove debugging symbols, but when I do strings mylib.so all the names of the functions/methods are still readable.

    Read the article

  • Creating Tests at Runtime

    - by James Thigpen
    Are there any .NET testing frameworks which allow dynamic creation of tests without having to deal with a hokey Attribute syntax? Something like: foreach (var t in tests) { TestFx.Run(t.Name, t.TestDelegate); } But with the test reporting as you would expect... I could do something like this with RowTests et al, but that seems hokey.

    Read the article

  • How to submit new url's to google ?

    - by stighy
    Hi guys, i've a questions. Hope you can help me : i would like to know what's the best way to submit new urls to google. My website create a dynamic sitemap but i don't know if i have to submit each time to google, or if google get my sitemap daily Thanks in advance

    Read the article

  • Adding a Image to UITable View Cell

    - by Graeme
    Hi, I have a table in which I want a dynamic image to load in at the left-hand side. The table needs to use an IF statement to select the appropriate image from the "Resources" folder, and needs to be based upon [dog types]. The [dog types] is extracted from an RSS feed, and so the image in the table cell needs to match the each cell's [dog types] tag. I suspect I need to use - (UIImage *)imageForTypes:(NSString *)types { to do such a thing. Thanks.

    Read the article

  • How can you remove a Criterion from a criteria?

    - by ChuckM
    Hello, For instance if I do something like: Criteria c = session.createCriteria(Book.class) .add(Expression.ge("release",reDate); .add(Expression.ge("price",price); .addOrder( Order.asc("date") ) .setFirstResult(0) .setMaxResults(10); c.list(); How can I use the same criteria instance, but remove (for example) the second criterion? I'm trying to build a dynamic query in which I'd like to let the user remove a filter, without the backend having to reconstruct the criteria from scratch. Thank you

    Read the article

  • Dropdown with image and text together in Asp.net 3.5 and jquery

    - by fzshah76
    I've been given a task to make a dynamic drop down which takes it's data[image and value id] from table. I am wondering if any of you came across this scenario or if any one can help me out in this I need help in concept and coding. Definitely any help is appreciated. I see the example in jquery here is the link: http://www.marghoobsuleman.com/jquery-image-dropdown something like this but data is coming from table.

    Read the article

< Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >