Jump to content
  • Advertisement
Sign in to follow this  

CheckInterfaceSupport, D2D and D3D11 interop...

This topic is 2890 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

1: Why will m_pDXGIAdapter->CheckInterfaceSupport(GUID(ID3D11Device), NULL) always return failure code despite the fact that my graphics card supports D3D 11. I have ATI Mobility Radeon HD 5730 with the latest drivers (10.12)

2: CHECK_COM(m_pD2DFactory->CreateDxgiSurfaceRenderTarget(m_pDXGISurface, oD2DRTProps, &m_pD2DRT)); here CreateDxgiSurfaceRenderTarget will always return E_NOINTERFACE and I have created a D3D 11 device. Here's the code:

// Direct3D offscreen surface desc
D3D11_TEXTURE2D_DESC oD3DTexture2DDesc = {0};
oD3DTexture2DDesc.ArraySize = 1;
oD3DTexture2DDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
oD3DTexture2DDesc.Height = oD3DTexture2DDesc.Width = 512;
oD3DTexture2DDesc.MipLevels = 1;
oD3DTexture2DDesc.SampleDesc.Count = 1;
oD3DTexture2DDesc.Usage = D3D11_USAGE_DEFAULT;

// Create an offscreen D3D surface for D2D to render 2D content
CHECK_COM(m_pD3DDevice->CreateTexture2D(&oD3DTexture2DDesc, NULL, &m_pOffscreenTexture));

// Use the texture to obtain a DXGI surface

Now this code is from another method and all the parameters are valid...

// D2D render target properties
::memset(&oD2DRTProps, 0, sizeof(D2D1_RENDER_TARGET_PROPERTIES));
oD2DRTProps.type = D2D1_RENDER_TARGET_TYPE_HARDWARE; // Hardware rendering
oD2DRTProps.pixelFormat.format = DXGI_FORMAT_UNKNOWN; // Use the DXGI surface format
oD2DRTProps.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; // Alpha value is not premultiplied
oD2DRTProps.minLevel = D2D1_FEATURE_LEVEL_10; // DX10 video card required
oD2DRTProps.dpiX = fDPIX; // Horizontal DPI of the desktop
oD2DRTProps.dpiY = fDPIY; // Vertical DPI of the desktop

// D2D HWND render target properties
//oD2DHwndRTProps.hwnd = g_pMainFrame->m_hWnd; // Window handle
//oD2DHwndRTProps.pixelSize = oD2DRTSize; // Size of the render target
//oD2DHwndRTProps.presentOptions = D2D1_PRESENT_OPTIONS_IMMEDIATELY; // Present the frame immediately

// Create a render target
//CHECK_COM(m_pD2DFactory->CreateHwndRenderTarget(oD2DRTProps, oD2DHwndRTProps, &m_pD2DRT));
CHECK_COM(m_pD2DFactory->CreateDxgiSurfaceRenderTarget(m_pDXGISurface, oD2DRTProps, &m_pD2DRT)); Here, it will return E_NOINTERFACE :(

Is there any other way to do so w/o depending on D3D 10.1 device?

and the last question, which content format for exporting/importing geometries from 3ds Max/Maya should I use in my game? collada or fbx? which one is more widely used by game developers?

Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!