Nadrin / PBR

An implementation of physically based shading & image based lighting in D3D11, D3D12, Vulkan, and OpenGL 4.

Home Page:https://www.siejak.pl/projects/pbr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build is failing with VS2022

pixtur opened this issue · comments

Thanks a lot of this awesome project! It really helped me a lot setting up a basic PBR rendering pipeline.

Sadly I wasn't able to build the executable with VS2022,

I get a list of compile errors like...

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2102	'&' requires l-value	PBR	C:\Users\pixtur\dev\__research\PBR\src\d3d12.cpp	377	

I already installed Vulcan. Does this error indicate that I also need a special version of DX12?

I there by any chance a prebuilt windows executable available?

  • add #include <stdexcept> to mesh.cpp

  • remove the /std:c++latest compiler option from PBR property pages -> Configuration Properties -> C/C++ -> Command Line -> Additional Options

  • change from $(ProjectDir) to ..\..\data in PBR property pages -> Configuration Properties -> Debugging -> Working Directory


ps. if you still get C2102 errors, try setting No in PBR property pages -> Configuration Properties -> C/C++ -> Language -> Conformance Mode