Exemplo n.º 1
0
        public Renderer(DeviceWrapper device)
        {
            this.device = device;
            for (int i = 0; i < layers.Length; i++)
            {
                layers[i] = new List <DisplayListEntry>();
            }

            defaultEffect  = device.LoadEffect(Properties.Resources.DefaultEffect);
            bboxEffect     = device.LoadEffect(Properties.Resources.BoundingBox);
            vtxDeclaration = new VertexDeclaration(device, new VertexElement[] {
                new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0),
                new VertexElement(0, 12, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0),
                new VertexElement(0, 20, DeclarationType.Float4, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 1),
                VertexElement.VertexDeclarationEnd
            });
            vec3Declaration = new VertexDeclaration(device, new VertexElement[] { new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0), VertexElement.VertexDeclarationEnd });
            axisDeclaration = new VertexDeclaration(device, new VertexElement[] {
                new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0),
                new VertexElement(0, 12, DeclarationType.Ubyte4, DeclarationMethod.Default, DeclarationUsage.Color, 0),
                VertexElement.VertexDeclarationEnd
            });
        }
Exemplo n.º 2
0
 public TextureManager(EmulationState state, DeviceWrapper device)
 {
     this.device = device;
     this.state  = state;
 }