[3.0] Fix build error according to updating Khronos header
[platform/core/uifw/dali-adaptor.git] / adaptors / common / gl / gl-implementation.h
1 #ifndef __DALI_INTERNAL_GL_IMPLEMENTATION_H__
2 #define __DALI_INTERNAL_GL_IMPLEMENTATION_H__
3
4 /*
5  * Copyright (c) 2016 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 #ifndef DALI_GLES_VERSION
23 #error "OpenGL ES version not specified"
24 #endif
25
26 #define GL_GLEXT_PROTOTYPES
27 #if DALI_GLES_VERSION >= 31
28 #include <GLES3/gl31.h>
29 #elif DALI_GLES_VERSION >= 30
30 #include <GLES3/gl3.h>
31 #else
32 #include <cstdlib>
33 #include <GLES2/gl2.h>
34 #endif
35
36 #include <dali/integration-api/gl-abstraction.h>
37
38 // INTERNAL INCLUDES
39 #include <gl/gl-extensions.h>
40
41 namespace Dali
42 {
43
44 namespace Internal
45 {
46
47 namespace Adaptor
48 {
49
50 /**
51  * GlImplementation is a concrete implementation for GlAbstraction.
52  * The class provides an OpenGL-ES 2.0 implementation.
53  * The class is provided when creating the Integration::Core object.
54  */
55 class GlImplementation: public Dali::Integration::GlAbstraction
56 {
57
58 public:
59   virtual ~GlImplementation() {}
60
61   void PreRender()
62   {
63     /* Do nothing in main implementation */
64   }
65
66   void PostRender()
67   {
68     /* Do nothing in main implementation */
69   }
70
71   /* OpenGL ES 2.0 */
72
73   void ActiveTexture (GLenum texture)
74   {
75     glActiveTexture(texture);
76   }
77
78   void AttachShader (GLuint program, GLuint shader)
79   {
80     glAttachShader(program,shader);
81   }
82
83   void BindAttribLocation (GLuint program, GLuint index, const char* name)
84   {
85     glBindAttribLocation(program,index,name);
86   }
87
88   void BindBuffer (GLenum target, GLuint buffer)
89   {
90     glBindBuffer(target,buffer);
91   }
92
93   void BindFramebuffer (GLenum target, GLuint framebuffer)
94   {
95     glBindFramebuffer(target,framebuffer);
96   }
97
98   void BindRenderbuffer (GLenum target, GLuint renderbuffer)
99   {
100     glBindRenderbuffer(target,renderbuffer);
101   }
102
103   void BindTexture (GLenum target, GLuint texture)
104   {
105     glBindTexture(target,texture);
106   }
107
108   void BlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
109   {
110     glBlendColor(red,green,blue,alpha);
111   }
112
113   void BlendEquation ( GLenum mode )
114   {
115     glBlendEquation(mode);
116   }
117
118   void BlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
119   {
120     glBlendEquationSeparate(modeRGB,modeAlpha);
121   }
122
123   void BlendFunc (GLenum sfactor, GLenum dfactor)
124   {
125     glBlendFunc(sfactor,dfactor);
126   }
127
128   void BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
129   {
130     glBlendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
131   }
132
133   void BufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage)
134   {
135     glBufferData(target,size,data,usage);
136   }
137
138   void BufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
139   {
140     glBufferSubData(target,offset,size,data);
141   }
142
143   GLenum CheckFramebufferStatus (GLenum target)
144   {
145     return glCheckFramebufferStatus(target);
146   }
147
148   void Clear (GLbitfield mask)
149   {
150     glClear(mask);
151   }
152
153   void ClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
154   {
155     glClearColor(red,green,blue,alpha);
156   }
157
158   void ClearDepthf (GLclampf depth)
159   {
160     glClearDepthf(depth);
161   }
162
163   void ClearStencil (GLint s)
164   {
165     glClearStencil(s);
166   }
167
168   void ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
169   {
170     glColorMask(red,green,blue,alpha);
171   }
172
173   void CompileShader (GLuint shader)
174   {
175     glCompileShader(shader);
176   }
177
178   void CompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
179   {
180     glCompressedTexImage2D(target,level,internalformat,width,height,border,imageSize,data);
181   }
182
183   void CompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
184   {
185     glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data);
186   }
187
188   void CopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
189   {
190     glCopyTexImage2D(target,level,internalformat,x,y,width,height,border);
191   }
192
193   void CopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
194   {
195     glCopyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
196   }
197
198   GLuint CreateProgram (void)
199   {
200     return glCreateProgram();
201   }
202
203   GLuint CreateShader (GLenum type)
204   {
205     return glCreateShader(type);
206   }
207
208   void CullFace (GLenum mode)
209   {
210     glCullFace(mode);
211   }
212
213   void DeleteBuffers (GLsizei n, const GLuint* buffers)
214   {
215     glDeleteBuffers(n,buffers);
216   }
217
218   void DeleteFramebuffers (GLsizei n, const GLuint* framebuffers)
219   {
220     glDeleteFramebuffers(n,framebuffers);
221   }
222
223   void DeleteProgram (GLuint program)
224   {
225     glDeleteProgram(program);
226   }
227
228   void DeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers)
229   {
230     glDeleteRenderbuffers(n,renderbuffers);
231   }
232
233   void DeleteShader (GLuint shader)
234   {
235     glDeleteShader(shader);
236   }
237
238   void DeleteTextures (GLsizei n, const GLuint* textures)
239   {
240     glDeleteTextures(n,textures);
241   }
242
243   void DepthFunc (GLenum func)
244   {
245     glDepthFunc(func);
246   }
247
248   void DepthMask (GLboolean flag)
249   {
250     glDepthMask(flag);
251   }
252
253   void DepthRangef (GLclampf zNear, GLclampf zFar)
254   {
255     glDepthRangef(zNear,zFar);
256   }
257
258   void DetachShader (GLuint program, GLuint shader)
259   {
260     glDetachShader(program,shader);
261   }
262
263   void Disable (GLenum cap)
264   {
265     glDisable(cap);
266   }
267
268   void DisableVertexAttribArray (GLuint index)
269   {
270     glDisableVertexAttribArray(index);
271   }
272
273   void DrawArrays (GLenum mode, GLint first, GLsizei count)
274   {
275     glDrawArrays(mode,first,count);
276   }
277
278   void DrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices)
279   {
280     glDrawElements(mode,count,type,indices);
281   }
282
283   void Enable (GLenum cap)
284   {
285     glEnable(cap);
286   }
287
288   void EnableVertexAttribArray (GLuint index)
289   {
290     glEnableVertexAttribArray(index);
291   }
292
293   void Finish (void)
294   {
295     glFinish();
296   }
297
298   void Flush (void)
299   {
300     glFlush();
301   }
302
303   void FramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
304   {
305     glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
306   }
307
308   void FramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
309   {
310     glFramebufferTexture2D(target,attachment,textarget,texture,level);
311   }
312
313   void FrontFace (GLenum mode)
314   {
315     glFrontFace(mode);
316   }
317
318   void GenBuffers (GLsizei n, GLuint* buffers)
319   {
320     glGenBuffers(n,buffers);
321   }
322
323   void GenerateMipmap (GLenum target)
324   {
325     glGenerateMipmap(target);
326   }
327
328   void GenFramebuffers (GLsizei n, GLuint* framebuffers)
329   {
330     glGenFramebuffers(n,framebuffers);
331   }
332
333   void GenRenderbuffers (GLsizei n, GLuint* renderbuffers)
334   {
335     glGenRenderbuffers(n,renderbuffers);
336   }
337
338   void GenTextures (GLsizei n, GLuint* textures)
339   {
340     glGenTextures(n,textures);
341   }
342
343   void GetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
344   {
345     glGetActiveAttrib(program,index,bufsize,length,size,type,name);
346   }
347
348   void GetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
349   {
350     glGetActiveUniform(program,index,bufsize,length,size,type,name);
351   }
352
353   void GetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
354   {
355     glGetAttachedShaders(program,maxcount,count,shaders);
356   }
357
358   int  GetAttribLocation (GLuint program, const char* name)
359   {
360     return glGetAttribLocation(program,name);
361   }
362
363   void GetBooleanv (GLenum pname, GLboolean* params)
364   {
365     glGetBooleanv(pname,params);
366   }
367
368   void GetBufferParameteriv (GLenum target, GLenum pname, GLint* params)
369   {
370     glGetBufferParameteriv(target,pname,params);
371   }
372
373   GLenum       GetError (void)
374   {
375     return glGetError();
376   }
377
378   void GetFloatv (GLenum pname, GLfloat* params)
379   {
380     glGetFloatv(pname,params);
381   }
382
383   void GetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params)
384   {
385     glGetFramebufferAttachmentParameteriv(target,attachment,pname,params);
386   }
387
388   void GetIntegerv (GLenum pname, GLint* params)
389   {
390     glGetIntegerv(pname,params);
391   }
392
393   void GetProgramiv (GLuint program, GLenum pname, GLint* params)
394   {
395     glGetProgramiv(program,pname,params);
396   }
397
398   void GetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
399   {
400     glGetProgramInfoLog(program,bufsize,length,infolog);
401   }
402
403   void GetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params)
404   {
405     glGetRenderbufferParameteriv(target,pname,params);
406   }
407
408   void GetShaderiv (GLuint shader, GLenum pname, GLint* params)
409   {
410     glGetShaderiv(shader,pname,params);
411   }
412
413   void GetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
414   {
415     glGetShaderInfoLog(shader,bufsize,length,infolog);
416   }
417
418   void GetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
419   {
420     glGetShaderPrecisionFormat(shadertype,precisiontype,range,precision);
421   }
422
423   void GetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
424   {
425     glGetShaderSource(shader,bufsize,length,source);
426   }
427
428   const GLubyte* GetString (GLenum name)
429   {
430     return glGetString(name);
431   }
432
433   void GetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
434   {
435     glGetTexParameterfv(target,pname,params);
436   }
437
438   void GetTexParameteriv (GLenum target, GLenum pname, GLint* params)
439   {
440     glGetTexParameteriv(target,pname,params);
441   }
442
443   void GetUniformfv (GLuint program, GLint location, GLfloat* params)
444   {
445     glGetUniformfv(program,location,params);
446   }
447
448   void GetUniformiv (GLuint program, GLint location, GLint* params)
449   {
450     glGetUniformiv(program,location,params);
451   }
452
453   int  GetUniformLocation (GLuint program, const char* name)
454   {
455     return glGetUniformLocation(program,name);
456   }
457
458   void GetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params)
459   {
460     glGetVertexAttribfv(index,pname,params);
461   }
462
463   void GetVertexAttribiv (GLuint index, GLenum pname, GLint* params)
464   {
465     glGetVertexAttribiv(index,pname,params);
466   }
467
468   void GetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer)
469   {
470     glGetVertexAttribPointerv(index,pname,pointer);
471   }
472
473   void Hint (GLenum target, GLenum mode)
474   {
475     glHint(target,mode);
476   }
477
478   GLboolean IsBuffer (GLuint buffer)
479   {
480     return glIsBuffer(buffer);
481   }
482
483   GLboolean IsEnabled (GLenum cap)
484   {
485     return glIsEnabled(cap);
486   }
487
488   GLboolean IsFramebuffer (GLuint framebuffer)
489   {
490     return glIsFramebuffer(framebuffer);
491   }
492
493   GLboolean IsProgram (GLuint program)
494   {
495     return glIsProgram(program);
496   }
497
498   GLboolean IsRenderbuffer (GLuint renderbuffer)
499   {
500     return glIsRenderbuffer(renderbuffer);
501   }
502
503   GLboolean IsShader (GLuint shader)
504   {
505     return glIsShader(shader);
506   }
507
508   GLboolean IsTexture (GLuint texture)
509   {
510     return glIsTexture(texture);
511   }
512
513   void LineWidth (GLfloat width)
514   {
515     glLineWidth(width);
516   }
517
518   void LinkProgram (GLuint program)
519   {
520     glLinkProgram(program);
521   }
522
523   void PixelStorei (GLenum pname, GLint param)
524   {
525     glPixelStorei(pname,param);
526   }
527
528   void PolygonOffset (GLfloat factor, GLfloat units)
529   {
530     glPolygonOffset(factor,units);
531   }
532
533   void ReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
534   {
535     glReadPixels(x,y,width,height,format,type,pixels);
536   }
537
538   void ReleaseShaderCompiler (void)
539   {
540     glReleaseShaderCompiler();
541   }
542
543   void RenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
544   {
545     glRenderbufferStorage(target,internalformat,width,height);
546   }
547
548   void SampleCoverage (GLclampf value, GLboolean invert)
549   {
550     glSampleCoverage(value,invert);
551   }
552
553   void Scissor (GLint x, GLint y, GLsizei width, GLsizei height)
554   {
555     glScissor(x,y,width,height);
556   }
557
558   void ShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
559   {
560     glShaderBinary(n,shaders,binaryformat,binary,length);
561   }
562
563   void ShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length)
564   {
565     glShaderSource(shader,count,string,length);
566   }
567
568   void StencilFunc (GLenum func, GLint ref, GLuint mask)
569   {
570     glStencilFunc(func,ref,mask);
571   }
572
573   void StencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
574   {
575     glStencilFuncSeparate(face,func,ref,mask);
576   }
577
578   void StencilMask (GLuint mask)
579   {
580     glStencilMask(mask);
581   }
582
583   void StencilMaskSeparate (GLenum face, GLuint mask)
584   {
585     glStencilMaskSeparate(face,mask);
586   }
587
588   void StencilOp (GLenum fail, GLenum zfail, GLenum zpass)
589   {
590     glStencilOp(fail,zfail,zpass);
591   }
592
593   void StencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
594   {
595     glStencilOpSeparate(face,fail,zfail,zpass);
596   }
597
598   void TexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
599   {
600     glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels);
601   }
602
603   void TexParameterf (GLenum target, GLenum pname, GLfloat param)
604   {
605     glTexParameterf(target,pname,param);
606   }
607
608   void TexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
609   {
610     glTexParameterfv(target,pname,params);
611   }
612
613   void TexParameteri (GLenum target, GLenum pname, GLint param)
614   {
615     glTexParameteri(target,pname,param);
616   }
617
618   void TexParameteriv (GLenum target, GLenum pname, const GLint* params)
619   {
620     glTexParameteriv(target,pname,params);
621   }
622
623   void TexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
624   {
625     glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);
626   }
627
628   void Uniform1f (GLint location, GLfloat x)
629   {
630     glUniform1f(location,x);
631   }
632
633   void Uniform1fv (GLint location, GLsizei count, const GLfloat* v)
634   {
635     glUniform1fv(location,count,v);
636   }
637
638   void Uniform1i (GLint location, GLint x)
639   {
640     glUniform1i(location,x);
641   }
642
643   void Uniform1iv (GLint location, GLsizei count, const GLint* v)
644   {
645     glUniform1iv(location,count,v);
646   }
647
648   void Uniform2f (GLint location, GLfloat x, GLfloat y)
649   {
650     glUniform2f(location,x,y);
651   }
652
653   void Uniform2fv (GLint location, GLsizei count, const GLfloat* v)
654   {
655     glUniform2fv(location,count,v);
656   }
657
658   void Uniform2i (GLint location, GLint x, GLint y)
659   {
660     glUniform2i(location,x,y);
661   }
662
663   void Uniform2iv (GLint location, GLsizei count, const GLint* v)
664   {
665     glUniform2iv(location,count,v);
666   }
667
668   void Uniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
669   {
670     glUniform3f(location,x,y,z);
671   }
672
673   void Uniform3fv (GLint location, GLsizei count, const GLfloat* v)
674   {
675     glUniform3fv(location,count,v);
676   }
677
678   void Uniform3i (GLint location, GLint x, GLint y, GLint z)
679   {
680     glUniform3i(location,x,y,z);
681   }
682
683   void Uniform3iv (GLint location, GLsizei count, const GLint* v)
684   {
685     glUniform3iv(location,count,v);
686   }
687
688   void Uniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
689   {
690     glUniform4f(location,x,y,z,w);
691   }
692
693   void Uniform4fv (GLint location, GLsizei count, const GLfloat* v)
694   {
695     glUniform4fv(location,count,v);
696   }
697
698   void Uniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)
699   {
700     glUniform4i(location,x,y,z,w);
701   }
702
703   void Uniform4iv (GLint location, GLsizei count, const GLint* v)
704   {
705     glUniform4iv(location,count,v);
706   }
707
708   void UniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
709   {
710     glUniformMatrix2fv(location,count,transpose,value);
711   }
712
713   void UniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
714   {
715     glUniformMatrix3fv(location,count,transpose,value);
716   }
717
718   void UniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
719   {
720     glUniformMatrix4fv(location,count,transpose,value);
721   }
722
723   void UseProgram (GLuint program)
724   {
725     glUseProgram(program);
726   }
727
728   void ValidateProgram (GLuint program)
729   {
730     glValidateProgram(program);
731   }
732
733   void VertexAttrib1f (GLuint indx, GLfloat x)
734   {
735     glVertexAttrib1f(indx,x);
736   }
737
738   void VertexAttrib1fv (GLuint indx, const GLfloat* values)
739   {
740     glVertexAttrib1fv(indx,values);
741   }
742
743   void VertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
744   {
745     glVertexAttrib2f(indx,x,y);
746   }
747
748   void VertexAttrib2fv (GLuint indx, const GLfloat* values)
749   {
750     glVertexAttrib2fv(indx,values);
751   }
752
753   void VertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
754   {
755     glVertexAttrib3f(indx,x,y,z);
756   }
757
758   void VertexAttrib3fv (GLuint indx, const GLfloat* values)
759   {
760     glVertexAttrib3fv(indx,values);
761   }
762
763   void VertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
764   {
765     glVertexAttrib4f(indx,x,y,z,w);
766   }
767
768   void VertexAttrib4fv (GLuint indx, const GLfloat* values)
769   {
770     glVertexAttrib4fv(indx,values);
771   }
772
773   void VertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
774   {
775     glVertexAttribPointer(indx,size,type,normalized,stride,ptr);
776   }
777
778   void Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
779   {
780     glViewport(x,y,width,height);
781   }
782
783   /* OpenGL ES 3.0 */
784
785   void ReadBuffer(GLenum mode)
786   {
787 #if DALI_GLES_VERSION >= 30
788     glReadBuffer(mode);
789 #endif // DALI_GLES_VERSION >= 30
790   }
791
792   void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
793   {
794 #if DALI_GLES_VERSION >= 30
795     glDrawRangeElements(mode,start,end,count,type,indices);
796 #endif // DALI_GLES_VERSION >= 30
797   }
798
799   void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
800   {
801 #if DALI_GLES_VERSION >= 30
802     glTexImage3D(target,level,internalformat,width,height,depth,border,format,type,pixels);
803 #endif // DALI_GLES_VERSION >= 30
804   }
805
806   void TexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
807   {
808 #if DALI_GLES_VERSION >= 30
809     glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels);
810 #endif // DALI_GLES_VERSION >= 30
811   }
812
813   void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
814   {
815 #if DALI_GLES_VERSION >= 30
816     glCopyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
817 #endif // DALI_GLES_VERSION >= 30
818   }
819
820   void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
821   {
822 #if DALI_GLES_VERSION >= 30
823     glCompressedTexImage3D(target,level,internalformat,width,height,depth,border,imageSize,data);
824 #endif // DALI_GLES_VERSION >= 30
825   }
826
827   void CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
828   {
829 #if DALI_GLES_VERSION >= 30
830     glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data);
831 #endif // DALI_GLES_VERSION >= 30
832   }
833
834   void GenQueries(GLsizei n, GLuint* ids)
835   {
836 #if DALI_GLES_VERSION >= 30
837     glGenQueries(n,ids);
838 #endif // DALI_GLES_VERSION >= 30
839   }
840
841   void DeleteQueries(GLsizei n, const GLuint* ids)
842   {
843 #if DALI_GLES_VERSION >= 30
844     glDeleteQueries(n,ids);
845 #endif // DALI_GLES_VERSION >= 30
846   }
847
848   GLboolean IsQuery(GLuint id)
849   {
850 #if DALI_GLES_VERSION >= 30
851     return glIsQuery(id);
852 #else
853     return 0;
854 #endif // DALI_GLES_VERSION >= 30
855   }
856
857   void BeginQuery(GLenum target, GLuint id)
858   {
859 #if DALI_GLES_VERSION >= 30
860     glBeginQuery(target,id);
861 #endif // DALI_GLES_VERSION >= 30
862   }
863
864   void EndQuery(GLenum target)
865   {
866 #if DALI_GLES_VERSION >= 30
867     glEndQuery(target);
868 #endif // DALI_GLES_VERSION >= 30
869   }
870
871   void GetQueryiv(GLenum target, GLenum pname, GLint* params)
872   {
873 #if DALI_GLES_VERSION >= 30
874     glGetQueryiv(target,pname,params);
875 #endif // DALI_GLES_VERSION >= 30
876   }
877
878   void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
879   {
880 #if DALI_GLES_VERSION >= 30
881     glGetQueryObjectuiv(id,pname,params);
882 #endif // DALI_GLES_VERSION >= 30
883   }
884
885   GLboolean UnmapBuffer(GLenum target)
886   {
887 #if DALI_GLES_VERSION >= 30
888     return glUnmapBuffer(target);
889 #else
890     return 0;
891 #endif // DALI_GLES_VERSION >= 30
892   }
893
894   void GetBufferPointerv(GLenum target, GLenum pname, GLvoid** params)
895   {
896 #if DALI_GLES_VERSION >= 30
897     glGetBufferPointerv(target,pname,params);
898 #endif // DALI_GLES_VERSION >= 30
899   }
900
901   void DrawBuffers(GLsizei n, const GLenum* bufs)
902   {
903 #if DALI_GLES_VERSION >= 30
904     glDrawBuffers(n,bufs);
905 #endif // DALI_GLES_VERSION >= 30
906   }
907
908   void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
909   {
910 #if DALI_GLES_VERSION >= 30
911     glUniformMatrix2x3fv(location,count,transpose,value);
912 #endif // DALI_GLES_VERSION >= 30
913   }
914
915   void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
916   {
917 #if DALI_GLES_VERSION >= 30
918     glUniformMatrix3x2fv(location,count,transpose,value);
919 #endif // DALI_GLES_VERSION >= 30
920   }
921
922   void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
923   {
924 #if DALI_GLES_VERSION >= 30
925     glUniformMatrix2x4fv(location,count,transpose,value);
926 #endif // DALI_GLES_VERSION >= 30
927   }
928
929   void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
930   {
931 #if DALI_GLES_VERSION >= 30
932     glUniformMatrix4x2fv(location,count,transpose,value);
933 #endif // DALI_GLES_VERSION >= 30
934   }
935
936   void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
937   {
938 #if DALI_GLES_VERSION >= 30
939     glUniformMatrix3x4fv(location,count,transpose,value);
940 #endif // DALI_GLES_VERSION >= 30
941   }
942
943   void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
944   {
945 #if DALI_GLES_VERSION >= 30
946     glUniformMatrix4x3fv(location,count,transpose,value);
947 #endif // DALI_GLES_VERSION >= 30
948   }
949
950   void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
951   {
952 #if DALI_GLES_VERSION >= 30
953     glBlitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
954 #endif // DALI_GLES_VERSION >= 30
955   }
956
957   void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
958   {
959 #if DALI_GLES_VERSION >= 30
960     glRenderbufferStorageMultisample(target,samples,internalformat,width,height);
961 #endif // DALI_GLES_VERSION >= 30
962   }
963
964   void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
965   {
966 #if DALI_GLES_VERSION >= 30
967     glFramebufferTextureLayer(target,attachment,texture,level,layer);
968 #endif // DALI_GLES_VERSION >= 30
969   }
970
971   GLvoid* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
972   {
973 #if DALI_GLES_VERSION >= 30
974     return glMapBufferRange(target,offset,length,access);
975 #else
976     return NULL;
977 #endif // DALI_GLES_VERSION >= 30
978   }
979
980   void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
981   {
982 #if DALI_GLES_VERSION >= 30
983     glFlushMappedBufferRange(target,offset,length);
984 #endif // DALI_GLES_VERSION >= 30
985   }
986
987   void BindVertexArray(GLuint array)
988   {
989 #if DALI_GLES_VERSION >= 30
990     glBindVertexArray(array);
991 #endif // DALI_GLES_VERSION >= 30
992   }
993
994   void DeleteVertexArrays(GLsizei n, const GLuint* arrays)
995   {
996 #if DALI_GLES_VERSION >= 30
997     glDeleteVertexArrays(n,arrays);
998 #endif // DALI_GLES_VERSION >= 30
999   }
1000
1001   void GenVertexArrays(GLsizei n, GLuint* arrays)
1002   {
1003 #if DALI_GLES_VERSION >= 30
1004     glGenVertexArrays(n,arrays);
1005 #endif // DALI_GLES_VERSION >= 30
1006   }
1007
1008   GLboolean IsVertexArray(GLuint array)
1009   {
1010 #if DALI_GLES_VERSION >= 30
1011     return glIsVertexArray(array);
1012 #else
1013     return 0;
1014 #endif // DALI_GLES_VERSION >= 30
1015   }
1016
1017   void GetIntegeri_v(GLenum target, GLuint index, GLint* data)
1018   {
1019 #if DALI_GLES_VERSION >= 30
1020     glGetIntegeri_v(target,index,data);
1021 #endif // DALI_GLES_VERSION >= 30
1022   }
1023
1024   void BeginTransformFeedback(GLenum primitiveMode)
1025   {
1026 #if DALI_GLES_VERSION >= 30
1027     glBeginTransformFeedback(primitiveMode);
1028 #endif // DALI_GLES_VERSION >= 30
1029   }
1030
1031   void EndTransformFeedback(void)
1032   {
1033 #if DALI_GLES_VERSION >= 30
1034     glEndTransformFeedback();
1035 #endif // DALI_GLES_VERSION >= 30
1036   }
1037
1038   void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
1039   {
1040 #if DALI_GLES_VERSION >= 30
1041     glBindBufferRange(target,index,buffer,offset,size);
1042 #endif // DALI_GLES_VERSION >= 30
1043   }
1044
1045   void BindBufferBase(GLenum target, GLuint index, GLuint buffer)
1046   {
1047 #if DALI_GLES_VERSION >= 30
1048     glBindBufferBase(target,index,buffer);
1049 #endif // DALI_GLES_VERSION >= 30
1050   }
1051
1052   void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)
1053   {
1054 #if DALI_GLES_VERSION >= 30
1055     glTransformFeedbackVaryings(program,count,varyings,bufferMode);
1056 #endif // DALI_GLES_VERSION >= 30
1057   }
1058
1059   void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
1060   {
1061 #if DALI_GLES_VERSION >= 30
1062     glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name);
1063 #endif // DALI_GLES_VERSION >= 30
1064   }
1065
1066   void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
1067   {
1068 #if DALI_GLES_VERSION >= 30
1069     glVertexAttribIPointer(index,size,type,stride,pointer);
1070 #endif // DALI_GLES_VERSION >= 30
1071   }
1072
1073   void GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
1074   {
1075 #if DALI_GLES_VERSION >= 30
1076     glGetVertexAttribIiv(index,pname,params);
1077 #endif // DALI_GLES_VERSION >= 30
1078   }
1079
1080   void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
1081   {
1082 #if DALI_GLES_VERSION >= 30
1083     glGetVertexAttribIuiv(index,pname,params);
1084 #endif // DALI_GLES_VERSION >= 30
1085   }
1086
1087   void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
1088   {
1089 #if DALI_GLES_VERSION >= 30
1090     glVertexAttribI4i(index,x,y,z,w);
1091 #endif // DALI_GLES_VERSION >= 30
1092   }
1093
1094   void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
1095   {
1096 #if DALI_GLES_VERSION >= 30
1097     glVertexAttribI4ui(index,x,y,z,w);
1098 #endif // DALI_GLES_VERSION >= 30
1099   }
1100
1101   void VertexAttribI4iv(GLuint index, const GLint* v)
1102   {
1103 #if DALI_GLES_VERSION >= 30
1104     glVertexAttribI4iv(index,v);
1105 #endif // DALI_GLES_VERSION >= 30
1106   }
1107
1108   void VertexAttribI4uiv(GLuint index, const GLuint* v)
1109   {
1110 #if DALI_GLES_VERSION >= 30
1111     glVertexAttribI4uiv(index,v);
1112 #endif // DALI_GLES_VERSION >= 30
1113   }
1114
1115   void GetUniformuiv(GLuint program, GLint location, GLuint* params)
1116   {
1117 #if DALI_GLES_VERSION >= 30
1118     glGetUniformuiv(program,location,params);
1119 #endif // DALI_GLES_VERSION >= 30
1120   }
1121
1122   GLint GetFragDataLocation(GLuint program, const GLchar *name)
1123   {
1124 #if DALI_GLES_VERSION >= 30
1125     return glGetFragDataLocation(program,name);
1126 #else
1127     return -1;
1128 #endif // DALI_GLES_VERSION >= 30
1129   }
1130
1131   void Uniform1ui(GLint location, GLuint v0)
1132   {
1133 #if DALI_GLES_VERSION >= 30
1134     glUniform1ui(location,v0);
1135 #endif // DALI_GLES_VERSION >= 30
1136   }
1137
1138   void Uniform2ui(GLint location, GLuint v0, GLuint v1)
1139   {
1140 #if DALI_GLES_VERSION >= 30
1141     glUniform2ui(location,v0,v1);
1142 #endif // DALI_GLES_VERSION >= 30
1143   }
1144
1145   void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
1146   {
1147 #if DALI_GLES_VERSION >= 30
1148     glUniform3ui(location,v0,v1,v2);
1149 #endif // DALI_GLES_VERSION >= 30
1150   }
1151
1152   void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
1153   {
1154 #if DALI_GLES_VERSION >= 30
1155     glUniform4ui(location,v0,v1,v2,v3);
1156 #endif // DALI_GLES_VERSION >= 30
1157   }
1158
1159   void Uniform1uiv(GLint location, GLsizei count, const GLuint* value)
1160   {
1161 #if DALI_GLES_VERSION >= 30
1162     glUniform1uiv(location,count,value);
1163 #endif // DALI_GLES_VERSION >= 30
1164   }
1165
1166   void Uniform2uiv(GLint location, GLsizei count, const GLuint* value)
1167   {
1168 #if DALI_GLES_VERSION >= 30
1169     glUniform2uiv(location,count,value);
1170 #endif // DALI_GLES_VERSION >= 30
1171   }
1172
1173   void Uniform3uiv(GLint location, GLsizei count, const GLuint* value)
1174   {
1175 #if DALI_GLES_VERSION >= 30
1176     glUniform3uiv(location,count,value);
1177 #endif // DALI_GLES_VERSION >= 30
1178   }
1179
1180   void Uniform4uiv(GLint location, GLsizei count, const GLuint* value)
1181   {
1182 #if DALI_GLES_VERSION >= 30
1183     glUniform4uiv(location,count,value);
1184 #endif // DALI_GLES_VERSION >= 30
1185   }
1186
1187   void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value)
1188   {
1189 #if DALI_GLES_VERSION >= 30
1190     glClearBufferiv(buffer,drawbuffer,value);
1191 #endif // DALI_GLES_VERSION >= 30
1192   }
1193
1194   void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value)
1195   {
1196 #if DALI_GLES_VERSION >= 30
1197     glClearBufferuiv(buffer,drawbuffer,value);
1198 #endif // DALI_GLES_VERSION >= 30
1199   }
1200
1201   void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value)
1202   {
1203 #if DALI_GLES_VERSION >= 30
1204     glClearBufferfv(buffer,drawbuffer,value);
1205 #endif // DALI_GLES_VERSION >= 30
1206   }
1207
1208   void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
1209   {
1210 #if DALI_GLES_VERSION >= 30
1211     glClearBufferfi(buffer,drawbuffer,depth,stencil);
1212 #endif // DALI_GLES_VERSION >= 30
1213   }
1214
1215   const GLubyte* GetStringi(GLenum name, GLuint index)
1216   {
1217 #if DALI_GLES_VERSION >= 30
1218     return glGetStringi(name,index);
1219 #else
1220     return NULL;
1221 #endif // DALI_GLES_VERSION >= 30
1222   }
1223
1224   void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
1225   {
1226 #if DALI_GLES_VERSION >= 30
1227     glCopyBufferSubData(readTarget,writeTarget,readOffset,writeOffset,size);
1228 #endif // DALI_GLES_VERSION >= 30
1229   }
1230
1231   void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)
1232   {
1233 #if DALI_GLES_VERSION >= 30
1234     glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices);
1235 #endif // DALI_GLES_VERSION >= 30
1236   }
1237
1238   void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
1239   {
1240 #if DALI_GLES_VERSION >= 30
1241     glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params);
1242 #endif // DALI_GLES_VERSION >= 30
1243   }
1244
1245   GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName)
1246   {
1247 #if DALI_GLES_VERSION >= 30
1248     return glGetUniformBlockIndex(program,uniformBlockName);
1249 #else
1250     return 0;
1251 #endif // DALI_GLES_VERSION >= 30
1252   }
1253
1254   void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
1255   {
1256 #if DALI_GLES_VERSION >= 30
1257     glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params);
1258 #endif // DALI_GLES_VERSION >= 30
1259   }
1260
1261   void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
1262   {
1263 #if DALI_GLES_VERSION >= 30
1264     glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName);
1265 #endif // DALI_GLES_VERSION >= 30
1266   }
1267
1268   void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
1269   {
1270 #if DALI_GLES_VERSION >= 30
1271     glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
1272 #endif // DALI_GLES_VERSION >= 30
1273   }
1274
1275   void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
1276   {
1277 #if DALI_GLES_VERSION >= 30
1278     glDrawArraysInstanced(mode,first,count,instanceCount);
1279 #endif // DALI_GLES_VERSION >= 30
1280   }
1281
1282   void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)
1283   {
1284 #if DALI_GLES_VERSION >= 30
1285     glDrawElementsInstanced(mode,count,type,indices,instanceCount);
1286 #endif // DALI_GLES_VERSION >= 30
1287   }
1288
1289   GLsync FenceSync(GLenum condition, GLbitfield flags)
1290   {
1291 #if DALI_GLES_VERSION >= 30
1292     return glFenceSync(condition,flags);
1293 #else
1294     return NULL;
1295 #endif // DALI_GLES_VERSION >= 30
1296   }
1297
1298   GLboolean IsSync(GLsync sync)
1299   {
1300 #if DALI_GLES_VERSION >= 30
1301     return glIsSync(sync);
1302 #else
1303     return 0;
1304 #endif // DALI_GLES_VERSION >= 30
1305   }
1306
1307   void DeleteSync(GLsync sync)
1308   {
1309 #if DALI_GLES_VERSION >= 30
1310     glDeleteSync(sync);
1311 #endif // DALI_GLES_VERSION >= 30
1312   }
1313
1314   GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1315   {
1316 #if DALI_GLES_VERSION >= 30
1317     return glClientWaitSync(sync,flags,timeout);
1318 #else
1319     return 0;
1320 #endif // DALI_GLES_VERSION >= 30
1321   }
1322
1323   void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1324   {
1325 #if DALI_GLES_VERSION >= 30
1326     glWaitSync(sync,flags,timeout);
1327 #endif // DALI_GLES_VERSION >= 30
1328   }
1329
1330   void GetInteger64v(GLenum pname, GLint64* params)
1331   {
1332 #if DALI_GLES_VERSION >= 30
1333     glGetInteger64v(pname,params);
1334 #endif // DALI_GLES_VERSION >= 30
1335   }
1336
1337   void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
1338   {
1339 #if DALI_GLES_VERSION >= 30
1340     glGetSynciv(sync,pname,bufSize,length,values);
1341 #endif // DALI_GLES_VERSION >= 30
1342   }
1343
1344   void GetInteger64i_v(GLenum target, GLuint index, GLint64* data)
1345   {
1346 #if DALI_GLES_VERSION >= 30
1347     glGetInteger64i_v(target,index,data);
1348 #endif // DALI_GLES_VERSION >= 30
1349   }
1350
1351   void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
1352   {
1353 #if DALI_GLES_VERSION >= 30
1354     glGetBufferParameteri64v(target,pname,params);
1355 #endif // DALI_GLES_VERSION >= 30
1356   }
1357
1358   void GenSamplers(GLsizei count, GLuint* samplers)
1359   {
1360 #if DALI_GLES_VERSION >= 30
1361     glGenSamplers(count,samplers);
1362 #endif // DALI_GLES_VERSION >= 30
1363   }
1364
1365   void DeleteSamplers(GLsizei count, const GLuint* samplers)
1366   {
1367 #if DALI_GLES_VERSION >= 30
1368     glDeleteSamplers(count,samplers);
1369 #endif // DALI_GLES_VERSION >= 30
1370   }
1371
1372   GLboolean IsSampler(GLuint sampler)
1373   {
1374 #if DALI_GLES_VERSION >= 30
1375     return glIsSampler(sampler);
1376 #else
1377     return 0;
1378 #endif // DALI_GLES_VERSION >= 30
1379   }
1380
1381   void BindSampler(GLuint unit, GLuint sampler)
1382   {
1383 #if DALI_GLES_VERSION >= 30
1384     glBindSampler(unit,sampler);
1385 #endif // DALI_GLES_VERSION >= 30
1386   }
1387
1388   void SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
1389   {
1390 #if DALI_GLES_VERSION >= 30
1391     glSamplerParameteri(sampler,pname,param);
1392 #endif // DALI_GLES_VERSION >= 30
1393   }
1394
1395   void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param)
1396   {
1397 #if DALI_GLES_VERSION >= 30
1398     glSamplerParameteriv(sampler,pname,param);
1399 #endif // DALI_GLES_VERSION >= 30
1400   }
1401
1402   void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
1403   {
1404 #if DALI_GLES_VERSION >= 30
1405     glSamplerParameterf(sampler,pname,param);
1406 #endif // DALI_GLES_VERSION >= 30
1407   }
1408
1409   void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param)
1410   {
1411 #if DALI_GLES_VERSION >= 30
1412     glSamplerParameterfv(sampler,pname,param);
1413 #endif // DALI_GLES_VERSION >= 30
1414   }
1415
1416   void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
1417   {
1418 #if DALI_GLES_VERSION >= 30
1419     glGetSamplerParameteriv(sampler,pname,params);
1420 #endif // DALI_GLES_VERSION >= 30
1421   }
1422
1423   void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
1424   {
1425 #if DALI_GLES_VERSION >= 30
1426     glGetSamplerParameterfv(sampler,pname,params);
1427 #endif // DALI_GLES_VERSION >= 30
1428   }
1429
1430   void VertexAttribDivisor(GLuint index, GLuint divisor)
1431   {
1432 #if DALI_GLES_VERSION >= 30
1433     glVertexAttribDivisor(index,divisor);
1434 #endif // DALI_GLES_VERSION >= 30
1435   }
1436
1437   void BindTransformFeedback(GLenum target, GLuint id)
1438   {
1439 #if DALI_GLES_VERSION >= 30
1440     glBindTransformFeedback(target,id);
1441 #endif // DALI_GLES_VERSION >= 30
1442   }
1443
1444   void DeleteTransformFeedbacks(GLsizei n, const GLuint* ids)
1445   {
1446 #if DALI_GLES_VERSION >= 30
1447     glDeleteTransformFeedbacks(n,ids);
1448 #endif // DALI_GLES_VERSION >= 30
1449   }
1450
1451   void GenTransformFeedbacks(GLsizei n, GLuint* ids)
1452   {
1453 #if DALI_GLES_VERSION >= 30
1454     glGenTransformFeedbacks(n,ids);
1455 #endif // DALI_GLES_VERSION >= 30
1456   }
1457
1458   GLboolean IsTransformFeedback(GLuint id)
1459   {
1460 #if DALI_GLES_VERSION >= 30
1461     return glIsTransformFeedback(id);
1462 #else
1463     return 0;
1464 #endif // DALI_GLES_VERSION >= 30
1465   }
1466
1467   void PauseTransformFeedback(void)
1468   {
1469 #if DALI_GLES_VERSION >= 30
1470     glPauseTransformFeedback();
1471 #endif // DALI_GLES_VERSION >= 30
1472   }
1473
1474   void ResumeTransformFeedback(void)
1475   {
1476 #if DALI_GLES_VERSION >= 30
1477     glResumeTransformFeedback();
1478 #endif // DALI_GLES_VERSION >= 30
1479   }
1480
1481   void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
1482   {
1483 #if DALI_GLES_VERSION >= 30
1484     // if OpenGL ES 2.0 compatibility is need this can be implemented with
1485     // glGetProgramBinaryOES
1486     glGetProgramBinary(program,bufSize,length,binaryFormat,binary);
1487 #else
1488     mGlExtensions.GetProgramBinaryOES(program, bufSize, length, binaryFormat, binary);
1489 #endif // DALI_GLES_VERSION >= 30
1490   }
1491
1492   void ProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)
1493   {
1494 #if DALI_GLES_VERSION >= 30
1495     // if OpenGL ES 2.0 compatibility is need this can be implemented with
1496     // glProgramBinaryOES
1497     glProgramBinary(program,binaryFormat,binary,length);
1498 #else
1499     mGlExtensions.ProgramBinaryOES(program, binaryFormat, binary, length);
1500 #endif // DALI_GLES_VERSION >= 30
1501   }
1502
1503   void ProgramParameteri(GLuint program, GLenum pname, GLint value)
1504   {
1505 #if DALI_GLES_VERSION >= 30
1506     glProgramParameteri(program,pname,value);
1507 #endif // DALI_GLES_VERSION >= 30
1508   }
1509
1510   void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments)
1511   {
1512 #if DALI_GLES_VERSION >= 30
1513     // if OpenGL ES 2.0 compatibility is need this can be implemented with
1514     // glDiscardFramebufferEXT
1515     glInvalidateFramebuffer(target,numAttachments,attachments);
1516 #endif // DALI_GLES_VERSION >= 30
1517   }
1518
1519   void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)
1520   {
1521 #if DALI_GLES_VERSION >= 30
1522     glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height);
1523 #endif // DALI_GLES_VERSION >= 30
1524   }
1525
1526   void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
1527   {
1528 #if DALI_GLES_VERSION >= 30
1529     glTexStorage2D(target,levels,internalformat,width,height);
1530 #endif // DALI_GLES_VERSION >= 30
1531   }
1532
1533   void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
1534   {
1535 #if DALI_GLES_VERSION >= 30
1536     glTexStorage3D(target,levels,internalformat,width,height,depth);
1537 #endif // DALI_GLES_VERSION >= 30
1538   }
1539
1540   void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
1541   {
1542 #if DALI_GLES_VERSION >= 30
1543     glGetInternalformativ(target,internalformat,pname,bufSize,params);
1544 #endif // DALI_GLES_VERSION >= 30
1545   }
1546
1547 private:
1548   ECoreX::GlExtensions mGlExtensions;
1549
1550 };
1551
1552 } // namespace Adaptor
1553
1554 } // namespace Internal
1555
1556 } // namespace Dali
1557
1558 #endif // __DALI_INTERNAL_GL_IMPLEMENTATION_H__