Jump to content

  • Log In with Google      Sign In   
  • Create Account


CreateTexture2D call unsuccessful


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
2 replies to this topic

#1 ybatra   Members   -  Reputation: 154

Like
0Likes
Like

Posted 04 April 2013 - 05:51 AM

D3D10_TEXTURE2D_DESC desc;

ZeroMemory( &desc, sizeof( desc ) );
desc.Width=width;
desc.Height=height;
desc.Format=DXGI_FORMAT_R8G8B8A8_UNORM;
desc.Usage=D3D10_USAGE_DEFAULT;
desc.MipLevels=1;
desc.ArraySize = 1;
desc.SampleDesc.Count=1;
desc.SampleDesc.Quality=0;
desc.BindFlags=D3D10_BIND_RENDER_TARGET;
desc.MiscFlags = D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX;
 
hr=g_pd3dDevice->CreateTexture2D( &desc, NULL, &g_pRenderTargetShared);
if(FAILED(hr))
return FALSE;

I'm trying to use above texture as shared resource but create texture call is unsuccessful to create shared texture. 


Sponsor:

#2 MJP   Moderators   -  Reputation: 11010

Like
0Likes
Like

Posted 04 April 2013 - 12:29 PM

Create your device with the D3D10_CREATE_DEVICE_DEBUG flag, and check your debugger output window for a message explaining why the call failed.



#3 ybatra   Members   -  Reputation: 154

Like
0Likes
Like

Posted 05 April 2013 - 01:03 AM

No I found the solution, it is failing because  D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX flag support feature level 10.1 and I have to create it using device1. 






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