Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / effects / inc / renderer / graphics-engine / FUiEffects_RendererGraphicsEngineOpenGLImplementation.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FUiEffects_RendererGraphicsEngineOpenGLImplementation.h
20  * @brief               OpenGL platform defines
21  *
22  */
23
24 #ifndef _FUI_EFFECTS_INTERNAL_RENDERER_OPENGL_IMPLEMENTATION_H_
25 #define _FUI_EFFECTS_INTERNAL_RENDERER_OPENGL_IMPLEMENTATION_H_
26
27 #include <renderer/system/FUiEffects_RendererSystemPlatformDefine.h>
28
29 #if defined(_EFFECTS_SYSTEM_WINDOWS_) || defined(_EFFECTS_SYSTEM_LINUX_)
30 #define _EFFECTS_GRAPHICSENGINE_OPENGL_DESKTOP_ 1
31 #ifndef GLEW_NO_GLU
32 #define GLEW_NO_GLU
33 #endif
34 #include <GL/glew.h>
35 #if defined(_EFFECTS_SYSTEM_WINDOWS_)
36 #include <GL/wglew.h>
37 #elif defined(_EFFECTS_SYSTEM_LINUX_)
38 #include <GL/glxew.h>
39 #endif
40 #elif defined(_EFFECTS_SYSTEM_ANDROID_) || defined(_EFFECTS_SYSTEM_SLP_)
41 #define _EFFECTS_GRAPHICSENGINE_OPENGL_ES_ 1
42 #ifndef GL_GLEXT_PROTOTYPES
43 #define GL_GLEXT_PROTOTYPES
44 #endif
45 #ifndef EGL_EGLEXT_PROTOTYPES
46 #define EGL_EGLEXT_PROTOTYPES
47 #endif
48 #ifndef GL_EXT_texture_format_BGRA8888
49 #define GL_EXT_texture_format_BGRA8888
50 #endif
51
52 #include <GLES2/gl2.h>
53 #include <GLES2/gl2ext.h>
54 #include <GLES2/gl2platform.h>
55 #include <EGL/egl.h>
56 #include <EGL/eglext.h>
57 #include <EGL/eglplatform.h>
58
59 #elif defined(_EFFECTS_SYSTEM_TIZEN_)                                                   // ps
60 #define _EFFECTS_GRAPHICSENGINE_OPENGL_ES_ 1
61 #include <FGraphicsOpengl2.h>
62 using namespace Tizen::Graphics::Opengl;
63
64 #define GL_BGRA_EXT GL_BGRA
65 #endif
66
67 #endif //_FUI_EFFECTS_INTERNAL_RENDERER_OPENGL_IMPLEMENTATION_H_