summaryrefslogtreecommitdiff
path: root/BenchmarkFramework/app/src/main/java/graphics_benchmarks/lesson08/RunNehe08.java
blob: ec01b9de30f8054635dd33f6bf87ac8851993f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
 * Copyright (C) 2010 0xlab - http://0xlab.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Authored by Julian Chu <walkingice@0xlab.org>
 */

package graphics_benchmarks.lesson08;

import graphics_benchmarks.graphics.Tester;

import android.app.Activity;
import android.os.Bundle;

/**
 * The initial Android Activity, setting and initiating
 * the OpenGL ES Renderer Class @see Lesson08.java
 * 
 * @author Savas Ziplies (nea/INsanityDesign)
 */
public class RunNehe08 extends Tester {

    public final static String FullName = "com.nea.nehe.lesson08.RunNehe08";

    /** Our own OpenGL View overridden */
    private Lesson08 lesson08;

    @Override
    public String getTag() {
        return "Nehe08";
    }

    @Override
    public int sleepBeforeStart() {
        return 1200; // 1.2 second
    }

    @Override
    public int sleepBetweenRound() {
        return 0; 
    }

    @Override
    protected void oneRound() {
//        lesson08.requestRender();
    }

    /**
     * Initiate our @see Lesson08.java,
     * which is GLSurfaceView and Renderer
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        //Initiate our Lesson with this Activity Context handed over
        lesson08 = new Lesson08(this);
        lesson08.setSpeedAndTester(1, 1, this);
        //Set the lesson as View to the Activity
        setContentView(lesson08);
        startTester();
    }

    /**
     * Remember to resume our Lesson
     */
    @Override
    protected void onResume() {
        super.onResume();
        lesson08.onResume();
    }

    /**
     * Also pause our Lesson
     */
    @Override
    protected void onPause() {
        super.onPause();
        lesson08.onPause();
    }

}