This project is read-only.

error on tutorial 16

Mar 15, 2012 at 8:41 PM

Hi,

I suffered runtime error on tutorial 16. I just download the tutorial 16 and .sln of the whole tutorial and copy them to the original tutorials on my computer.  I got this error when running tutorial 16: Fileloadexception was unhandled on  "capture = new DCapture(videoDevice, audioDevice);" on file "DirectShowCapture.cs". Is there something I missed?

Coordinator
Mar 16, 2012 at 12:11 AM

Hmm... Never seen that error before. Does tutorial 8 work, assuming you're running it from the unzipped distribution package?

Ohan

Mar 16, 2012 at 3:31 PM

Hi,

Thank you for the reply. I have upgraded the goblinXNA, and this error did not come again. However, I met this error on the red line below. The error is "already has a parent". I remember before, when I use RemoveChild and AddChild, sometimes it would run this error.

// Set the render target for rendering the AR scene
            scene.SceneRenderTarget = arViewRenderTarget;
            // Set the scene background size to be the size of the AR scene viewport
            scene.BackgroundBound = arViewRect;
            // Set the camera to be the AR camera
            scene.CameraNode = arCameraNode;
            // Associate the overlaid model with the ground marker for rendering it in AR scene
            scene.RootNode.RemoveChild(overlayNode.Parent);
            groundMarkerNode.AddChild(overlayNode.Parent);
            // Don't render the marker board and camera representation
            markerBoardGeom.Enabled = false;
            vrCameraRepNode.Enabled = false;
            // Show the video background
            scene.ShowCameraImage = true;
            // Render the AR scene
            scene.Draw(gameTime.ElapsedGameTime, gameTime.IsRunningSlowly);

            // Set the render target for rendering the VR scene
            scene.SceneRenderTarget = vrViewRenderTarget;
Coordinator
Mar 17, 2012 at 9:28 PM

Hmm... interesting. Theoretically, from the code, that should never happen. So you saw this error in Tutorial 16, correct?

Ohan