public void Bind(Effect effect) { this.effect = effect; effectCache.Load(effect, TechniqueExt + "_SURF"); LoadTextures(); }
/// <summary> /// Load up anything that doesn't require a device. /// </summary> /// <param name="immediate"></param> public static void LoadContent(bool immediate) { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\ShowBudget"); ShaderGlobals.RegisterEffect("ShowBudget", effect); effectCache.Load(effect, ""); budgetTechnique = effect.Techniques["ShowBudget"]; glowTechnique = effect.Techniques["BorderGlow"]; } if (background == null) { background = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BudgetBackground"); } if (mask == null) { mask = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BudgetMask"); } if (glow == null) { glow = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BudgetGlow"); } }
public static void Load(GraphicsDevice device) { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Ripple"); ShaderGlobals.RegisterEffect("Ripple", effect); effectCache.Load(effect); } if (texture == null) { texture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BullsEye1"); } if (verts == null) { verts = new DynamicVertexBuffer(device, typeof(Vertex), kMaxVerts, BufferUsage.WriteOnly); } if (indices == null) { indices = new IndexBuffer(device, typeof(Int16), kMaxIndices, BufferUsage.WriteOnly); Int16[] localIdx = new Int16[kMaxIndices]; for (int i = 0; i < kMaxTiles; ++i) { localIdx[i * 6 + 0] = (short)(i * 4 + 0); localIdx[i * 6 + 1] = (short)(i * 4 + 1); localIdx[i * 6 + 2] = (short)(i * 4 + 2); localIdx[i * 6 + 3] = (short)(i * 4 + 2); localIdx[i * 6 + 4] = (short)(i * 4 + 1); localIdx[i * 6 + 5] = (short)(i * 4 + 3); } indices.SetData <Int16>(localIdx); } }
/// <summary> /// Load up resource needed for rendering, all shared statics. /// </summary> /// <param name="immediate"></param> public static void LoadContent(bool immediate) { if (bump == null) { bump = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\DistortionWake"); } if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Standard"); ShaderGlobals.RegisterEffect("Standard", effect); effectCache.Load(effect, ""); } }
public static void Load() { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Shield"); ShaderGlobals.RegisterEffect("Shield", effect); effectCache.Load(effect, ""); } if (crossTexture == null) { crossTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\Ring"); } }
/// <summary> /// Called to tell an object to load any device dependent parts of itself. /// </summary> public override void LoadContent(bool immediate) { if (mask == null) { mask = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\FPEMask"); } if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\FPEGlow"); effectCache.Load(Effect, ""); } base.LoadContent(immediate); }
public static void LoadContent(bool immediate) { if (EnabledSM2 || EnabledSM3) { if (bump == null) { bump = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\DistortionWake"); } if (partyEffect == null) { partyEffect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Particle2D"); effectCache.Load(PartyEffect, ""); } if (distFilter == null) { distFilter = new DistortFilter("DistortFilter"); } distFilter.LoadContent(immediate); } Distortion.LoadContent(immediate); }