[osg-users] nVidia card textures memory
Hello, First I know my question has nothing to do with OSG, but a lot of OSG users might come across this subject and any guidance would be most appreciated. The questions I ask regard the nVidia textures memory and how to access it. 1. I'd like to pass data from nVidia texture memory to other card, on the PCI-Express bus. Is it possible and how to get Texture memory address and to map it to PCIE address? Or if there is a possibility to make the card render to memory address which is already mapped to PCIE address? 2. I'd like to run some image processing code on the whole screen (no matter what applications are running on and what they display). For that matter, I need to get the screen "image", run my algorithm and display the result full screen. The problems with that are: 2.1 After one frame that *I* draw, the next time I'll get the screen image it might include changes *I* have done to the data. 2.2 Getting the screen data is slow. So the more complicate way to do it is to make all the applications running, draw to an off-screen memory buffer, process that buffer and display it. Or "plug-in" image processing code, somewhere on the card, after the driver drawing call functions and before the data it presented on screen. My questions are: 1. Is it possible to access the display buffer data on the nVidia card "just before" it is displayed on screen? (plug-in my code) 2. Would setting the apps drawing to n'th nVidia virtual desktop to that trick? And then again, does the nVidia card has address of memory buffer for each n'th virtual desktop? Thanks, Guy. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] nVidia card textures memory
Hi, Guy wrote: > Hello, > > First I know my question has nothing to do with OSG, but a lot of OSG > users might come across this subject and any guidance would be most > appreciated. > > The questions I ask regard the nVidia textures memory and how to access it. > > > > 1. I'd like to pass data from nVidia texture memory to other card, on > the PCI-Express bus. Is it possible and how to get Texture memory > address and to map it to PCIE address? Or if there is a possibility to > make the card render to memory address which is already mapped to PCIE > address? > > > > 2. I'd like to run some image processing code on the whole screen (no > matter what applications are running on and what they display). > > For that matter, I need to get the screen "image", run my algorithm and > display the result full screen. > > The problems with that are: > > 2.1 After one frame that *I* draw, the next time I'll get the screen > image it might include changes *I* have done to the data. > > 2.2 Getting the screen data is slow. > > > > So the more complicate way to do it is to make all the applications > running, draw to an off-screen memory buffer, process that buffer and > display it. > > Or "plug-in" image processing code, somewhere on the card, after the > driver drawing call functions and before the data it presented on screen. > > > > My questions are: > > 1. Is it possible to access the display buffer data on the nVidia card > "just before" it is displayed on screen? (plug-in my code) Sorry, I have no idea. > > 2. Would setting the apps drawing to n'th nVidia virtual desktop to that > trick? And then again, does the nVidia card has address of memory buffer > for each n'th virtual desktop? Not sure about how the data flows, but this sounds a lot like what "compiz" does on Linux. Basically all apps draw to OpenGL textures and the results can be modified before it is displayed. Maybe if you look at how they do it you might get some ideas. > > > > Thanks, > > Guy. > cheers jp > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] nVidia card textures memory
I've checked compiz. They use extension GLX_EXT_texture_from_pixmap that is implemented specially for X11 systems if I understood correctly. I'm developing on windows and could find in my brief search any analog windows extension. But besides that it looks pretty cool with some ideas I thought were my inventions, already implemented :) Thanks for the reference and if anyone knows extensions of the sort for windows I'll really appreciate it. Thanks again, Guy. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of J.P. Delport Sent: Monday, April 07, 2008 3:44 PM To: OpenSceneGraph Users Subject: Re: [osg-users] nVidia card textures memory Hi, Guy wrote: > Hello, > > First I know my question has nothing to do with OSG, but a lot of OSG > users might come across this subject and any guidance would be most > appreciated. > > The questions I ask regard the nVidia textures memory and how to access it. > > > > 1. I'd like to pass data from nVidia texture memory to other card, on > the PCI-Express bus. Is it possible and how to get Texture memory > address and to map it to PCIE address? Or if there is a possibility to > make the card render to memory address which is already mapped to PCIE > address? > > > > 2. I'd like to run some image processing code on the whole screen (no > matter what applications are running on and what they display). > > For that matter, I need to get the screen "image", run my algorithm and > display the result full screen. > > The problems with that are: > > 2.1 After one frame that *I* draw, the next time I'll get the screen > image it might include changes *I* have done to the data. > > 2.2 Getting the screen data is slow. > > > > So the more complicate way to do it is to make all the applications > running, draw to an off-screen memory buffer, process that buffer and > display it. > > Or "plug-in" image processing code, somewhere on the card, after the > driver drawing call functions and before the data it presented on screen. > > > > My questions are: > > 1. Is it possible to access the display buffer data on the nVidia card > "just before" it is displayed on screen? (plug-in my code) Sorry, I have no idea. > > 2. Would setting the apps drawing to n'th nVidia virtual desktop to that > trick? And then again, does the nVidia card has address of memory buffer > for each n'th virtual desktop? Not sure about how the data flows, but this sounds a lot like what "compiz" does on Linux. Basically all apps draw to OpenGL textures and the results can be modified before it is displayed. Maybe if you look at how they do it you might get some ideas. > > > > Thanks, > > Guy. > cheers jp > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] nVidia card textures memory
Thanks, I'll look into it. Guy. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of J.P. Delport Sent: Monday, April 07, 2008 3:44 PM To: OpenSceneGraph Users Subject: Re: [osg-users] nVidia card textures memory Hi, Guy wrote: > Hello, > > First I know my question has nothing to do with OSG, but a lot of OSG > users might come across this subject and any guidance would be most > appreciated. > > The questions I ask regard the nVidia textures memory and how to access it. > > > > 1. I'd like to pass data from nVidia texture memory to other card, on > the PCI-Express bus. Is it possible and how to get Texture memory > address and to map it to PCIE address? Or if there is a possibility to > make the card render to memory address which is already mapped to PCIE > address? > > > > 2. I'd like to run some image processing code on the whole screen (no > matter what applications are running on and what they display). > > For that matter, I need to get the screen "image", run my algorithm and > display the result full screen. > > The problems with that are: > > 2.1 After one frame that *I* draw, the next time I'll get the screen > image it might include changes *I* have done to the data. > > 2.2 Getting the screen data is slow. > > > > So the more complicate way to do it is to make all the applications > running, draw to an off-screen memory buffer, process that buffer and > display it. > > Or "plug-in" image processing code, somewhere on the card, after the > driver drawing call functions and before the data it presented on screen. > > > > My questions are: > > 1. Is it possible to access the display buffer data on the nVidia card > "just before" it is displayed on screen? (plug-in my code) Sorry, I have no idea. > > 2. Would setting the apps drawing to n'th nVidia virtual desktop to that > trick? And then again, does the nVidia card has address of memory buffer > for each n'th virtual desktop? Not sure about how the data flows, but this sounds a lot like what "compiz" does on Linux. Basically all apps draw to OpenGL textures and the results can be modified before it is displayed. Maybe if you look at how they do it you might get some ideas. > > > > Thanks, > > Guy. > cheers jp > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] nVidia card textures memory
Hi Guy, I don't know of any extensions for mapping/copying memory from one card to another directly. NVidia will have such code in their drivers, but its something that is hidden from the OpenGL. However, there are still OpenGL features that can help out a little. First up Frame Buffer Objects are perfect for capturing images, the OSG has full support for FBO's and its pretty straight forward to use just by setting a single line in osg::Camera. See osgdistortion or osgprerender examples. Next up to copy the data from one card to another you'll need to do a read pixels, which ordinarily is pretty slow, so here it'd be best to use Pixel Buffer Objects , agaiin its something the OSG supports, but so far I've only ever used it for sending imagery to a graphics card. You will also need a second PBO to get the data to the second card. I'm afraid there isn't an OSG example showing how to do this part so you are one your own. If you get it all working then it'd be a nice OSG example to have is you fancy contributing the final solution back. Robert. On Mon, Apr 7, 2008 at 3:20 PM, Guy <[EMAIL PROTECTED]> wrote: > Hello, > > First I know my question has nothing to do with OSG, but a lot of OSG > users might come across this subject and any guidance would be most > appreciated. > > The questions I ask regard the nVidia textures memory and how to access > it. > > > > 1. I'd like to pass data from nVidia texture memory to other card, on the > PCI-Express bus. Is it possible and how to get Texture memory address and to > map it to PCIE address? Or if there is a possibility to make the card render > to memory address which is already mapped to PCIE address? > > > > 2. I'd like to run some image processing code on the whole screen (no > matter what applications are running on and what they display). > > For that matter, I need to get the screen "image", run my algorithm and > display the result full screen. > > The problems with that are: > > 2.1 After one frame that *I* draw, the next time I'll get the screen image > it might include changes *I* have done to the data. > > 2.2 Getting the screen data is slow. > > > > So the more complicate way to do it is to make all the applications > running, draw to an off-screen memory buffer, process that buffer and > display it. > > Or "plug-in" image processing code, somewhere on the card, after the > driver drawing call functions and before the data it presented on screen. > > > > My questions are: > > 1. Is it possible to access the display buffer data on the nVidia card > "just before" it is displayed on screen? (plug-in my code) > > 2. Would setting the apps drawing to n'th nVidia virtual desktop to that > trick? And then again, does the nVidia card has address of memory buffer for > each n'th virtual desktop? > > > > Thanks, > > Guy. > > > > ___ > 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] nVidia card textures memory
I currently don't have the hardware to deal with it, so it was more a theoretical question. Moreover, the second card doesn't have to be a graphics card, so PBO has no meaning for it. Anyway, since I know nothing about PBOs, I'll try to dig into it a little, and if they are easier to map to PCIE address, I'll share this knowledge. Same if one day I'll use multiple graphics card. Thanks again, Guy. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, April 07, 2008 6:16 PM To: OpenSceneGraph Users Subject: Re: [osg-users] nVidia card textures memory Hi Guy, I don't know of any extensions for mapping/copying memory from one card to another directly. NVidia will have such code in their drivers, but its something that is hidden from the OpenGL. However, there are still OpenGL features that can help out a little. First up Frame Buffer Objects are perfect for capturing images, the OSG has full support for FBO's and its pretty straight forward to use just by setting a single line in osg::Camera. See osgdistortion or osgprerender examples. Next up to copy the data from one card to another you'll need to do a read pixels, which ordinarily is pretty slow, so here it'd be best to use Pixel Buffer Objects , agaiin its something the OSG supports, but so far I've only ever used it for sending imagery to a graphics card. You will also need a second PBO to get the data to the second card. I'm afraid there isn't an OSG example showing how to do this part so you are one your own. If you get it all working then it'd be a nice OSG example to have is you fancy contributing the final solution back. Robert. On Mon, Apr 7, 2008 at 3:20 PM, Guy <[EMAIL PROTECTED]> wrote: Hello, First I know my question has nothing to do with OSG, but a lot of OSG users might come across this subject and any guidance would be most appreciated. The questions I ask regard the nVidia textures memory and how to access it. 1. I'd like to pass data from nVidia texture memory to other card, on the PCI-Express bus. Is it possible and how to get Texture memory address and to map it to PCIE address? Or if there is a possibility to make the card render to memory address which is already mapped to PCIE address? 2. I'd like to run some image processing code on the whole screen (no matter what applications are running on and what they display). For that matter, I need to get the screen "image", run my algorithm and display the result full screen. The problems with that are: 2.1 After one frame that *I* draw, the next time I'll get the screen image it might include changes *I* have done to the data. 2.2 Getting the screen data is slow. So the more complicate way to do it is to make all the applications running, draw to an off-screen memory buffer, process that buffer and display it. Or "plug-in" image processing code, somewhere on the card, after the driver drawing call functions and before the data it presented on screen. My questions are: 1. Is it possible to access the display buffer data on the nVidia card "just before" it is displayed on screen? (plug-in my code) 2. Would setting the apps drawing to n'th nVidia virtual desktop to that trick? And then again, does the nVidia card has address of memory buffer for each n'th virtual desktop? Thanks, Guy. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org