Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / C++ / C# - DX11 fatal error:

Author
Message
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 3rd Dec 2010 23:44
I'm trying to get a DX11 app set up and i get this error from the compiler:



what i'm doing is making a project that uses both DX10/11 as the renderer but i get that error when compiled, here is the header file.



any and all advice will do, thanks

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Dec 2010 23:35
My guess is that one of the DX11 files includes DX10 headers.

But why are you including the DX10.1 header file into a source file that only needs DX11?

Plus, I also believe you are doing it wrong anyway.

Renderer.h (this is an interface class only - has no member variables, does nothing)


DX11Renderer.h (this is an implementation class - has the variables, does everything)


main.cpp (how to use it)


Other renderers would be defined like the DX11Renderer. If you want to include multiple renderers in the same program, and you have header issues like you currently have, then take a look at the pimpl idiom and use that to separate the header inclusion.

Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 5th Dec 2010 00:30
thanks IanM ur one of the reasons why i still come to these forums

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Dec 2010 02:30
Actually, there may be a simpler way than using pimpl, if it fits your usage.

Renderer.h as above.

DX11Renderer.h


Dx11Renderer.cpp


main.cpp


One downside of this way of implementing things is that the class definition is totally hidden from the rest of the program, so there's no way for you to access any DX11-specific member functions that you may include in the class definition.

Login to post a reply

Server time is: 2025-05-22 08:25:43
Your offset time is: 2025-05-22 08:25:43