Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 24 Mar 2010
Offline Last Active Yesterday, 10:34 PM

Posts I've Made

In Topic: Terrain rendering problem

03 January 2014 - 11:47 AM

Also, before that line there's a "Access violation reading location 0xFEEEFEEE", which would mean that something is referencing memory that has already been freed.



In Topic: C++ DX API, help me get it?

08 July 2013 - 09:01 PM

Allow me to pick off part of #6:


D3D11CreateDeviceAndSwapChain has two parameters that accept pointers to D3D_FEATURE_LEVEL. The first one is a pointer because it is actually looking for an array of D3D_FEATURE_LEVEL (and the parameter following that one is the number of elements in the array). The second one is a pointer because it is an output parameter to where the feature level that was actually selected can be stored.





Also, I expect that a lot of the reasons for the API being structured how it is are due to http://en.wikipedia.org/wiki/Component_Object_Model

In Topic: Direct x failing

08 July 2013 - 05:48 PM

Is the issue resolved? Your code runs fine here. If not, which OS are you on?

In Topic: Direct x failing

07 July 2013 - 03:30 PM

Have you tried stepping through with the debugger to ensure that things are behaving as expected? (ex. hwnd is not null, width and height have the expected values, etc.) Is it still failing at the same spot?


Also, you have this:

result = g_pSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&p_RT);

I think you want ID3D11Texture2D there, not ID3D10Texture2D.

In Topic: Direct x failing

07 July 2013 - 08:30 AM

I believe the problem is that when you are calculating the height, you should be doing (bottom - top), not (top - bottom).


Also, two other things:

  • You are passing in 3 as the feature level count to D3D11CreateDeviceAndSwapChain, meaning it will only look at the first 3 elements of your feature level array.
  • Your feature level array is backwards. It will attempt to use feature level 9.1 first, then 9.2, etc.