All Projects → compnerd → DXSample

compnerd / DXSample

Licence: BSD-3-Clause license
Sample Program for DirectX 12 + Swift

Programming Languages

swift
15916 projects
HLSL
714 projects

Projects that are alternatives of or similar to DXSample

Directxmesh
DirectXMesh geometry processing library
Stars: ✭ 447 (+684.21%)
Mutual labels:  directx, directx-12
Directxtex
DirectXTex texture processing library
Stars: ✭ 1,039 (+1722.81%)
Mutual labels:  directx, directx-12
Fx Gltf
A C++14/C++17 header-only library for simple, efficient, and robust serialization/deserialization of glTF 2.0
Stars: ✭ 257 (+350.88%)
Mutual labels:  directx, directx-12
Qtdirect3d
QDirect3DWidget implementation similar to the built-in QOpenGLWidget
Stars: ✭ 60 (+5.26%)
Mutual labels:  directx, directx-12
Methanekit
🎲 Modern 3D graphics made simple with cross-platform C++17 meta-API on top of DirectX 12 & Metal (Vulkan is coming)
Stars: ✭ 197 (+245.61%)
Mutual labels:  directx, windows-10
ConvectionKernels
Fast, high-quality texture compression library for many formats
Stars: ✭ 40 (-29.82%)
Mutual labels:  directx, directx-12
Directxtk12
The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
Stars: ✭ 765 (+1242.11%)
Mutual labels:  directx, directx-12
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+17885.96%)
Mutual labels:  directx, directx-12
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (+142.11%)
Mutual labels:  directx, directx-12
D3d12memoryallocator
Easy to integrate memory allocation library for Direct3D 12
Stars: ✭ 234 (+310.53%)
Mutual labels:  directx, directx-12
CrossWindow-Demos
🥪 Examples of how to use CrossWindow for things like rendering graphics, listening to events, etc.
Stars: ✭ 48 (-15.79%)
Mutual labels:  directx, directx-12
AwesomeWallpaper
AwesomeWallpaper plays videos, shows images and system info on your desktop wallpaper
Stars: ✭ 74 (+29.82%)
Mutual labels:  windows-10
Microsoft.Toolkit.Win32
This repository contains all controls for WPF and WinForms to simplify and demonstrate usage of UWP controls
Stars: ✭ 345 (+505.26%)
Mutual labels:  windows-10
Rise-Media-Player
One media player for everything you own or stream; whether it's music or videos, online or offline Rise Media Player does it all. And it's beautiful and native with the latest version of WinUI.
Stars: ✭ 600 (+952.63%)
Mutual labels:  windows-10
Volumey
Volume mixer that allows you to set up global hotkeys to control your Windows audio system.
Stars: ✭ 139 (+143.86%)
Mutual labels:  windows-10
Wallop
Extensible, living/animated wallpaper engine built in C# using Silk.NET's OpenGL wrapper at its core.
Stars: ✭ 27 (-52.63%)
Mutual labels:  windows-10
UWP-Package-Installer
An UWP installer for appx/appxbundle packages
Stars: ✭ 85 (+49.12%)
Mutual labels:  windows-10
alienfx-tools
Alienware systems lights, fans, and power control tools and apps
Stars: ✭ 100 (+75.44%)
Mutual labels:  windows-10
minecraft-worldedit-bedrock
World Edit for Minecraft bedrock
Stars: ✭ 48 (-15.79%)
Mutual labels:  windows-10
ghostly
Ghostly is a GitHub notification client for Windows 10/11
Stars: ✭ 252 (+342.11%)
Mutual labels:  windows-10

DXSample

3D Cube

This sample application shows how to use Swift, Swift/COM to build an application which leverages DirectX 12 on Windows 10.

This sample is a proof of concept of the possible functionality but does not follow many best graphics best practices. This code eschews V-Sync support for simplicity in the code, doing simple double buffering. There are many math routines which are transliterated from the DXMath library by Microsoft. It also does not try to optimize the math routines, opting instead for simplicity in the code. Many pieces of trivial functionality, e.g. fullscreen support, are simply discarded for brevity.

Build Requirements

  • Latest Swift Development Snapshot (2021-02-18 or later)1
  • Windows SDK 10.0.107763 or newer
  • Windows 10

1 Stable releases are not currently supported as they are built from release branches and this project requires the latest development snapshot from the main branch.

Building

This project requires the latest Swift snapshot (February 18, 2021 or newer). You can use the snapshot binaries from swift.org or download the nightly build from Azure.

Building the Demo

Simply running the demo, as described below, will implicitly build the demo program. However, should you wish to explicitly build the demo application you can do so as:

swift build

Running the Demo

With SPM, you can simply run the target demo program. Because there is only a single executable in the repository, you can simply run it using the following:

swift run

Debugging

Debugging this demo is complicated as there are separate portions involved:

  1. Swift application code
  2. System integration for DirectX

LLDB currently does not support debugging with PDBs very well and does not have the same level of conveniences that WinDBG may support. Depending on which portion is being debugged you may have better experiences with different debugging approaches.

For debugging the Swift application code, it is easier to debug using LLDB and DWARF. In such a case, you will need to build the application as follows to enable the debug information:

swift build -Xlinker -debug:dwarf

For debugging the DirectX support, the WinDBG support may be more convenient. In such a case, it would be better to build the application with CodeView and PDBs to allow WinDBG to provide stack traces in addition to the additional information from the debug mode. You can build that using the following command:

swift build -Xswiftc -g -Xswiftc -debug-info-format=codeview -Xlinker -debug

When the demo application is built in the Debug configuration, additional debugging features are enabled in DirectX. This will include halting execution on any warning from the execution of the DirectX pipeline.

Debugging with WinDBG

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].