• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*-------------------------------------------------------------------------
2  * drawElements Quality Program Tester Core
3  * ----------------------------------------
4  *
5  * Copyright 2014 The Android Open Source Project
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  *//*!
20  * \file
21  * \brief Null GL platform.
22  *//*--------------------------------------------------------------------*/
23 
24 #include "tcuNullPlatform.hpp"
25 #include "tcuNullRenderContext.hpp"
26 
27 namespace tcu
28 {
29 namespace null
30 {
31 
32 class NullContextFactory : public glu::ContextFactory
33 {
34 public:
NullContextFactory(void)35 	NullContextFactory (void)
36 		: glu::ContextFactory("null", "Null Render Context")
37 	{
38 	}
39 
createContext(const glu::RenderConfig & config,const tcu::CommandLine &) const40 	glu::RenderContext* createContext (const glu::RenderConfig& config, const tcu::CommandLine&) const
41 	{
42 		return new RenderContext(config);
43 	}
44 };
45 
Platform(void)46 Platform::Platform (void)
47 {
48 	m_contextFactoryRegistry.registerFactory(new NullContextFactory());
49 }
50 
~Platform(void)51 Platform::~Platform (void)
52 {
53 }
54 
55 } // null
56 } // tcu
57 
createPlatform(void)58 tcu::Platform* createPlatform (void)
59 {
60 	return new tcu::null::Platform();
61 }
62