Jump to content

  • Log In with Google      Sign In   
  • Create Account

Where is my triangle? Issue moving to Directx 11 and Metro


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
28 replies to this topic

#21 col_anderson   Members   -  Reputation: 109

Like
1Likes
Like

Posted 12 October 2012 - 03:21 AM

Hi AlzPatz.
I received your code, however I currently have no win8 dev environment therefore no chance to compile your code.
The code and the shaders seem fine, but the devil is in the details as usual.

To diagnose my problem I switched the cull mode to D3D11_CULL_NONE so the rasterizer would render everything that should be on screen.
in native c++ it would look somethin like this:
D3D11_RASTERIZER_DESC rd;
ZeroMemory(&rd, sizeof(rd));
rd.CullMode = D3D11_CULL_NONE;
rd.FrontCounterClockwise = false;
rd.FillMode = D3D11_FILL_SOLID;

device->CreateRasterizerState(&rd, &rasterizerState);
immediateContext->RSSetState(rasterizerState);


Also try to disable the depthstencilbuffer as you don't need it anyway when you draw screen coordinates directly, by not setting in the OMSetRenderTargets call:

//Set the Render Context
d3dContext->OMSetRenderTargets(1, renderTargetView.GetAddressOf(), nullptr)


You should also have a look at the DX11 MSDN tutorial (especially No 2), if you have not already.
http://code.msdn.mic...979ef?SRC=VSIDE

I hoped I could be more helpful.

Let me know if that brought you forward.

C.

Edited by col_anderson, 12 October 2012 - 03:44 AM.


Sponsor:

#22 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 12 October 2012 - 05:51 AM

Thanks, I had look at the disabling the depth stencil before and did play with a different rasterizer (the code i sent did not set one, just use default)(. but will retry. thanks for looking anyway! ill report back

#23 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 16 October 2012 - 01:12 AM

Is anyone willing to receive a C++ Metro App to run, either with diagnostics or just to have a browse and see what simple mistake i am making?

#24 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 16 October 2012 - 01:12 AM

by that i mean the zipped solution

#25 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 17 October 2012 - 02:55 AM

OK - I have this weekend spare for programming and don't want to spend it stuck on this issue. I have solution ready to send. It is a Metro App.

Edited by AlzPatz, 29 October 2012 - 10:41 AM.


#26 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 19 October 2012 - 11:01 AM

$0

Edited by AlzPatz, 29 October 2012 - 10:41 AM.


#27 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 21 October 2012 - 08:28 AM

Hi, some links to the visual studio solutions.

The Metro Version that doesn't work..(shader code is compiled by VS2012's nice new abilitie, you need Win8 and VS2012)
http://www.filedropper.com/metrodx11trianglenotviewable

The Win32 Version that does work... (same shader code. uses shader compilation at run time)
http://www.filedropper.com/win32dx11triangleisviewable

As you can see, win 32..easy! Metro...no triangles :(

#28 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 29 October 2012 - 05:55 AM

I'm sorry that I keep bumping this thread. Is there anyone with a Windows 8 Development Environment and Visual Studio 2012 Professional that can run this through the graphics debugger to find out what is going wrong? I've rewritten this a million times now. Going stir crazy as not sure where the problem lies..think must be shader, but are so simple. THANKS

#29 AlzPatz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 29 October 2012 - 10:37 AM

SOLVED...After so much time it was such a silly mistake (as always). I messed up the vertex buffer setting. d3dContext->IASetVertexBuffers(0, 1, &vertexBuffer, &str, &oset); had to be : d3dContext->IASetVertexBuffers(0, 1, vertexBuffer.GetAddressOf(), &str, &oset);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS