コード例 #1
0
        public IndirectTexturing(EndianBinaryReader reader)
        {
            HasLookup      = reader.ReadBoolean();
            IndTexStageNum = reader.ReadByte();
            reader.SkipInt16();

            TevOrders = new IndirectTevOrder[4];
            for (int i = 0; i < 4; i++)
            {
                TevOrders[i] = new IndirectTevOrder(reader);
            }

            Matrices = new IndirectTexMatrix[3];
            for (int i = 0; i < 3; i++)
            {
                Matrices[i] = new IndirectTexMatrix(reader);
            }

            Scales = new IndirectTexScale[4];
            for (int i = 0; i < 4; i++)
            {
                Scales[i] = new IndirectTexScale(reader);
            }

            TevStages = new IndirectTevStage[16];
            for (int i = 0; i < 16; i++)
            {
                TevStages[i] = new IndirectTevStage(reader);
            }
        }
コード例 #2
0
        public IndirectTexturing()
        {
            HasLookup      = false;
            IndTexStageNum = 0;

            TevOrders = new IndirectTevOrder[4];
            for (int i = 0; i < 4; i++)
            {
                TevOrders[i] = new IndirectTevOrder(TexCoordId.Null, TexMapId.Null);
            }

            Matrices = new IndirectTexMatrix[3];
            for (int i = 0; i < 3; i++)
            {
                Matrices[i] = new IndirectTexMatrix(new OpenTK.Matrix2x3(0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f), 1);
            }

            Scales = new IndirectTexScale[4];
            for (int i = 0; i < 4; i++)
            {
                Scales[i] = new IndirectTexScale(IndirectScale.ITS_1, IndirectScale.ITS_1);
            }

            TevStages = new IndirectTevStage[16];
            for (int i = 0; i < 3; i++)
            {
                TevStages[i] = new IndirectTevStage(
                    TevStageId.TevStage0,
                    IndirectFormat.ITF_8,
                    IndirectBias.ITB_S,
                    IndirectMatrix.ITM_OFF,
                    IndirectWrap.ITW_OFF,
                    IndirectWrap.ITW_OFF,
                    false,
                    false,
                    IndirectAlpha.ITBA_OFF
                    );
            }
        }