Sign in to follow this  
ybatra

CreateTexture2D call unsuccessful

Recommended Posts

ybatra    155

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
ybatra    155

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this