Exemplo n.º 1
0
 protected void initVertexLayout(Device device, Effect effect)
 {
     VertexLayout = new InputLayout(
         device,
         EffectManager11.Signature(effect, 0, 0),
         PmxVertexStruct.VertexElements);
 }
Exemplo n.º 2
0
 public virtual void LoadContent(ICommonContents commonContents)
 {
     EffectManager = new EffectManager11(commonContents.Effect);
     InitCamera();
     InitLight();
     DrawablePmx = (DrawablePmx)commonContents.CommonDrawables[0];
 }
Exemplo n.º 3
0
 public void Draw(EffectManager11 effectManager)
 {
     if (!Visible)
     {
         return;
     }
     effectManager.Effect.Device.ImmediateContext.DrawIndexed(
         OriginMaterial.Faces.Count * 3, IndexOffset, 0);
 }
Exemplo n.º 4
0
        public void SetEffect(EffectManager11 effectManager)
        {
            effectManager.SetMaterial(OriginMaterial, Textures);
            switch (OriginMaterial.SphereMode)
            {
            case SphereType.None:
            case SphereType.Mul:
            case SphereType.SubTex:
                SetEffect(effectManager, 0);
                break;

            case SphereType.Add:
                SetEffect(effectManager, 1);
                break;
            }
        }
Exemplo n.º 5
0
 public void SetEffectManager(EffectManager11 effectManager, bool isCommon)
 {
     EffectManager           = effectManager;
     m_IsCommonEffectManager = isCommon;
 }
Exemplo n.º 6
0
 private void initEffect(Device device)
 {
     Effect = EffectManager11.InitEffect(device);
 }
Exemplo n.º 7
0
 public void SetEffect(EffectManager11 effectManager, int technique)
 {
     effectManager.SetMaterial(OriginMaterial, Textures);
     effectManager.SetTechAndPass(technique, 0);
 }