Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models to not render properly by default #5558

Closed
dellis1972 opened this issue Mar 8, 2017 · 4 comments
Closed

Models to not render properly by default #5558

dellis1972 opened this issue Mar 8, 2017 · 4 comments

Comments

@dellis1972
Copy link
Contributor

When loading and rendering a 3d model using the same code as XNA the model looks transparent / inside out. You have to add the following code before you draw the model to get it to work.

GraphicsDevice.DepthStencilState = DepthStencilState.Default;

@dellis1972
Copy link
Contributor Author

We should probably set this by default (if possible)

@tomspilman
Copy link
Member

You have to add the following code before you draw the model to get it to work.

DepthStencilState.Default is the default state when the graphics device is initialized.

https://github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Graphics/GraphicsDevice.cs#L280

So unless someone changes it before this point it would be set.

We should probably set this by default (if possible)

By default where?

@dellis1972
Copy link
Contributor Author

dellis1972 commented Mar 8, 2017 via email

@Jjagg
Copy link
Contributor

Jjagg commented Dec 10, 2018

SpriteBatch modifies state. That is also the case in XNA. This is not a bug.

@Jjagg Jjagg closed this as completed Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants