0

I'm at a point in my project where I need to use the EXE file that is generated but noticed there is no geometry drawn (only text and background color) when running it from the folder (all textures, dll's and other dependencies are correctly placed).

I couldn't find much through online searching but it did help me narrow it down slightly. Basically when I hit F5 as normal to start with debugging I get this - https://i.stack.imgur.com/4WuDM.jpg (everything is as it should be). However, when I start without the debugger I just get this - https://i.stack.imgur.com/IhLHO.jpg It would make sense that this would be similar to what the compiled EXE displays.

So, how could starting without the debugger cause geometry to not be drawn?

Any help is really appreciated.

jmoerdyk
  • 5,544
  • 7
  • 38
  • 49
Wikaman1
  • 43
  • 7

1 Answers1

2

I can think of two things causing this:

  1. Use of #ifdef _DEBUG somewhere in your code.
  2. Relying on uninitialized variables, which may get initialized to 0 in debug mode, but have random values in release mode.

This SO question may also be of some help: Differences between running an executable with Visual Studio debugger vs without debugger

Community
  • 1
  • 1
jaho
  • 4,852
  • 6
  • 40
  • 66
  • I guess it is caused by the first item. – zdd Mar 04 '14 at 06:07
  • I have no #ifdef _DEBUG conditions anywhere and I've just gone through and made sure all variables (pointers or not) were initialized, and added header guards. Still the same problem. Works in release, no geometry in debug. :/ – Wikaman1 Mar 10 '14 at 19:54
  • I see. Some things to try next: initialize DirectX with debugging (in `createDevice*` method add `D3D11_CREATE_DEVICE_DEBUG` flag) and set compiler warning level to `Wall` (Project Properties > C/C++ > General > Warning Level). Rebuild solution and read through everything. – jaho Mar 10 '14 at 21:03
  • Got about 11k warnings... most are from microsoft visual studio 10.0\vc\include or microsoft directx sdk (june 2010)\include (which I guess are conflicting?). Any I can see relating to my project are mainly signed/unsigned mismatches or copy constructors not generated. Is there anything specific I should be looking for? – Wikaman1 Mar 10 '14 at 21:23
  • Ignore all those from external libraries and read through everything that relates to your code. Also pay attention to DirectX messages after you've enabled debugging and run with and without VS debugger. Maybe it's an alignment issue (which DirectX would tell you about). I'm just guessing really. – jaho Mar 10 '14 at 21:47
  • Problem seems to be to do with this message "D3D11 ERROR: ID3D11DeviceContext::DrawIndexed: Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. Semantic 'TEXCOORD' is defined for mismatched hardware registers between the output stage and input stage." any ideas on that? Thanks for all your help :) – Wikaman1 Mar 10 '14 at 22:32
  • Debugging DirectX apps is always a joy. As for your error, I assume that your vertex shader output type doesn't match your pixel shader input type. You need to make sure they are exactly the same, including the order of elements. – jaho Mar 11 '14 at 00:54
  • well I went back to an old working version and carefully added each feature again and it turns out the problem was a broken camera class, for some reason the view and projection matrices weren't correct when running it debug mode. Strange problem but thanks for all your help :D – Wikaman1 Mar 11 '14 at 17:06