From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/opengles/IncludesGLES.h | 71 +++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Runtime/GfxDevice/opengles/IncludesGLES.h (limited to 'Runtime/GfxDevice/opengles/IncludesGLES.h') diff --git a/Runtime/GfxDevice/opengles/IncludesGLES.h b/Runtime/GfxDevice/opengles/IncludesGLES.h new file mode 100644 index 0000000..300199d --- /dev/null +++ b/Runtime/GfxDevice/opengles/IncludesGLES.h @@ -0,0 +1,71 @@ +#pragma once + +#ifdef UNITYGL_H +# error "Don't Mix with UnityGL!!!" +#endif + +#define GFX_SUPPORTS_OPENGLESXX (GFX_SUPPORTS_OPENGLES20 || GFX_SUPPORTS_OPENGLES30) + +#if GFX_SUPPORTS_OPENGLESXX + +#define GFX_SUPPORTS_EGL (UNITY_WIN || UNITY_LINUX || UNITY_ANDROID || UNITY_TIZEN || UNITY_BB10) + +#if UNITY_ANDROID || UNITY_WEBGL +# define GL_GLEXT_PROTOTYPES +#endif + +#if GFX_SUPPORTS_OPENGLES30 +# if UNITY_WIN +# include "PlatformDependent/WinPlayer/unityes_egl.h" +# include "PlatformDependent/WinPlayer/unityes_gl2.h" + // \todo [pyry] Remove gl2ext include since most of the extensions are now in core +# include "PlatformDependent/WinPlayer/unityes_gl2ext.h" +# include "PlatformDependent/WinPlayer/unityes_gl3.h" +# define INCLUDE_GLES_2X 1 +# define INCLUDE_GLES_3X 1 +# define DEF(ret,name,args) extern ret (WINAPI *name) args +# include "PlatformDependent/WinPlayer/GLESFunctionDefs.h" +# elif UNITY_ANDROID +# include +# include "PlatformDependent/AndroidPlayer/unityes_gl3.h" + // \todo [pyry] Remove gl2ext include since most of the extensions are now in core +# include +# include "Runtime/GfxDevice/opengles20/UnityGLES20Ext.h" +# else +# error "Unknown platform" +# endif +# +# include "Runtime/GfxDevice/opengles30//UnityGLES30Ext.h" + +#elif GFX_SUPPORTS_OPENGLES20 +# if UNITY_WIN +# include "PlatformDependent/WinPlayer/unityes_egl.h" +# include "PlatformDependent/WinPlayer/unityes_gl2.h" +# include "PlatformDependent/WinPlayer/unityes_gl2ext.h" +# define INCLUDE_GLES_2X 1 +# define DEF(ret,name,args) extern ret (WINAPI *name) args +# include "PlatformDependent/WinPlayer/GLESFunctionDefs.h" +# elif UNITY_IPHONE +# include +# include +# elif UNITY_LINUX || UNITY_ANDROID || UNITY_BB10 +# include +# include +# include +# elif UNITY_PEPPER || UNITY_WEBGL +# include +# include +# elif UNITY_TIZEN +# include +# include +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::Opengl; +# else +# error "Unknown platform" +# endif +# +# include "Runtime/GfxDevice/opengles20/UnityGLES20Ext.h" +# +#endif + +#endif // GFX_SUPPORTS_OPENGLESXX \ No newline at end of file -- cgit v1.1-26-g67d0