Beispiel #1
0
 public override void setCompressedTexImage(int level, int internalFormat, int width, int height, int compressedSize, Buffer buffer)
 {
     if (useTextureCache)
     {
         cachedTextureStatistics.start();
         // TODO Cache all the texture levels
         if (level == 0)
         {
             int                    bufferWidth            = context.texture_buffer_width[level];
             IMemoryReader          imageReader            = ImageReader.getImageReader(context.texture_base_pointer[level], width, height, bufferWidth, internalFormat, false, 0, 0, 0, 0, 0, 0, null, null);
             CachedTexture          cachedTexture          = CachedTexture.getCachedTexture(System.Math.Min(width, bufferWidth), height, internalFormat, imageReader);
             CachedTextureResampled cachedTextureResampled = new CachedTextureResampled(cachedTexture);
             cachedTextures[bindTexture_Renamed] = cachedTextureResampled;
         }
         cachedTextureStatistics.end();
     }
 }
Beispiel #2
0
        public static bool coreInterpretWithStatistics()
        {
            coreInterpret.start();
            bool result = coreInterpret();

            coreInterpret.end();

            return(result);
        }
Beispiel #3
0
        public override void preRender()
        {
            pixel.reset();

            base.preRender();

            if (DurationStatistics.collectStatistics && isLogInfoEnabled)
            {
                pixelStatistics.reset();
                pixelStatistics.start();
            }
        }
Beispiel #4
0
        public override void drawArrays(int primitive, int first, int count)
        {
            drawArraysStatistics.start();
            switch (primitive)
            {
            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_SPRITES:
                drawArraysSprites(first, count);
                break;

            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_TRIANGLE_STRIP:
                drawArraysTriangleStrips(first, count);
                break;

            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_TRIANGLES:
                drawArraysTriangles(first, count);
                break;

            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_TRIANGLE_FAN:
                drawArraysTriangleFan(first, count);
                break;
            }
            drawArraysStatistics.end();
        }