A Windows GDI-based demonstration that creates a visually intensive animation using multiple buffers to increase CPU usage. This project showcases advanced Windows API usage and graphics programming techniques.
- Double-buffered rendering system
- Real-time animation with configurable parameters
- Pause/Resume functionality
- Window focus handling
- GDI graphics manipulation
- CPU-intensive graphics operations
The project implements a sophisticated graphics system using:
- Windows GDI (Graphics Device Interface)
- Double buffering for smooth rendering
- Custom window class and message handling
- Real-time animation timing system
- Bitmap manipulation and distortion effects
-
Backbuffer System
- Manages primary and secondary buffers
- Handles device context creation and management
- Implements buffer swapping for smooth rendering
-
Object System
- Manages animated objects with properties like:
- Amplitude
- Frequency
- Offset
- Position and dimensions
- Manages animated objects with properties like:
-
Message Loop
- Implements a custom message processing system
- Handles window events and user input
- Manages animation timing and frame updates
-
Build the project using Cargo:
cargo build --release
-
Run the executable:
cargo run --release
-
Controls:
- Press Pause key to toggle animation
- Click window to force redraw
- Close window to exit
- winapi: Windows API bindings
This demo is designed to be CPU-intensive and should be used with caution. It's recommended to run this in a controlled environment where you can monitor system resources.
Created by @5mukx