new private static void Load() { if (!Loaded) { RingModel = AssetManager.Load <Model>("Models/ShipGame/Ring"); RingEffect = (_3DEffect) new _3DEffect().Create("Effects/WhiteEffect"); Loaded = true; } }
public static void DrawModel(Model model, EffectValue effect, Camera3D camera, Basic3DObject obj) { if (model != null && effect.get() != null) { _3DEffect effect3D = (_3DEffect)effect.Holder; effect3D.SetFromObject(obj); effect3D.SetFromCamera(camera); DrawModel(model, effect3D.MyEffect); } }
public static void Load() { #if EDITOR RenderTime = new StopwatchWrapper("RenderTime", false); #endif BasicFont = Game1.content.Load <SpriteFont>("Fonts/BasicFont"); BlankTexture = Game1.content.Load <Texture2D>("Textures/blank"); TransparentTexture = Game1.content.Load <Texture2D>("Editor/Transparent"); WhiteEffectHolder = (_3DEffect) new _3DEffect().Create("Effects/WhiteEffect"); }
public static void Load() { if (!Loaded) { CubeModel = AssetManager.Load <Model>("Models/Editor/Cube"); CubeEffectHolder = (_3DEffect) new _3DEffect().Create("Effects/CubeEffect"); Loaded = true; ColorEffectHolder = (_3DEffect) new _3DEffect().Create("Effects/ColorEffect"); LoadSphere(); LoadCube(); } }
public override void Draw3D(Camera3D camera, GameObjectTag DrawTag) { if (MyModel.get() != null && MyEffect.get() != null) { Game1.graphicsDevice.BlendState = BlendState.AlphaBlend; _3DEffect effect3D = (_3DEffect)MyEffect.Holder; effect3D.SetFromObject(this); effect3D.SetFromCamera(camera); Render.DrawModel(MyModel.get(), MyEffect.get()); } base.Draw3D(camera, DrawTag); }
public static void Load() { if (!Loaded) { Loaded = true; LoadIcons(); CubeModel = AssetManager.Load <Model>("Editor/CubeModel"); ArrowModel = AssetManager.Load <Model>("Editor/ArrowModel"); BallModel = AssetManager.Load <Model>("Editor/BallModel"); ColorEffectHolder = (_3DEffect) new _3DEffect().Create("Editor/ColorEffect"); ColorSetEffectHolder = (_3DEffect) new _3DEffect().Create("Editor/ColorSetEffect"); GlowCircle = AssetManager.Load <Texture2D>("Editor/GlowCircle"); PointCount = 6; PointList = new VertexPositionColor[PointCount]; Indicies = new short[PointCount]; int i = 0; PointList[i++] = new VertexPositionColor( new Vector3(5, 0, 0), PointColors[0]); PointList[i++] = new VertexPositionColor( new Vector3(0, 0, 0), PointColors[0]); PointList[i++] = new VertexPositionColor( new Vector3(0, 5, 0), PointColors[1]); PointList[i++] = new VertexPositionColor( new Vector3(0, 0, 0), PointColors[1]); PointList[i++] = new VertexPositionColor( new Vector3(0, 0, 5), PointColors[2]); PointList[i++] = new VertexPositionColor( new Vector3(0, 0, 0), PointColors[2]); for (i = 0; i < PointCount; i += 1) { Indicies[i] = (short)(i); } } }
new public static void Load() { if (!Loaded) { Loaded = true; ColorEffectHolder = (_3DEffect) new _3DEffect().Create("Editor/ColorEffect"); PointCount = 6; PointList = new VertexPositionColor[PointCount]; Indicies = new short[PointCount]; int i = 0; PointList[i++] = new VertexPositionColor( new Vector3(1, 0, 0), PointColors[0]); PointList[i++] = new VertexPositionColor( new Vector3(-1, 0, 0), PointColors[0]); PointList[i++] = new VertexPositionColor( new Vector3(0, 1, 0), PointColors[1]); PointList[i++] = new VertexPositionColor( new Vector3(0, -1, 0), PointColors[1]); PointList[i++] = new VertexPositionColor( new Vector3(0, 0, 1), PointColors[2]); PointList[i++] = new VertexPositionColor( new Vector3(0, 0, -1), PointColors[2]); for (i = 0; i < PointCount; i += 1) { Indicies[i] = (short)(i); } } }