1

I have a C++ DirectX-based third-party game engine compiled into a Windows Phone Runtime Component DLL. I'm working on integrating it into a project based off of a Windows Phone Direct3D with XAML App. The game engine DLL uses the the D3D device, context and render view texture provided by the application's Direct3DBackground::Draw() method.

The built-in renderer from the sample is gone and replaced by the game engine's.

I can render but there is constant black flickering. Every other frame is black. To prove to myself that it wasn't the renderer (which has been proven to work elsewhere), I cut out all the rendering code from the game engine DLL to a simply setting a clear color. The result is still the same.

At first I thought it was because the Direct3DXamlAppComponent generated by the sample was maybe running in a different thread from the game engine DLL, but that's not the case. They're on the same thread.

  • What rendering problem could this configuration be causing?
  • Does the game engine's renderer need a separate d3d device?
  • Does the game engine's renderer need a separate d3d device context?

Things I haven't tried yet:

  • creating a second d3d device on the DLL
  • converting the game engine to provide its own IDrawingSurfaceManipulationHandler. But I'm not sure if it'll just have the same problem as above.
djcouchycouch
  • 12,724
  • 13
  • 69
  • 108

1 Answers1

1

The problem came from the render target view. I didn't realize that the pointer to it gets updated every frame. I had just set it to the game engine renderer once at start up. Now I update the render view target pointer every frame and now the black flickers are gone.

djcouchycouch
  • 12,724
  • 13
  • 69
  • 108