Both of us may use his initial simple code base as a platform on which to hang interesting demo features and ideas.
First of all, this new demo attached here uses a different background pattern in the off-desktop unused pixels coating the inside surface of the sphere you find yourself inside when running this demo on your RiftDK. Although this new pattern still uses the horribly slow GDI SetPixel() calls (and many more of them per frame update), it is far faster than my previous version. It seems that the real bottleneck was the use of srand() and rand() calls for each pixel location. Now a simpler xor function is used in its place, which makes the frame update rate a lot faster.
The bottleneck is still how long it takes to read the desktop image from the video card VRAM, but I can add an extra buffer to use with my "PTZ Tweening" technique, to allow very responsive head rotation, even while the VRAM read progress much more slowly in a separate thread. That will come later...
The attachment contains static-linked executable (no special DLL files needed), and source code. You can exit this program with Alt-F4.calebkraft wrote:Geekmaster, it might be a good idea to put some simple instructions on how to intialize this in the first post.
step 1. switch monitor to "extend" instead of duplicate. (then apply)
step 2. move 2nd monitor, which is your rift, above the first (then apply)
step 3. place rift on forehead
step 4. center and level your head and double click the executable.
step 5. lower rift onto eyes and see glorious desktop.
when the program initializes, it takes the position of the rift into account. with it on your forehead, and the screens set up with one on top of the other, it brings your primary screen into your view when you lower it. Your rift screen is useless in this simulation and looks like a repeating mirror.
Enjoy! A screenshot of this app is a waste of time. It would just show my desktop, devoid of anything relevant to your experience when using this demo app in your RiftDK. You have to experience it to have ANY clue about what it does, or why some people think it is so cool. Looking at the source code shows just how simple it really is (after removing all the mandatory Windows "scaffolding" cruft, that is).
And be sure not to forget this:
You can find my previous version of this app (under its previous name) here:AngelJ wrote:Note: Disable desktop composition (aero) for best performance.
http://www.mtbs3d.com/phpBB/viewtopic.p ... 61#p120101
EDIT: When viewing the background, if you hold your head VERY STILL, you can stop the "whole pixel" jumps in head tracking. This program does not do subpixel rendering, so everything is aligned to whole-pixel integer boundaries. You can notice little jumps in that high-contrast "algorithmic art" background when it shifts a pixel in any direction. This can be avoided with antialiasing (spreading a pixel across multiple pixels, making it less sharp), and drawing the screen using head tracking accurate to a fraction of a pixel, but that is not as simple and this is just a simple demo.