Printing text onto an image

This was originally a repsonse to a forum post at CompuTeach where a student was asking a question about a program that was throwing an ambiguous exception, rather than being satisfied with simply fixing the issue I went a bit mad and rewrote the whole thing. Hello I’m trying to add a logo to an image […]

Skybox

http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Skybox.php Just a few small changes to get this tutorial working in the new version of XNA In the new LoadModel() function simply remove the device parameter from effect.Clone(), so replace: meshPart.Effect = effect.Clone(device); with this: meshPart.Effect = effect.Clone(); and change the lines: device.SamplerStates[0].AddressU = TextureAddressMode.Clamp; device.SamplerStates[0].AddressV = TextureAddressMode.Clamp; device.RenderState.DepthBufferWriteEnable = false; to: device.SamplerStates[0] = […]

Alpha Blending

http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Alpha_blending.php Just a few changes to get this tutorial up and running, we will also expand upon this tutorial to get our bullets looking more realistic. XNA 4 gives us some handy state objects meaning that we instead of setting the three variables: device.RenderState.AlphaBlendEnable = true; device.RenderState.SourceBlend = Blend.One; device.RenderState.DestinationBlend = Blend.One; we can replace […]