📜 ⬆️ ⬇️

3D on Windows desktop (+ sources)

3D models on the desktop Merry Christmas dear Habravchane!

I want to selflessly share my modest project .

Key features:


')


Prehistory


The project was completed in September 2011, when the official website was ready, since then I have not remembered and have not engaged in the project at all.
There were two prerequisites for creation: the fact that this is possible and the fact that this is something amazing, I mean covering the desktop with a lively 3D picture, at first it fascinated me (especially the rotating tiger from DirectX lessons on a bright blue desktop background) , there is where fantasies roam, I thought. Of course, there are still enough ways to animate the desktop, but I haven’t seen solutions like mine.

Operating principle


If you describe the whole process, then everything is quite simple:

A piece of code
hP = FindWindow(L"ProgMan", NULL); hD = GetDesktopWindow(); if (!SUCCEEDED(InitD3D(hD))) { FatalError( L"Can't init Direct3D" ); ExitProcess(NULL);} SetWindowLong(hP,GWL_EXSTYLE, GetWindowLong(hP,GWL_EXSTYLE) | WS_EX_LAYERED ); UAC_hook = SetWinEventHook( EVENT_SYSTEM_DESKTOPSWITCH, EVENT_SYSTEM_DESKTOPSWITCH, NULL, WinEventCallback, 0, 0, WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNTHREAD); 

By the way, the source code is presented in a rather unusual form, more than 3000 lines of code and all in one file, this is connected with the first experience of C ++ and DirectX.


disadvantages


The only drawback due to which the solution could not be called correct is the output of 3D graphics on the desktop of the main window, which in principle is not intended for this.

I would like to warn that the program consumes a different amount of resources on different computers and operating systems, i.e. can use <1% CPU on one computer and> 40% on another, about the same configuration (best performance on Windows XP). Use sleep mode - double click on the tray icon.

Application


3D models on the desktop
In addition to rendering the wallpaper from different angles of the 3D model, even with photos of relatives or a calendar card (yes yes, the calendar card that gave us the dear anatoly_rr for the new year), you can try to find several useful applications for such a solution, such as:


Import models


I did everything alone, including models, and of course not everyone can like them, I understand.
Importing your own model will not be difficult, especially if you own a 3D editor, yesterday you specially created a small manual (eng.) On importing a 3D model from 3Ds Max, there is also a video on youtube . There are several nuances, because, as you probably guessed, the shadows are not drawn on the fly, and the export occurs in the good old * .X file . If you have wallpapers, drop them, I will share them in a special section . Thanks for attention!

Links


Project website: michael.verhov.com/project/full3dwallpaper
Official: full3dwallpaper.com
GitHub: github.com/verhov/full3dwallpaper
Video a little bit: www.youtube.com/watch?v=zkVRyfxRGn0

Source: https://habr.com/ru/post/165007/


All Articles