Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Jason, posted on November 11, 2004




Image Description, by Jason



These are screen shots of an application I have been working on for some years in my spare time. The goal was to create a 3D desktop so I could make a more dynamic desktop environment. Its along the same lines as Sphere XP or Cube Server but I took a bottom up approach. So rather than have a cool environment with static windows I have focused on having fully interactive windows that update as fast as possible and require little extra processing time.

Its written in C++ and uses DirectX9.0b and uses a variety of hooks ( Message hooks, API hooks and Low level input hooks ). The hooks capture all drawing activity in a window and store the it in a shared memory area. When the viewer updates it enumerates all the drawing activity in the shared memory and will create/destroy a mesh and texture for each window that is hooked. Each windows representation chopped up in 256x256 chunks to accomate the full size of the window and be compatible with low end hardware.

There are still a few programs that elude proper capturing but most programs work, I am shooting for 100% functionality for all apps before moving onto a working enviroment. On my site I detail some ideas I am exploring for future development, feel free to post some of your own. Oh ya, also feel free to let me know what you think, but please read the site first as I have tried to address some of the "concerns" I have come across in the past.

Major features
  • Very fast updating( before I got media player 9 I could capture video and it would play back at fullspeed, it looked amazing )
  • Full mouse/keyboard interaction
  • CPU utilization limiter, wont bog your computer down.. too much
  • Non rectangular windows supported
  • Works on even the oldest hardware, assuming it will run with DirectX 9.0b
  • Has a ini file to specify applications to hook
  • Windows are placed in 3D in the same relative positions in 2D
  • Some of the major problems I encountered
  • Shared memory was very slow until I found MeteredSections, its like a Mutex but doesnt incur a kernel swap hit.
  • Hidden system drawing, things like scroll bars, borders and captions are drawn in the bowels of windows and their drawing could only be infered from certain conditions I could watch for in user mode.
  • Menus were also handled in the kernel and were harder to capture, my solution.. An entirely new menu system that cirumvents the kernel entirely. Its hard to even tell that its not the real windows menu system ;)
  • Initially I had a major problem with capturing kernel drawing, fortunately I sorted it out. Unfortunatly I spent months on a highly dubious kernel level service decriptor table hook ( interrupt calls ) which I eventually ripped out.
  • Future development: Like I said I have a list of possible projects I'd like to attempt on my website. I'd like to stress that I dont intend to have people looking and working with windows at oblique angles. This is mostly to facilitate adding cool new feature ala expose, REAL virtual desktops and some pretty ( perhaps gimmicky ) environmental effects ( along the lines of "Peep: The Network Auralizer" but visual.)

    http://www.logiccubed.com


    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]

     
    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
     
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
     
    Roel

    November 11, 2004, 07:16 AM

    It looks like something interesting to do, great work. Can it run itself? :)

     
    mite51

    November 11, 2004, 11:45 AM

    Oh, can it capture itself? That'd be an interesting test tho I dont recommend trying it ;). It could probably pick up everything but the DirectX rendering since it doesnt capture that at the moment.

     
    Morgan

    November 11, 2004, 11:52 AM

    Many people have done the (way cool) hack of getting a texture from a running application. It seems like a lot of work to get the details right and make it work with many programs.

    Can you share your screen capture source code? Rather than reproducing all of your work, it would be nice if other coders could just pick up where you left off (giving you credit).

    -m

     
    Marc G

    November 11, 2004, 01:47 PM

    Yes, i'm also interested in the details on how the capturing works.

     
    Nico

    November 11, 2004, 03:41 PM

    Me too...pleeeeeeeeeeeaaase :-)

     
    This thread contains 5 messages.
     
     
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.