• 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 EGL common defines and types
22  *//*--------------------------------------------------------------------*/
23 
24 #include "egluStaticESLibrary.hpp"
25 #include "tcuFunctionLibrary.hpp"
26 
27 #if defined(DEQP_SUPPORT_GLES2) && !defined(DEQP_GLES2_RUNTIME_LOAD)
28 #	if (DE_OS == DE_OS_IOS)
29 #		include <OpenGLES/ES2/gl.h>
30 #	else
31 #		include <GLES2/gl2.h>
32 #	endif
33 #endif
34 
35 #if defined(DEQP_SUPPORT_GLES3) && !defined(DEQP_GLES3_RUNTIME_LOAD)
36 #	if (DE_OS == DE_OS_IOS)
37 #		include <OpenGLES/ES3/gl.h>
38 #	else
39 #		include <GLES3/gl3.h>
40 #	endif
41 #endif
42 
43 // \todo [2014-03-14 pyry] ES3.1 support
44 
45 namespace eglu
46 {
47 
createStaticESLibrary(void)48 tcu::FunctionLibrary* createStaticESLibrary (void)
49 {
50 	static const tcu::StaticFunctionLibrary::Entry s_functions[] =
51 	{
52 #if defined(DEQP_SUPPORT_GLES3) && !defined(DEQP_GLES3_RUNTIME_LOAD)
53 #	include "egluStaticES20Library.inl"
54 #	include "egluStaticES30Library.inl"
55 #elif defined(DEQP_SUPPORT_GLES2) && !defined(DEQP_GLES2_RUNTIME_LOAD)
56 #	include "egluStaticES20Library.inl"
57 #endif
58 	};
59 
60 	return new tcu::StaticFunctionLibrary(&s_functions[0], DE_LENGTH_OF_ARRAY(s_functions));
61 }
62 
63 } // eglu
64