Jump to content

  • Log In with Google      Sign In   
  • Create Account

DarkRonin

Member Since 06 Oct 2006
Offline Last Active Aug 20 2016 10:54 PM

Posts I've Made

In Topic: Depth buffer not working

16 August 2016 - 03:51 PM

hmmm...that's a trip.you're right. I don't like the way that looks, even though it's correct. Doesn't read well. 


HRESULT test_okay = S_OK; // == 0L
 
if (test_okay)
   MessageBox(0, L"not okay", L"fail", 0);
else
   MessageBox(0, L"okay", L"good", 0); // <---- this path is traveled 
Clearly I don't understand what I'm talking about.+1 for getting it working.Probably still should be using the FAILED or SUCCEEDED macro because we're looking for negative fail values,and as you said, zero on success.but if it's not broke... :)


Yeah, I see your point. I just looked up the macro and anything negative is a fail, so positive values will possibly give a false fail.

In Topic: Depth buffer not working

16 August 2016 - 02:27 AM

Just worked out what was going on.

I had another call to OMSetRenderTargets() in my render target manager, but the last parameter was set to zero, causing the depth buffer to no longer be associated with the target.

In Topic: Depth buffer not working

16 August 2016 - 01:42 AM

// you see you're failing creation here when you 'do not' get your message box // if (!) then log fail if (d3dDevice->CreateTexture2D(&descDepth, NULL, &pDepthStencil)) { MessageBox(NULL, "Failed to create depth buffer", "Error", NULL); return 1; }


The functions return zero on success, so the code is actually correct on that front.

I tried playing with the SampleDesc count, but changing that does result in an error as it needs to match the backbuffer SampleDesc count.

So, still no closer I'm afraid.

In Topic: Depth buffer not working

15 August 2016 - 08:33 PM

At the moment I have to use the painters algorithm as depth isn't being adhered to.

In Topic: Multithreading and dynamic vertex buffers

12 August 2016 - 05:16 PM

which API ? Asking a blanket statement in regards to dynamic vertex buffer is too opened ended. A vertex buffer is just a chunk of memory, so if the API allow calls to the API on multiple threads then I don't see why not. The GFX card don't magically do stuff, its the drivers that instruct the graphics cards what to do. The API layer interfaces with the driver to submit your commands for processing. So for the most part, its not guess work as to what is allowed or not allowed ( unless you are dealing with OpenGL..lol ).


DirectX 11 - as per the tag ;)

@Hodgman - Thanks man. A wealth of information as always :)

PARTNERS