Пример #1
0
        //public override void generateCommandsBegin(BaseRenderQueue q) { }

        public override void generateRenderCommand(RenderInfo r, BaseRenderQueue q)
        {
            StaticModelInfo smi = r as StaticModelInfo;

            q.addCommand(new SetRenderStateCommand(r.renderState));
            q.addCommand(new DrawIndexedCommand(PrimitiveType.Triangles, smi.indexCount, smi.indexOffset, DrawElementsType.UnsignedShort));
        }
Пример #2
0
        //       public override void preparePerPassFinalize(Pass p) { }
        //       public override void prepareFrameFinalize() { }
        #endregion

        #region generate command phase
        //       public override void generateRenderCommandsBegin(BaseRenderQueue q) { }
        public override void generateRenderCommand(RenderInfo r, BaseRenderQueue q)
        {
            ParticleSystemInfo psi = r as ParticleSystemInfo;

            q.addCommand(new SetRenderStateCommand(r.renderState));
            q.addCommand(new DrawArraysCommand(PrimitiveType.Points, 0, psi.count));
        }
Пример #3
0
        //public override void preparePerPassFinalize(Pass p) { }
        //public override void preparePerView(Renderable r, View v) { }
        //public override void prepareFrameFinalize() { }

        #endregion

        #region generate command phase
        //public override void generateCommandsBegin(BaseRenderQueue q) { }

        public override void generateRenderCommand(RenderInfo r, BaseRenderQueue q)
        {
            SkyboxRenderInfo skyInfo = r as SkyboxRenderInfo;

            q.addCommand(new SetRenderStateCommand(r.renderState));
            q.addCommand(new DrawIndexedCommand(PrimitiveType.Triangles, 36, 0, DrawElementsType.UnsignedShort));
        }