Esempio n. 1
0
 public ModFpsHistoryGraph()
 {
     one            = 1;
     ENABLE_STATS   = false;
     DRAW_FPS_TEXT  = false;
     DRAW_FPS_GRAPH = false;
     DRAW_POSITION  = false;
     dtHistory      = new float[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         dtHistory[i] = 0;
     }
     chunkUpdateHistory = new float[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         chunkUpdateHistory[i] = 0;
     }
     pingHistory = new float[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         pingHistory[i] = 0;
     }
     todraw = new Draw2dData[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         todraw[i] = new Draw2dData();
     }
     StatsLines                = new string[StatsMaxLineCount];
     displayFont               = new FontCi();
     displayFont.size          = 10;
     displayFontHeadings       = new FontCi();
     displayFontHeadings.size  = 10;
     displayFontHeadings.style = 1;
     PositionLines             = new string[PositionLinesCount];
 }
 public ModFpsHistoryGraph()
 {
     one = 1;
     drawfpstext = false;
     drawfpsgraph = false;
     dtHistory = new float[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         dtHistory[i] = 0;
     }
     todraw = new Draw2dData[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         todraw[i] = new Draw2dData();
     }
 }
 public ModFpsHistoryGraph()
 {
     one          = 1;
     drawfpstext  = false;
     drawfpsgraph = false;
     dtHistory    = new float[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         dtHistory[i] = 0;
     }
     todraw = new Draw2dData[MaxCount];
     for (int i = 0; i < MaxCount; i++)
     {
         todraw[i] = new Draw2dData();
     }
 }
Esempio n. 4
0
    public void Draw2dTextures(Draw2dData[] todraw, int todrawLength, int textureid)
    {
        ModelData[] modelDatas = new ModelData[512];
        int modelDatasCount = 0;
        for (int i = 0; i < todrawLength; i++)
        {
            Draw2dData d = todraw[i];
            float x1 = d.x1;
            float y1 = d.y1;
            float width = d.width;
            float height = d.height;
            IntRef inAtlasId = d.inAtlasId;
            int textureId = textureid;
            int color = d.color;

            RectFRef rect = RectFRef.Create(0, 0, 1, 1);
            if (inAtlasId != null)
            {
                TextureAtlasCi.TextureCoords2d(inAtlasId.value, texturesPacked(), rect);
            }

            ModelData modelData =
                QuadModelData.GetQuadModelData2(rect.x, rect.y, rect.w, rect.h,
                x1, y1, width, height, Game.IntToByte(ColorR(color)), Game.IntToByte(ColorG(color)), Game.IntToByte(ColorB(color)), Game.IntToByte(ColorA(color)));
            modelDatas[modelDatasCount++] = modelData;
        }

        ModelData combined = CombineModelData(modelDatas, modelDatasCount);

        platform.GlDisableCullFace();
        platform.GlEnableTexture2d();
        platform.BindTexture2d(textureid);

        platform.GlDisableDepthTest();

        DrawModelData(combined);

        platform.GlEnableDepthTest();

        platform.GlDisableCullFace();
        platform.GlEnableTexture2d();
    }
Esempio n. 5
0
 public override void Draw2dTextures(Draw2dData[] todraw, int todrawLength, int textureId)
 {
     game.Draw2dTextures(todraw, todrawLength, textureId);
 }
Esempio n. 6
0
 public abstract void Draw2dTextures(Draw2dData[] todraw, int todrawLength, int textureId);