• Advertisement
Sign in to follow this  

multisample quality check exception

This topic is 2474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to turn on AA in directx11. Ive got two issues, the first I think I can work out: when I set sample count above 1 and quality above 0 nothing renders just a black screen where my object should be. The real confusion I have though is that Im getting an exception thrown from a really simple line of code that Ive checked against other peoples code.


UINT qualityReturn = 0;

m_device->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM, 8, &qualityReturn);

thats all it is. Its just like code Ive found elsewhere but the program throws a fit if I run it, why?

heres the exception code:

First-chance exception at 0x00d72586 in Engine.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00d72586 in Engine.exe: 0xC0000005: Access violation reading location 0x00000000.

thanks.

Share this post


Link to post
Share on other sites
Advertisement

First-chance exception at 0x00d72586 in Engine.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00d72586 in Engine.exe: 0xC0000005: Access violation reading location 0x00000000.[/quote]

You are trying to access to something that is not initialized. The programm tries to access a null pointer. I think this part of code is just right but you forgot to initialize something elsewhere.

Share this post


Link to post
Share on other sites
Wow, yeah m_device is null. The code snipet is from where I fill out the sample description to initialize m_device with. But now Im even more confused. If I cant check the available quality level before setting the device then where do I set it?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement