Reputation: 1557
I'm creating my first 3D app in XNA and I have a problem. I created a quad from this tutorial: http://msdn.microsoft.com/en-us/library/bb464051%28XNAGameStudio.10%29.aspx I didn't need any texture for now so I moved quadEffect definition to Initialize and left only this line:
quadEffect = new BasicEffect(graphics.GraphicsDevice);
It is displaying as white wall.
Also I am able to move my camera. It works fine but when i go behind my wall it disappears. What is causing this and how can I make it visible from both sides?
Upvotes: 1
Views: 161
Reputation: 11273
Backface culling is done by default in XNA. If you want to draw the backface of your quad, you will need to set the culling mode:
RasterizerState rs = new RasterizerState();
rs.CullMode = CullMode.None;
GraphicsDevice.RasterizerState = rs;
Upvotes: 2