All pastes #409603 Raw Edit

Someone

public text v1 · immutable
#409603 ·published 2007-03-25 20:32 UTC
rendered paste body
Particle.Rotation += 0.05f;

                        Matrix Cam = Camera.ViewMatrix;

                        Cam.Invert ( );

                        Cam.M41 = 0;
                        Cam.M42 = 0;
                        Cam.M43 = 0;

                        AgrDXDevice.Device.RenderState.CullMode = Cull.CounterClockwise;
                        
                        AgrDXDevice.Device.RenderState.AlphaDestinationBlend = 1 - Blend.SourceAlpha;
                        
                        AgrDXDevice.Texture.SetTexture ( 0, "debug.png" );
                        AgrDXDevice.Device.SetStreamSource ( 0, vb, 0 );

                        AgrDXDevice.Device.VertexFormat = CustomVertex.PositionTextured.Format;

                        AgrDXDevice.Matrices.matWorld = Matrix.RotationZ ( Particle.Rotation ) * Cam * Matrix.Translation ( Particle.Position.X/10,
                            Particle.Position.Y / 10, Particle.Position.Z / 10 );
                        AgrDXDevice.Matrices.SetWorld ( );

                        AgrDXDevice.Device.DrawPrimitives ( PrimitiveType.TriangleStrip, 0, 2 );
                        AgrDXDevice.Texture.SetNullTexture ( 0 );
                        AgrDXDevice.Device.RenderState.CullMode = Cull.None;

                        AgrDXDevice.Device.RenderState.AlphaTestEnable = false;

                        AgrDXDevice.Matrices.matWorld = Matrix.Identity;
                        AgrDXDevice.Matrices.SetWorld ( );