Sign in to follow this  
ryan mccabe

multisample quality check exception

Recommended Posts

ryan mccabe    161
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
Fabbo    102
[quote]
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
ryan mccabe    161
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this