A lightweight Windows application showcasing Direct3D 11 and Direct2D integration with real-time overlay capabilities.
- 🎮 Direct3D 11 and Direct2D rendering
- 📊 Real-time FPS counter overlay
- 🎨 Custom drawing utilities:
- Text rendering with customizable colors
- Line drawing with adjustable thickness
- Box drawing with transparency support
- 🖥️ Window resizing and fullscreen support
- 🎯 Color management system
- Windows 10/11
- Visual Studio 2019 or newer
- DirectX 11 SDK
- Windows SDK
-
Clone the repository https://github.com/GamebP/Native-D3D11.git
-
Open
NativeD3D11.slnin Visual Studio -
Build the solution (F5 or Ctrl+Shift+B)
NativeD3D11/
├── Addons/
│ ├── colors.h # Color management
│ ├── text.h # Text rendering utilities
│ ├── line.h # Line drawing utilities
│ └── box.h # Box drawing utilities
└── NativeD3D11.cpp # Main application code
// Draw text with custom color
text::draw(d2dRenderTarget,
CreateBrush(d2dRenderTarget, Colors::UI::TextPrimary()),
textFormat, L"Hello World!",
5.0f, 5.0f);// Draw a line
line::put(d2dRenderTarget,
CreateBrush(d2dRenderTarget, Colors::Get::Red()),
200.0f, 150.0f, // start point (x1, y1)
400.0f, 150.0f, // end point (x2, y2)
3.0f); // thickness// Draw a box with transparency
box::put(d2dRenderTarget,
CreateBrush(d2dRenderTarget, Colors::UI::Highlight()),
100, 100, // top-left corner (x1, y1)
300, 250, // bottom-right corner (x2, y2)
2.0f, // thickness
0.5f); // opacityContributions are welcome! Please feel free to submit a Pull Request.