Skip to content

Custom Rendering Engine Based on DirectX11 and WinAPI

Notifications You must be signed in to change notification settings

GatsLee/Untitled

Repository files navigation

Untitled: Custom DirectX11 Rendering Engine


Engine Structure

  • This is a modular game engine built with DirectX11, inspired by the architecture of commercial engines like Unreal Engine and Unity. It focuses on clarity, debuggability, and extendability for rendering systems and editor tools.

📌 Project Goals

  • Understand the architecture of commercial game engines by re-implementing key editor components like Inspector, Viewport, and Control Panels.

  • Design a custom rendering pipeline using DirectX11, enabling low-level GPU optimization and control.

  • Ensure maintainability and scalability through a modular engine structure.

🧩 Key Features

  1. Modular Rendering Pipeline
  • Built for easy extension and debugging, with instancing support to reduce draw call overhead.
  1. ImGui-Based UI Editor
  • Includes editor panels for actor transforms, mesh/material previews, animation controls (e.g., tweening, seek-frame).
  1. Efficient Debug Tools
  • Custom macros like DEBUG_MATRIX_A() and DEBUG_PRINT_W1() help visualize matrix and vector data in Visual Studio output.
  1. FX11-Free Shader Management
  • Transitioned from FX11 to manual pipeline state setup using Constant Buffers, SRVs, and Samplers.

🔧 Core Engine Components

EngineCore

🎮 Game System

Game: Owns the game loop and manages all other managers.

Level: Manages all actors, skyboxes, and editor cameras.

InstancingManager: Batches draw calls for similar objects to improve performance.

UIManager: Renders editor UI (Inspector, Viewport) using ImGui.

InputManager: Handles keyboard and mouse input with sensitivity/delta tracking.

TimeManager: Tracks delta time and offers timer utilities.

ResourceManager: Manages assets with easy map access.

RenderManager: Controls per-shader constant buffers.

🖥️ Rendering Structure

Rendering

🧱 Graphics


Controls DirectX11 device, swap chain, render targets, and depth/stencil views.

Prepares various states (rasterizer, blend, depth, sampler) stored in unordered_map keyed by enum.

🧠 Shader


  • Handles compilation, binding, and slot-based resource management.

  • Custom enum slots: CBSlot, SRVSlot, SamplerSlot, RasterizerSlot

  • Supports animation (bone transforms, keyframes, tweening), materials, and lighting.

📸 Editor Panels (UIManager)

EditorPanel1 EditorPanel2 EditorPanel3

  • Transform Inspector: Converts radian rotation values to Euler angles for display.

  • Model Renderer: Displays model/mesh info and previews textures.

  • Model Animator: Allows animation switching, tweening between clips, and per-frame debugging.

🧪 Debugging Focus

Debug

Used Visual Studio Graphics Debugger + custom logging macros.

UI includes wireframe/solid view toggle for real-time rendering inspection.

📷 Screenshots & Video


Video Screenshot1 Screenshot2

📦 Future Plans


  • Add support for Actor-Pawn-Character hierarchy.
  • Expand Lighting systems.
  • Implement gameplay-level scripting.

🛠️ Build Info


  • Language: C++17
  • Graphics API: DirectX11
  • UI: Dear ImGui
  • IDE: Visual Studio

About

Custom Rendering Engine Based on DirectX11 and WinAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published