Dali 3D User Interface Engine
gl-extensions.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_GL_EXTENSION_H__
2 #define __DALI_INTERNAL_GL_EXTENSION_H__
3 
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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 
21 // EXTERNAL INCLUDES
22 
23 #if DALI_GLES_VERSION >= 30
24 #include <GLES3/gl3.h>
25 #include <GLES3/gl3ext.h>
26 #else
27 #include <GLES2/gl2.h>
28 #include <GLES2/gl2ext.h>
29 #endif
30 
31 
32 namespace Dali
33 {
34 
35 namespace Internal
36 {
37 
38 namespace Adaptor
39 {
40 
41 namespace ECoreX
42 {
43 
48 {
49 public:
50 
54  GlExtensions();
55 
59  ~GlExtensions();
60 
61 
62 public:
63 
64 #if DALI_GLES_VERSION < 30
65 
77  void DiscardFrameBuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
78 
88  void GetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
89 
98  void ProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
99 
100 #endif // DALI_GLES_VERSION < 30
101 
102 private:
103 
107  void Initialize();
108 
109 #if DALI_GLES_VERSION < 30
110 
111 #ifdef GL_EXT_discard_framebuffer
112  PFNGLDISCARDFRAMEBUFFEREXTPROC mGlDiscardFramebuffer;
113 #endif
114 
115 #ifdef GL_OES_get_program_binary
116  PFNGLGETPROGRAMBINARYOESPROC mGlGetProgramBinaryOES;
117  PFNGLPROGRAMBINARYOESPROC mGlProgramBinaryOES;
118 #endif
119 
120 #endif // DALI_GLES_VERSION < 30
121 
123 
124 };
125 
126 } // namespace ECoreX
127 
128 } // namespace Adaptor
129 
130 } // namespace Internal
131 
132 } // namespace Dali
133 
134 #endif /* __DALI_INTERNAL_GL_EXTENSION_H__ */
Dali Docs Home
Read more about Dali