Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:55:26+00:00 2026-06-17T16:55:26+00:00

So, I am using Visual Studio 2012 with the onboard Windows SDK 8, writing

  • 0

So, I am using Visual Studio 2012 with the “onboard” Windows SDK 8, writing Direct3D11 applications and i have a huge problem. I have a class which handles all the initialization, setup and draw calls on top off D3D11. I instantiate the application class which holds an instance of the D3D11 driver class properly with all the data it needs to know.

The D3D11 driver class constructor takes the application’s primary window handle and uses it to hook D3D into the application’s primary window. It constructs itself properly and returns out where it calls app->run() which drives the main loop.

In the main loop, that driver is called to simply test draw a blank reddish screen. Observing the debug information, the render target in question is operational, created to bind the backbuffer from the swap chain to the pipeline.

renderTargetView IS NOT NULL. HRESULT is validated to be S_OK.

If I try to call the Draw function within the D3D11 driver class constructor, it works. It doesn’t get deallocated inbetween calls.

It’s like the constructor of the Application class doesn’t finish before the run() function, if I try to continue without exiting for a few “frames” forward, the reddish tint of the cleared render target shows. Can someone enlighten me, please? I’m at the end of my wits.

IT’S NOT NULL. HRESULT is validated to be S_OK. There are reports this is fixed in Windows 8, while the Win7 SDK still suffers. Google doesn’t yield anything useful, most people forget to create the render target view (stays NULL) or intellisense-miss OMSetRenderTargets for OMGetRenderTargets.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:55:27+00:00Added an answer on June 17, 2026 at 4:55 pm

    Unhandled exceptions are almost exclusively dropped when you dereference a null pointer. The ClearRenderTargetView() is an instance method of a validly initialized (immediate) context, or

    ID3D11DeviceContext::ClearRenderTargetView(...)

    If you didn’t make the trivial mistakes of not initializing the render target view or calling OMGetRenderTargets(...) instead of OMSetRenderTargets(...), I am absolutely certain that your context is null. Per your statement, you explicitly deny making these mistakes.

    Use assert to verify my claim, that your context is indeed NULL. Since it works in your driver constructor and doesn’t later when it is used as a member of your application class, you’re probably not supplying a proper copy assignment operator in your driver class, that’s why it drops an unhandled exception box, it initializes the context and then doesn’t persist due to a missed reference copy. While the object is being initialized, it is partially valid, that’s why it works that one time.

    This is just a hypothesis, I’m pretty certain, but due to the lack of code on your part, I can only use my imagination and logic. Report back if you need further assistance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a Windows 8 Store app using Visual Studio 2012. The main
So I`m using Visual Studio 2012 and have application, which creates notifyIcon and show
I'm writing a Windows 8 app in C# using visual studio 2012 Ultimate. When
I'm using Bullet Physics, on Windows 7 and Visual Studio 2012. I have compiled
I'm running Windows 7 and using Visual Studio 2012 RC. I have a USB
Started using Visual Studio 2012 RC since yesterday, We have one WCF solution. Whenever
I'm using Visual Studio 2012 for Windows Phone 7 and this is my first
I have the most annoying problem with Visual Studio 2012 and WPF I was
I'm using Visual Studio 2012 and playing around with Windows Phone 7.1 application development.
i am using visual studio 2012 n windows 8 enterprise edition to create a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.