DirectXTK12 | DirectX Tool Kit ( aka DirectXTK12 | Game Engine library
kandi X-RAY | DirectXTK12 Summary
kandi X-RAY | DirectXTK12 Summary
The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DirectXTK12
DirectXTK12 Key Features
DirectXTK12 Examples and Code Snippets
Community Discussions
Trending Discussions on DirectXTK12
QUESTION
I am trying to shutdown my DX12 renderer, and restart it within the same process.
Said application is heavily based on the microsoft MiniEngine example code, now with some modification to allow re-initialisation of global variables. I am using SDL for window and event management.
The last stumbling block for a clean shutdown and re-initialisation, it appears, is the loading of textures in a texture manager class, which in turn uses the DirectXTK12
code to load textures, via CreateWICTextureFromFileEx
for .png
files.
To summarise what I'm trying to do:
start up application
initialise rendering into SDL window
render in rendering loop
shut down all rendering and window handling (remove all resources, release device handle) - calls
SDL_Quit
re-initialise rendering into new SDL window (get new device handle, etc)
render in rendering loop
The texture management class is shut down as part of the rendering shutdown, removing all traces of textures and their handles to resources etc.
As part of the rendering re-initialisation, the default textures are created via CreateWICTextureFromFileEx
. (see here) and crash when trying to do this.
EDIT: since first posting, I can say that this crashing starts directly after calling SDL_Quit()
(and persists after the call to restart with SDL_Init(SDL_INIT_VIDEO)
)
I am now fairly confident it's an issue with this area specifically rather than some other part of the renderer that isn't being re-initialised correctly, since I can force it to use .DDS
textures instead of .png
s, and the system fires up again nicely. In this case it uses DDSTextureLoader
without any (obvious) problems.
I've added the source to my project and can see the crash is occurring when trying to do this:
...ANSWER
Answered 2021-Nov-18 at 12:29I'll post an answer here but will remove it if @ChuckWalbourn wants to post his own.
This was due to letting SDL call CoInitialize
for me.
When it cleaned up through SDL_Quit
, it called CoUninitialize
which then (presumably) invalidated the IWICImagingFactory2
set up by WICTextureLoader
.
By adding a call to CoInitialize
in my rendering startup, the internal count in CoInitialize
keeps the IWICImagingFactory2
alive and all is well.
QUESTION
I've decided to try the DirectXTK12 audio and it's working fine except for the 3D sound. I'm following the guide from wiki but the sound is always in the left speaker no matter how I position the listener/emitter. What's wrong? My code looks like this:
...ANSWER
Answered 2021-Apr-11 at 07:51I've fixed the issue by converting used Sound.wav to mono (1 channel) sound.
QUESTION
ANSWER
Answered 2020-Apr-23 at 20:04Here you told the Pipeline State Object that you are using VertexPositionColor
and want per-vertex color:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DirectXTK12
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page