I want to change one of the deafult values of my GraphicsDevice to that:
GraphicsDevice.DepthStencilState.DepthBufferEnable = true;
But I know only to change it on runtime in the Draw method by putting this code (which means it's changing the value everytime that the compiler is running the draw method!):
DepthStencilState state = new DepthStencilState(); state.DepthBufferEnable = true; GraphicsDevice.DepthStencilState = state;
Does someone know how to change it once in an officient way?