chreden / trview

Tomb Raider level viewer and speedrun planner
MIT License
33 stars 7 forks source link

Direct2D <-> D3D11 interop doesn't work on Windows 7 #237

Closed chreden closed 6 years ago

chreden commented 6 years ago

Crash on startup for Makael. Win7 64 bit

This is because on Windows 7 trying to create the DXGI render target to do Direct2D text writing returns E_NOINTERFACE. We weren't checking the return code so were assuming it would be created properly, so we try to use it afterwards and crash.

Solution is to either find a way to connect D3D11 and D2D on Windows 7, or to use sprite font from the DirectXTK project - leaning towards the latter.

errormsg

errormsg2

chreden commented 6 years ago

After a sprinkling of message boxes it looks like this is happening somewhere inside generate_ui. Will investigate there next.

chreden commented 6 years ago

Could be non power of 2 textures?

chreden commented 6 years ago

Title updated. The crash is because on Windows 7 trying to create the DXGI render target to do Direct2D text writing returns E_NOINTERFACE.

chreden commented 6 years ago

Working on switching to Sprite Fonts - this should work on Win7.