XBox One 3D not working!

So, I have a full monogame project that works fine in windows. I’m trying to deploy it to an XBox One in dev mode, and it deploys fine, but only the 2D assets actually display when the game runs. All the 3D assets (FBX Models) fail to display. I’m getting no error messages or anything, just nothing showing on screen.

SO, thinking it was something with my codebase (which is rather large), I went back to a very very simple XNA sample that just draws a single triangle on the screen. Same result. Text will display, but any 3D content is just invisible.

Does anyone have any idea what is going on? Both programs work just fine in windows, but I consistently get no errors and no 3D stuff displayed on XBox One. I’m at wits end here, so any help would be appreciated. I can post whatever code is needed, but at this point I’m not even sure what to post.

Thanks in advance for any help!

Have you tried any of the 3D samples from XNA.com or MSDN.com 's XNA documentation?

MonoGame seems to lagg behind in 3D and especially shaders.

It’s still early days for Xbox One UWP apps, and we have found there are some functional differences in DirectX on Xbox One versus all other UWP platforms.

The sample I tried was this one:

Drawing Triangles

Is there any documentation or anything on how to convert a shader to work on XBox One? Or any hints on what could be different that would cause things not to display?

I literally cannot get a single triangle to display on the xbox one…and I have no idea why. I don’t know if the functionality just isn’t there, or if there is some simple setting or something that needs to be different between windows and xbox…

Okay, I found another thread dealing with this same issue: XB1 and MonoGame and it refers to XBox One requiring dynamic vertex buffers instead of standard vertex buffers. SO I modified the single triangle example to use a DynamicVertexBuffer, and lo and behold, it works!

However, the real game I’ve been working on used Models and Meshes extensively…I have not idea how to force those to use dynamic vertex buffers, or if that is even possible. Does anyone have any experience with this? Is there a way to have a Mesh loaded from the Content manager use DynamicVertexBuffers?

Sample of my actual rendering code is below in case that helps…

        foreach (ModelMesh mesh in model.Meshes)
        {
            if (mesh.BoundingSphere.Radius < bsRadius)
            {
                bsCenter = mesh.BoundingSphere.Center;
                bsRadius = mesh.BoundingSphere.Radius;
            }

            foreach (BasicEffect be in mesh.Effects)
            {
                be.EnableDefaultLighting();
                be.Projection = c.Projection;
                be.View = c.View;
                be.World = boneTransforms[mesh.ParentBone.Index] * Matrix.CreateScale((1.0f / bsRadius) * scaleFactor) * GetWorld();

                if (OverrideTexture != null)
                {
                    if (((OverrideTextureForMeshNumber.HasValue) && (OverrideTextureForMeshNumber.Value == meshNumber)) || !OverrideTextureForMeshNumber.HasValue)
                    {
                        if (savedTexture == null)
                            savedTexture = be.Texture;

                        be.Texture = OverrideTexture;
                    }
                }
                else
                {
                    if (((OverrideTextureForMeshNumber.HasValue) && (OverrideTextureForMeshNumber.Value == meshNumber)) || !OverrideTextureForMeshNumber.HasValue)
                    {
                        if (savedTexture != null)
                            be.Texture = savedTexture;
                    }
                }
            }

            mesh.Draw();

            meshNumber++;
        }
    }

Related discussion on MSDN forums:
https://social.msdn.microsoft.com/Forums/en-US/065cf45b-b285-402e-8bc1-78a577d23d9d/uwpxbox-dynamic-vertex-buffer-creation?forum=wpdevelop

Daniel, did you find a solution to the behavior you are seeing? I am encountering it as well – I reached out to MS on their forums to see if they might have insight into the behavior (i.e. is this expected behavior with the XBOX DirectX API) or a possible bug with MonoGame or UWP DirectX.

I still have not been able to find a solution that I can use, and for the moment have switched to Unity until this is resolved.

I CAN tell you that simply changing your VertexBuffers and IndexBuffers to be DynamicVertexBuffers and DynamicIndexBuffers will allow things to be drawn onscreen on XBox One. I successully tested this with a single triangle.

But that doesn’t actually help in my case, because I’m loading Models. I’ve STARTED looking through the Monogame source code to try to see if there’s a way to have it load Models using DynamicVertexBuffers behind the scenes with a switch or something, but haven’t made a lot of progress on it.

Sorry I couldn’t be more help…

FYI. I setup a specific issue for this:

It is very curious as on XB1 suffers from the issue and none of the other DirectX platforms which use the exact same code for the last 5 years.