1 /*-------------------------------------------------------------------------
2 * OpenGL Conformance Test Suite
3 * -----------------------------
5 * Copyright (c) 2016 Google Inc.
6 * Copyright (c) 2016 The Khronos Group Inc.
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 * \brief CTS Android entry points.
23 */ /*-------------------------------------------------------------------*/
25 #include "glcAndroidTestActivity.hpp"
27 #if (DE_OS != DE_OS_ANDROID)
29 #elif (DE_ANDROID_API < 9)
30 #error "CTS runner requires API level 9 or greater"
33 static void createCTSActivity(ANativeActivity* activity, void* savedState, size_t savedStateSize, glu::ApiType type)
35 DE_UNREF(savedState && savedStateSize);
38 glcts::Android::TestActivity* obj = new glcts::Android::TestActivity(activity, type);
41 catch (const std::exception& e)
43 tcu::die("Failed to create activity: %s", e.what());
49 void createES2CTSActivity(ANativeActivity* activity, void* savedState, size_t savedStateSize)
51 createCTSActivity(activity, savedState, savedStateSize, glu::ApiType::es(2, 0));
54 void createES3CTSActivity(ANativeActivity* activity, void* savedState, size_t savedStateSize)
56 createCTSActivity(activity, savedState, savedStateSize, glu::ApiType::es(3, 0));
59 void createES31CTSActivity(ANativeActivity* activity, void* savedState, size_t savedStateSize)
61 createCTSActivity(activity, savedState, savedStateSize, glu::ApiType::es(3, 1));
64 void createES32CTSActivity(ANativeActivity* activity, void* savedState, size_t savedStateSize)
66 createCTSActivity(activity, savedState, savedStateSize, glu::ApiType::es(3, 2));
69 void createGL45CTSActivity(ANativeActivity* activity, void* savedState, size_t savedStateSize)
71 createCTSActivity(activity, savedState, savedStateSize, glu::ApiType::core(4, 5));