MyGL.h 1.23 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
# Copyright 2016-2018 The NOMAD Developers Group
 #
 # 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.
*/

17 18 19 20
#ifndef __MYGL_H
#define __MYGL_H

//FIXME, support more platforms in the future
21
#if defined(WIN32) || defined(CAVE)
22
	#include <GL/glew.h>
23
#else // Samsung GearVR + Oculus Mobile
24 25 26
	#ifdef OCULUSMOBILE
		#include "Kernel/OVR_GlUtils.h"
	#else
27
		#include <GLES3/gl31.h>
28 29 30
	//google cardboard, gvr
	#endif //OCULUSMOBILE
	#include "GLES2/gl2ext.h"
31
//ndk r10e does not provide opengles 3.2
32
	#ifndef GL_TESS_EVALUATION_SHADER
33
		#define GL_TESS_EVALUATION_SHADER GL_TESS_EVALUATION_SHADER_EXT
34
	#endif //GL_TESS_EVALUATION_SHADER
35 36 37
	#ifndef GL_DEPTH_COMPONENT32
		#define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES
	#endif
38
#endif //WIN32
39

40
#endif //__MYGL_H