⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jbenchmark3d.java~14~

📁 jbenchmark3D 的源码,带jbuilder工程
💻 JAVA~14~
📖 第 1 页 / 共 2 页
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-5-14 下午 04:37:47
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name:   JBenchmark3D.java

import java.util.*;
import javax.microedition.lcdui.*;
import javax.microedition.m3g.Graphics3D;
import javax.microedition.midlet.MIDlet;

public class JBenchmark3D extends MIDlet
    implements CommandListener
{
    class MyTimerTask extends TimerTask
    {

        public void run()
        {
            if(a_d_fld != null)
                a_d_fld.repaint();
        }

        MyTimerTask()
        {
        }
    }


    public void startTest()
    {
        a_d_fld.a();
        a_c_fld.d_boolean_fld = false;
        if(a_java_lang_Thread_fld != null);
    }

    public JBenchmark3D()
    {
        a_boolean_fld = true;
        a_javax_microedition_lcdui_Display_fld = Display.getDisplay(this);
        a_javax_microedition_lcdui_Form_fld = new Form("Wellcome!");
        try
        {
            a_javax_microedition_lcdui_Form_fld.append(new ImageItem("", Image.createImage("/JBenchmark3D/jbenchmark3d128.png"), 51, ""));
        }
        catch(Exception exception) { }
        StringItem stringitem = new StringItem("", "\nChoose \"Start\" from Menu to run the test.");
        stringitem.setLayout(51);
        a_javax_microedition_lcdui_Form_fld.append(stringitem);
        a_javax_microedition_lcdui_Display_fld.setCurrent(a_javax_microedition_lcdui_Form_fld);
        b_javax_microedition_lcdui_Command_fld = new Command("Exit", 7, 1);
        i = new Command("Restart", 1, 1);
        c_javax_microedition_lcdui_Command_fld = new Command("Start", 1, 1);
        g = new Command("Upload", 1, 1);
        d = new Command("Upload result", 1, 1);
        a_javax_microedition_lcdui_Command_fld = new Command("Help", 1, 2);
        f = new Command("About", 1, 2);
        e = new Command("Credits", 1, 2);
        h = new Command("Back", 2, 1);
        a_javax_microedition_lcdui_Form_fld.addCommand(c_javax_microedition_lcdui_Command_fld);
        a_javax_microedition_lcdui_Form_fld.addCommand(b_javax_microedition_lcdui_Command_fld);
        a_javax_microedition_lcdui_Form_fld.addCommand(a_javax_microedition_lcdui_Command_fld);
        a_javax_microedition_lcdui_Form_fld.addCommand(f);
        a_javax_microedition_lcdui_Form_fld.addCommand(e);
        a_javax_microedition_lcdui_Form_fld.setCommandListener(this);
        a_c_fld = new c();
        a_d_fld = new d(this);
        a_c_fld.b_boolean_fld = a_javax_microedition_lcdui_Display_fld.isColor();
        a_c_fld.b_int_fld = a_javax_microedition_lcdui_Display_fld.numAlphaLevels();
        a_c_fld.f = a_javax_microedition_lcdui_Display_fld.numColors();
        a_c_fld.c_boolean_fld = a_d_fld.isDoubleBuffered();
        a_c_fld.c_java_lang_String_fld = getAppProperty("MIDlet-Version");
    }

    public void startApp()
    {
    }

    public void pauseApp()
    {
    }

    public void destroyApp(boolean flag1)
    {
    }

    public void exitMIDlet()
    {
        if(a_java_lang_Thread_fld != null)
            a_java_lang_Thread_fld = null;
        System.gc();
        destroyApp(true);
        notifyDestroyed();
    }

    public void stopbenchmark()
    {
        System.out.println("now stop benchmark!\n");
        a_javax_microedition_lcdui_Form_fld.deleteAll();
        a_javax_microedition_lcdui_Form_fld.setTitle("Results");
        String s = new String();
        Font.getFont(0, 1, 8);
        a_javax_microedition_lcdui_Form_fld.append("Performance\n");
        Font.getFont(0, 0, 8);
        a_javax_microedition_lcdui_Form_fld.append("JBenchmark3D HQ: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.d_int_fld));
        a_javax_microedition_lcdui_Form_fld.append("\nJBenchmark3D LQ: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.j));
        a_javax_microedition_lcdui_Form_fld.append("\nTriangles ps: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.e));
        a_javax_microedition_lcdui_Form_fld.append("\nKTexels ps: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.c_int_fld));
        a_javax_microedition_lcdui_Form_fld.append("\n\nJBenchmark version: ");
        a_javax_microedition_lcdui_Form_fld.append(s + a_c_fld.c_java_lang_String_fld);
        a_javax_microedition_lcdui_Form_fld.append("\nScreen (canvas) width: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.k));
        a_javax_microedition_lcdui_Form_fld.append("\nScreen (canvas) height: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.i));

        System.out.println("now stop benchmark2!\n");

        Font.getFont(0, 1, 8);

        a_javax_microedition_lcdui_Form_fld.append("\n\n3D subsystem: ");
        Font.getFont(0, 0, 8);
        a_javax_microedition_lcdui_Form_fld.append("\nM3G Version: ");
        a_javax_microedition_lcdui_Form_fld.append(s + System.getProperty("microedition.m3g.version"));
        Hashtable hashtable = Graphics3D.getProperties();
        a_javax_microedition_lcdui_Form_fld.append("\nAntialiasing: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Boolean)hashtable.get("supportAntialiasing"));
        a_javax_microedition_lcdui_Form_fld.append("\nTrue color: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Boolean)hashtable.get("supportTrueColor"));
        a_javax_microedition_lcdui_Form_fld.append("\nDithering: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Boolean)hashtable.get("supportDithering"));
        a_javax_microedition_lcdui_Form_fld.append("\nMipmapping: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Boolean)hashtable.get("supportMipmapping"));
        a_javax_microedition_lcdui_Form_fld.append("\nPerpective Correction: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Boolean)hashtable.get("supportPerspectiveCorrection"));
        a_javax_microedition_lcdui_Form_fld.append("\nLocal Camera Lighting: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Boolean)hashtable.get("supportLocalCameraLighting"));
        a_javax_microedition_lcdui_Form_fld.append("\nMax Lights: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Integer)hashtable.get("maxLights"));
        a_javax_microedition_lcdui_Form_fld.append("\nMax Viewport Dimension: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Integer)hashtable.get("maxViewportDimension"));
        a_javax_microedition_lcdui_Form_fld.append("\nMax Texture Dimension: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Integer)hashtable.get("maxTextureDimension"));
        a_javax_microedition_lcdui_Form_fld.append("\nMax Sprite Crop Dimension: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Integer)hashtable.get("maxSpriteCropDimension"));
        a_javax_microedition_lcdui_Form_fld.append("\nMax Transforms Per Vertex: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Integer)hashtable.get("maxTransformsPerVertex"));
        a_javax_microedition_lcdui_Form_fld.append("\nNumber of Texture Units: ");
        a_javax_microedition_lcdui_Form_fld.append(s + (Integer)hashtable.get("numTextureUnits"));
        System.out.println("now stop benchmark3!\n");
        Font.getFont(0, 1, 8);
        a_javax_microedition_lcdui_Form_fld.append("\n\nOther properties: ");
        Font.getFont(0, 0, 8);
        a_javax_microedition_lcdui_Form_fld.append("\nColor screen: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.b_boolean_fld));
        a_javax_microedition_lcdui_Form_fld.append("\nNumber of colors: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.f));
        a_javax_microedition_lcdui_Form_fld.append("\nTransparency (Alpha level): ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.b_int_fld));
        a_javax_microedition_lcdui_Form_fld.append("\nDouble buffer: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(a_c_fld.c_boolean_fld));
        System.out.println("now stop benchmark3.4!\n");
        a_javax_microedition_lcdui_Form_fld.append("\nTotal memory: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(Runtime.getRuntime().totalMemory()));
        a_javax_microedition_lcdui_Form_fld.append("\nFree memory: ");
        a_javax_microedition_lcdui_Form_fld.append(String.valueOf(Runtime.getRuntime().freeMemory()));
        a_javax_microedition_lcdui_Form_fld.append("\n\nMicroedition Configuration: ");
        a_javax_microedition_lcdui_Form_fld.append(s + System.getProperty("microedition.configuration"));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -