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