Sign in to follow this  

CreateTexture2D call unsuccessful

This topic is 1748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites
Sign in to follow this