1 #ifndef __DALI_INTERNAL_GL_IMPLEMENTATION_H__
2 #define __DALI_INTERNAL_GL_IMPLEMENTATION_H__
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef DALI_GLES_VERSION
23 #error "OpenGL ES version not specified"
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>
33 #include <GLES2/gl2.h>
36 #include <dali/integration-api/gl-abstraction.h>
39 #include <gl/gl-extensions.h>
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.
55 class GlImplementation: public Dali::Integration::GlAbstraction
59 virtual ~GlImplementation() {}
63 /* Do nothing in main implementation */
68 /* Do nothing in main implementation */
73 void ActiveTexture (GLenum texture)
75 glActiveTexture(texture);
78 void AttachShader (GLuint program, GLuint shader)
80 glAttachShader(program,shader);
83 void BindAttribLocation (GLuint program, GLuint index, const char* name)
85 glBindAttribLocation(program,index,name);
88 void BindBuffer (GLenum target, GLuint buffer)
90 glBindBuffer(target,buffer);
93 void BindFramebuffer (GLenum target, GLuint framebuffer)
95 glBindFramebuffer(target,framebuffer);
98 void BindRenderbuffer (GLenum target, GLuint renderbuffer)
100 glBindRenderbuffer(target,renderbuffer);
103 void BindTexture (GLenum target, GLuint texture)
105 glBindTexture(target,texture);
108 void BlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
110 glBlendColor(red,green,blue,alpha);
113 void BlendEquation ( GLenum mode )
115 glBlendEquation(mode);
118 void BlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
120 glBlendEquationSeparate(modeRGB,modeAlpha);
123 void BlendFunc (GLenum sfactor, GLenum dfactor)
125 glBlendFunc(sfactor,dfactor);
128 void BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
130 glBlendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
133 void BufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage)
135 glBufferData(target,size,data,usage);
138 void BufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
140 glBufferSubData(target,offset,size,data);
143 GLenum CheckFramebufferStatus (GLenum target)
145 return glCheckFramebufferStatus(target);
148 void Clear (GLbitfield mask)
153 void ClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
155 glClearColor(red,green,blue,alpha);
158 void ClearDepthf (GLclampf depth)
160 glClearDepthf(depth);
163 void ClearStencil (GLint s)
168 void ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
170 glColorMask(red,green,blue,alpha);
173 void CompileShader (GLuint shader)
175 glCompileShader(shader);
178 void CompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
180 glCompressedTexImage2D(target,level,internalformat,width,height,border,imageSize,data);
183 void CompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
185 glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data);
188 void CopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
190 glCopyTexImage2D(target,level,internalformat,x,y,width,height,border);
193 void CopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
195 glCopyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
198 GLuint CreateProgram (void)
200 return glCreateProgram();
203 GLuint CreateShader (GLenum type)
205 return glCreateShader(type);
208 void CullFace (GLenum mode)
213 void DeleteBuffers (GLsizei n, const GLuint* buffers)
215 glDeleteBuffers(n,buffers);
218 void DeleteFramebuffers (GLsizei n, const GLuint* framebuffers)
220 glDeleteFramebuffers(n,framebuffers);
223 void DeleteProgram (GLuint program)
225 glDeleteProgram(program);
228 void DeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers)
230 glDeleteRenderbuffers(n,renderbuffers);
233 void DeleteShader (GLuint shader)
235 glDeleteShader(shader);
238 void DeleteTextures (GLsizei n, const GLuint* textures)
240 glDeleteTextures(n,textures);
243 void DepthFunc (GLenum func)
248 void DepthMask (GLboolean flag)
253 void DepthRangef (GLclampf zNear, GLclampf zFar)
255 glDepthRangef(zNear,zFar);
258 void DetachShader (GLuint program, GLuint shader)
260 glDetachShader(program,shader);
263 void Disable (GLenum cap)
268 void DisableVertexAttribArray (GLuint index)
270 glDisableVertexAttribArray(index);
273 void DrawArrays (GLenum mode, GLint first, GLsizei count)
275 glDrawArrays(mode,first,count);
278 void DrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices)
280 glDrawElements(mode,count,type,indices);
283 void Enable (GLenum cap)
288 void EnableVertexAttribArray (GLuint index)
290 glEnableVertexAttribArray(index);
303 void FramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
305 glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
308 void FramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
310 glFramebufferTexture2D(target,attachment,textarget,texture,level);
313 void FrontFace (GLenum mode)
318 void GenBuffers (GLsizei n, GLuint* buffers)
320 glGenBuffers(n,buffers);
323 void GenerateMipmap (GLenum target)
325 glGenerateMipmap(target);
328 void GenFramebuffers (GLsizei n, GLuint* framebuffers)
330 glGenFramebuffers(n,framebuffers);
333 void GenRenderbuffers (GLsizei n, GLuint* renderbuffers)
335 glGenRenderbuffers(n,renderbuffers);
338 void GenTextures (GLsizei n, GLuint* textures)
340 glGenTextures(n,textures);
343 void GetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
345 glGetActiveAttrib(program,index,bufsize,length,size,type,name);
348 void GetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
350 glGetActiveUniform(program,index,bufsize,length,size,type,name);
353 void GetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
355 glGetAttachedShaders(program,maxcount,count,shaders);
358 int GetAttribLocation (GLuint program, const char* name)
360 return glGetAttribLocation(program,name);
363 void GetBooleanv (GLenum pname, GLboolean* params)
365 glGetBooleanv(pname,params);
368 void GetBufferParameteriv (GLenum target, GLenum pname, GLint* params)
370 glGetBufferParameteriv(target,pname,params);
373 GLenum GetError (void)
378 void GetFloatv (GLenum pname, GLfloat* params)
380 glGetFloatv(pname,params);
383 void GetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params)
385 glGetFramebufferAttachmentParameteriv(target,attachment,pname,params);
388 void GetIntegerv (GLenum pname, GLint* params)
390 glGetIntegerv(pname,params);
393 void GetProgramiv (GLuint program, GLenum pname, GLint* params)
395 glGetProgramiv(program,pname,params);
398 void GetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
400 glGetProgramInfoLog(program,bufsize,length,infolog);
403 void GetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params)
405 glGetRenderbufferParameteriv(target,pname,params);
408 void GetShaderiv (GLuint shader, GLenum pname, GLint* params)
410 glGetShaderiv(shader,pname,params);
413 void GetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
415 glGetShaderInfoLog(shader,bufsize,length,infolog);
418 void GetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
420 glGetShaderPrecisionFormat(shadertype,precisiontype,range,precision);
423 void GetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
425 glGetShaderSource(shader,bufsize,length,source);
428 const GLubyte* GetString (GLenum name)
430 return glGetString(name);
433 void GetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
435 glGetTexParameterfv(target,pname,params);
438 void GetTexParameteriv (GLenum target, GLenum pname, GLint* params)
440 glGetTexParameteriv(target,pname,params);
443 void GetUniformfv (GLuint program, GLint location, GLfloat* params)
445 glGetUniformfv(program,location,params);
448 void GetUniformiv (GLuint program, GLint location, GLint* params)
450 glGetUniformiv(program,location,params);
453 int GetUniformLocation (GLuint program, const char* name)
455 return glGetUniformLocation(program,name);
458 void GetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params)
460 glGetVertexAttribfv(index,pname,params);
463 void GetVertexAttribiv (GLuint index, GLenum pname, GLint* params)
465 glGetVertexAttribiv(index,pname,params);
468 void GetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer)
470 glGetVertexAttribPointerv(index,pname,pointer);
473 void Hint (GLenum target, GLenum mode)
478 GLboolean IsBuffer (GLuint buffer)
480 return glIsBuffer(buffer);
483 GLboolean IsEnabled (GLenum cap)
485 return glIsEnabled(cap);
488 GLboolean IsFramebuffer (GLuint framebuffer)
490 return glIsFramebuffer(framebuffer);
493 GLboolean IsProgram (GLuint program)
495 return glIsProgram(program);
498 GLboolean IsRenderbuffer (GLuint renderbuffer)
500 return glIsRenderbuffer(renderbuffer);
503 GLboolean IsShader (GLuint shader)
505 return glIsShader(shader);
508 GLboolean IsTexture (GLuint texture)
510 return glIsTexture(texture);
513 void LineWidth (GLfloat width)
518 void LinkProgram (GLuint program)
520 glLinkProgram(program);
523 void PixelStorei (GLenum pname, GLint param)
525 glPixelStorei(pname,param);
528 void PolygonOffset (GLfloat factor, GLfloat units)
530 glPolygonOffset(factor,units);
533 void ReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
535 glReadPixels(x,y,width,height,format,type,pixels);
538 void ReleaseShaderCompiler (void)
540 glReleaseShaderCompiler();
543 void RenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
545 glRenderbufferStorage(target,internalformat,width,height);
548 void SampleCoverage (GLclampf value, GLboolean invert)
550 glSampleCoverage(value,invert);
553 void Scissor (GLint x, GLint y, GLsizei width, GLsizei height)
555 glScissor(x,y,width,height);
558 void ShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
560 glShaderBinary(n,shaders,binaryformat,binary,length);
563 void ShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length)
565 glShaderSource(shader,count,string,length);
568 void StencilFunc (GLenum func, GLint ref, GLuint mask)
570 glStencilFunc(func,ref,mask);
573 void StencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
575 glStencilFuncSeparate(face,func,ref,mask);
578 void StencilMask (GLuint mask)
583 void StencilMaskSeparate (GLenum face, GLuint mask)
585 glStencilMaskSeparate(face,mask);
588 void StencilOp (GLenum fail, GLenum zfail, GLenum zpass)
590 glStencilOp(fail,zfail,zpass);
593 void StencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
595 glStencilOpSeparate(face,fail,zfail,zpass);
598 void TexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
600 glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels);
603 void TexParameterf (GLenum target, GLenum pname, GLfloat param)
605 glTexParameterf(target,pname,param);
608 void TexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
610 glTexParameterfv(target,pname,params);
613 void TexParameteri (GLenum target, GLenum pname, GLint param)
615 glTexParameteri(target,pname,param);
618 void TexParameteriv (GLenum target, GLenum pname, const GLint* params)
620 glTexParameteriv(target,pname,params);
623 void TexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
625 glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);
628 void Uniform1f (GLint location, GLfloat x)
630 glUniform1f(location,x);
633 void Uniform1fv (GLint location, GLsizei count, const GLfloat* v)
635 glUniform1fv(location,count,v);
638 void Uniform1i (GLint location, GLint x)
640 glUniform1i(location,x);
643 void Uniform1iv (GLint location, GLsizei count, const GLint* v)
645 glUniform1iv(location,count,v);
648 void Uniform2f (GLint location, GLfloat x, GLfloat y)
650 glUniform2f(location,x,y);
653 void Uniform2fv (GLint location, GLsizei count, const GLfloat* v)
655 glUniform2fv(location,count,v);
658 void Uniform2i (GLint location, GLint x, GLint y)
660 glUniform2i(location,x,y);
663 void Uniform2iv (GLint location, GLsizei count, const GLint* v)
665 glUniform2iv(location,count,v);
668 void Uniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
670 glUniform3f(location,x,y,z);
673 void Uniform3fv (GLint location, GLsizei count, const GLfloat* v)
675 glUniform3fv(location,count,v);
678 void Uniform3i (GLint location, GLint x, GLint y, GLint z)
680 glUniform3i(location,x,y,z);
683 void Uniform3iv (GLint location, GLsizei count, const GLint* v)
685 glUniform3iv(location,count,v);
688 void Uniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
690 glUniform4f(location,x,y,z,w);
693 void Uniform4fv (GLint location, GLsizei count, const GLfloat* v)
695 glUniform4fv(location,count,v);
698 void Uniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)
700 glUniform4i(location,x,y,z,w);
703 void Uniform4iv (GLint location, GLsizei count, const GLint* v)
705 glUniform4iv(location,count,v);
708 void UniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
710 glUniformMatrix2fv(location,count,transpose,value);
713 void UniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
715 glUniformMatrix3fv(location,count,transpose,value);
718 void UniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
720 glUniformMatrix4fv(location,count,transpose,value);
723 void UseProgram (GLuint program)
725 glUseProgram(program);
728 void ValidateProgram (GLuint program)
730 glValidateProgram(program);
733 void VertexAttrib1f (GLuint indx, GLfloat x)
735 glVertexAttrib1f(indx,x);
738 void VertexAttrib1fv (GLuint indx, const GLfloat* values)
740 glVertexAttrib1fv(indx,values);
743 void VertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
745 glVertexAttrib2f(indx,x,y);
748 void VertexAttrib2fv (GLuint indx, const GLfloat* values)
750 glVertexAttrib2fv(indx,values);
753 void VertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
755 glVertexAttrib3f(indx,x,y,z);
758 void VertexAttrib3fv (GLuint indx, const GLfloat* values)
760 glVertexAttrib3fv(indx,values);
763 void VertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
765 glVertexAttrib4f(indx,x,y,z,w);
768 void VertexAttrib4fv (GLuint indx, const GLfloat* values)
770 glVertexAttrib4fv(indx,values);
773 void VertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
775 glVertexAttribPointer(indx,size,type,normalized,stride,ptr);
778 void Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
780 glViewport(x,y,width,height);
785 void ReadBuffer(GLenum mode)
787 #if DALI_GLES_VERSION >= 30
789 #endif // DALI_GLES_VERSION >= 30
792 void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
794 #if DALI_GLES_VERSION >= 30
795 glDrawRangeElements(mode,start,end,count,type,indices);
796 #endif // DALI_GLES_VERSION >= 30
799 void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
801 #if DALI_GLES_VERSION >= 30
802 glTexImage3D(target,level,internalformat,width,height,depth,border,format,type,pixels);
803 #endif // DALI_GLES_VERSION >= 30
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)
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
813 void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
815 #if DALI_GLES_VERSION >= 30
816 glCopyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
817 #endif // DALI_GLES_VERSION >= 30
820 void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
822 #if DALI_GLES_VERSION >= 30
823 glCompressedTexImage3D(target,level,internalformat,width,height,depth,border,imageSize,data);
824 #endif // DALI_GLES_VERSION >= 30
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)
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
834 void GenQueries(GLsizei n, GLuint* ids)
836 #if DALI_GLES_VERSION >= 30
838 #endif // DALI_GLES_VERSION >= 30
841 void DeleteQueries(GLsizei n, const GLuint* ids)
843 #if DALI_GLES_VERSION >= 30
844 glDeleteQueries(n,ids);
845 #endif // DALI_GLES_VERSION >= 30
848 GLboolean IsQuery(GLuint id)
850 #if DALI_GLES_VERSION >= 30
851 return glIsQuery(id);
854 #endif // DALI_GLES_VERSION >= 30
857 void BeginQuery(GLenum target, GLuint id)
859 #if DALI_GLES_VERSION >= 30
860 glBeginQuery(target,id);
861 #endif // DALI_GLES_VERSION >= 30
864 void EndQuery(GLenum target)
866 #if DALI_GLES_VERSION >= 30
868 #endif // DALI_GLES_VERSION >= 30
871 void GetQueryiv(GLenum target, GLenum pname, GLint* params)
873 #if DALI_GLES_VERSION >= 30
874 glGetQueryiv(target,pname,params);
875 #endif // DALI_GLES_VERSION >= 30
878 void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
880 #if DALI_GLES_VERSION >= 30
881 glGetQueryObjectuiv(id,pname,params);
882 #endif // DALI_GLES_VERSION >= 30
885 GLboolean UnmapBuffer(GLenum target)
887 #if DALI_GLES_VERSION >= 30
888 return glUnmapBuffer(target);
891 #endif // DALI_GLES_VERSION >= 30
894 void GetBufferPointerv(GLenum target, GLenum pname, GLvoid** params)
896 #if DALI_GLES_VERSION >= 30
897 glGetBufferPointerv(target,pname,params);
898 #endif // DALI_GLES_VERSION >= 30
901 void DrawBuffers(GLsizei n, const GLenum* bufs)
903 #if DALI_GLES_VERSION >= 30
904 glDrawBuffers(n,bufs);
905 #endif // DALI_GLES_VERSION >= 30
908 void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
910 #if DALI_GLES_VERSION >= 30
911 glUniformMatrix2x3fv(location,count,transpose,value);
912 #endif // DALI_GLES_VERSION >= 30
915 void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
917 #if DALI_GLES_VERSION >= 30
918 glUniformMatrix3x2fv(location,count,transpose,value);
919 #endif // DALI_GLES_VERSION >= 30
922 void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
924 #if DALI_GLES_VERSION >= 30
925 glUniformMatrix2x4fv(location,count,transpose,value);
926 #endif // DALI_GLES_VERSION >= 30
929 void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
931 #if DALI_GLES_VERSION >= 30
932 glUniformMatrix4x2fv(location,count,transpose,value);
933 #endif // DALI_GLES_VERSION >= 30
936 void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
938 #if DALI_GLES_VERSION >= 30
939 glUniformMatrix3x4fv(location,count,transpose,value);
940 #endif // DALI_GLES_VERSION >= 30
943 void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
945 #if DALI_GLES_VERSION >= 30
946 glUniformMatrix4x3fv(location,count,transpose,value);
947 #endif // DALI_GLES_VERSION >= 30
950 void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
952 #if DALI_GLES_VERSION >= 30
953 glBlitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
954 #endif // DALI_GLES_VERSION >= 30
957 void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
959 #if DALI_GLES_VERSION >= 30
960 glRenderbufferStorageMultisample(target,samples,internalformat,width,height);
961 #endif // DALI_GLES_VERSION >= 30
964 void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
966 #if DALI_GLES_VERSION >= 30
967 glFramebufferTextureLayer(target,attachment,texture,level,layer);
968 #endif // DALI_GLES_VERSION >= 30
971 GLvoid* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
973 #if DALI_GLES_VERSION >= 30
974 return glMapBufferRange(target,offset,length,access);
977 #endif // DALI_GLES_VERSION >= 30
980 void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
982 #if DALI_GLES_VERSION >= 30
983 glFlushMappedBufferRange(target,offset,length);
984 #endif // DALI_GLES_VERSION >= 30
987 void BindVertexArray(GLuint array)
989 #if DALI_GLES_VERSION >= 30
990 glBindVertexArray(array);
991 #endif // DALI_GLES_VERSION >= 30
994 void DeleteVertexArrays(GLsizei n, const GLuint* arrays)
996 #if DALI_GLES_VERSION >= 30
997 glDeleteVertexArrays(n,arrays);
998 #endif // DALI_GLES_VERSION >= 30
1001 void GenVertexArrays(GLsizei n, GLuint* arrays)
1003 #if DALI_GLES_VERSION >= 30
1004 glGenVertexArrays(n,arrays);
1005 #endif // DALI_GLES_VERSION >= 30
1008 GLboolean IsVertexArray(GLuint array)
1010 #if DALI_GLES_VERSION >= 30
1011 return glIsVertexArray(array);
1014 #endif // DALI_GLES_VERSION >= 30
1017 void GetIntegeri_v(GLenum target, GLuint index, GLint* data)
1019 #if DALI_GLES_VERSION >= 30
1020 glGetIntegeri_v(target,index,data);
1021 #endif // DALI_GLES_VERSION >= 30
1024 void BeginTransformFeedback(GLenum primitiveMode)
1026 #if DALI_GLES_VERSION >= 30
1027 glBeginTransformFeedback(primitiveMode);
1028 #endif // DALI_GLES_VERSION >= 30
1031 void EndTransformFeedback(void)
1033 #if DALI_GLES_VERSION >= 30
1034 glEndTransformFeedback();
1035 #endif // DALI_GLES_VERSION >= 30
1038 void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
1040 #if DALI_GLES_VERSION >= 30
1041 glBindBufferRange(target,index,buffer,offset,size);
1042 #endif // DALI_GLES_VERSION >= 30
1045 void BindBufferBase(GLenum target, GLuint index, GLuint buffer)
1047 #if DALI_GLES_VERSION >= 30
1048 glBindBufferBase(target,index,buffer);
1049 #endif // DALI_GLES_VERSION >= 30
1052 void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)
1054 #if DALI_GLES_VERSION >= 30
1055 glTransformFeedbackVaryings(program,count,varyings,bufferMode);
1056 #endif // DALI_GLES_VERSION >= 30
1059 void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
1061 #if DALI_GLES_VERSION >= 30
1062 glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name);
1063 #endif // DALI_GLES_VERSION >= 30
1066 void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
1068 #if DALI_GLES_VERSION >= 30
1069 glVertexAttribIPointer(index,size,type,stride,pointer);
1070 #endif // DALI_GLES_VERSION >= 30
1073 void GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
1075 #if DALI_GLES_VERSION >= 30
1076 glGetVertexAttribIiv(index,pname,params);
1077 #endif // DALI_GLES_VERSION >= 30
1080 void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
1082 #if DALI_GLES_VERSION >= 30
1083 glGetVertexAttribIuiv(index,pname,params);
1084 #endif // DALI_GLES_VERSION >= 30
1087 void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
1089 #if DALI_GLES_VERSION >= 30
1090 glVertexAttribI4i(index,x,y,z,w);
1091 #endif // DALI_GLES_VERSION >= 30
1094 void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
1096 #if DALI_GLES_VERSION >= 30
1097 glVertexAttribI4ui(index,x,y,z,w);
1098 #endif // DALI_GLES_VERSION >= 30
1101 void VertexAttribI4iv(GLuint index, const GLint* v)
1103 #if DALI_GLES_VERSION >= 30
1104 glVertexAttribI4iv(index,v);
1105 #endif // DALI_GLES_VERSION >= 30
1108 void VertexAttribI4uiv(GLuint index, const GLuint* v)
1110 #if DALI_GLES_VERSION >= 30
1111 glVertexAttribI4uiv(index,v);
1112 #endif // DALI_GLES_VERSION >= 30
1115 void GetUniformuiv(GLuint program, GLint location, GLuint* params)
1117 #if DALI_GLES_VERSION >= 30
1118 glGetUniformuiv(program,location,params);
1119 #endif // DALI_GLES_VERSION >= 30
1122 GLint GetFragDataLocation(GLuint program, const GLchar *name)
1124 #if DALI_GLES_VERSION >= 30
1125 return glGetFragDataLocation(program,name);
1128 #endif // DALI_GLES_VERSION >= 30
1131 void Uniform1ui(GLint location, GLuint v0)
1133 #if DALI_GLES_VERSION >= 30
1134 glUniform1ui(location,v0);
1135 #endif // DALI_GLES_VERSION >= 30
1138 void Uniform2ui(GLint location, GLuint v0, GLuint v1)
1140 #if DALI_GLES_VERSION >= 30
1141 glUniform2ui(location,v0,v1);
1142 #endif // DALI_GLES_VERSION >= 30
1145 void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
1147 #if DALI_GLES_VERSION >= 30
1148 glUniform3ui(location,v0,v1,v2);
1149 #endif // DALI_GLES_VERSION >= 30
1152 void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
1154 #if DALI_GLES_VERSION >= 30
1155 glUniform4ui(location,v0,v1,v2,v3);
1156 #endif // DALI_GLES_VERSION >= 30
1159 void Uniform1uiv(GLint location, GLsizei count, const GLuint* value)
1161 #if DALI_GLES_VERSION >= 30
1162 glUniform1uiv(location,count,value);
1163 #endif // DALI_GLES_VERSION >= 30
1166 void Uniform2uiv(GLint location, GLsizei count, const GLuint* value)
1168 #if DALI_GLES_VERSION >= 30
1169 glUniform2uiv(location,count,value);
1170 #endif // DALI_GLES_VERSION >= 30
1173 void Uniform3uiv(GLint location, GLsizei count, const GLuint* value)
1175 #if DALI_GLES_VERSION >= 30
1176 glUniform3uiv(location,count,value);
1177 #endif // DALI_GLES_VERSION >= 30
1180 void Uniform4uiv(GLint location, GLsizei count, const GLuint* value)
1182 #if DALI_GLES_VERSION >= 30
1183 glUniform4uiv(location,count,value);
1184 #endif // DALI_GLES_VERSION >= 30
1187 void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value)
1189 #if DALI_GLES_VERSION >= 30
1190 glClearBufferiv(buffer,drawbuffer,value);
1191 #endif // DALI_GLES_VERSION >= 30
1194 void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value)
1196 #if DALI_GLES_VERSION >= 30
1197 glClearBufferuiv(buffer,drawbuffer,value);
1198 #endif // DALI_GLES_VERSION >= 30
1201 void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value)
1203 #if DALI_GLES_VERSION >= 30
1204 glClearBufferfv(buffer,drawbuffer,value);
1205 #endif // DALI_GLES_VERSION >= 30
1208 void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
1210 #if DALI_GLES_VERSION >= 30
1211 glClearBufferfi(buffer,drawbuffer,depth,stencil);
1212 #endif // DALI_GLES_VERSION >= 30
1215 const GLubyte* GetStringi(GLenum name, GLuint index)
1217 #if DALI_GLES_VERSION >= 30
1218 return glGetStringi(name,index);
1221 #endif // DALI_GLES_VERSION >= 30
1224 void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
1226 #if DALI_GLES_VERSION >= 30
1227 glCopyBufferSubData(readTarget,writeTarget,readOffset,writeOffset,size);
1228 #endif // DALI_GLES_VERSION >= 30
1231 void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)
1233 #if DALI_GLES_VERSION >= 30
1234 glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices);
1235 #endif // DALI_GLES_VERSION >= 30
1238 void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
1240 #if DALI_GLES_VERSION >= 30
1241 glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params);
1242 #endif // DALI_GLES_VERSION >= 30
1245 GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName)
1247 #if DALI_GLES_VERSION >= 30
1248 return glGetUniformBlockIndex(program,uniformBlockName);
1251 #endif // DALI_GLES_VERSION >= 30
1254 void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
1256 #if DALI_GLES_VERSION >= 30
1257 glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params);
1258 #endif // DALI_GLES_VERSION >= 30
1261 void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
1263 #if DALI_GLES_VERSION >= 30
1264 glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName);
1265 #endif // DALI_GLES_VERSION >= 30
1268 void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
1270 #if DALI_GLES_VERSION >= 30
1271 glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
1272 #endif // DALI_GLES_VERSION >= 30
1275 void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
1277 #if DALI_GLES_VERSION >= 30
1278 glDrawArraysInstanced(mode,first,count,instanceCount);
1279 #endif // DALI_GLES_VERSION >= 30
1282 void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)
1284 #if DALI_GLES_VERSION >= 30
1285 glDrawElementsInstanced(mode,count,type,indices,instanceCount);
1286 #endif // DALI_GLES_VERSION >= 30
1289 GLsync FenceSync(GLenum condition, GLbitfield flags)
1291 #if DALI_GLES_VERSION >= 30
1292 return glFenceSync(condition,flags);
1295 #endif // DALI_GLES_VERSION >= 30
1298 GLboolean IsSync(GLsync sync)
1300 #if DALI_GLES_VERSION >= 30
1301 return glIsSync(sync);
1304 #endif // DALI_GLES_VERSION >= 30
1307 void DeleteSync(GLsync sync)
1309 #if DALI_GLES_VERSION >= 30
1311 #endif // DALI_GLES_VERSION >= 30
1314 GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1316 #if DALI_GLES_VERSION >= 30
1317 return glClientWaitSync(sync,flags,timeout);
1320 #endif // DALI_GLES_VERSION >= 30
1323 void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1325 #if DALI_GLES_VERSION >= 30
1326 glWaitSync(sync,flags,timeout);
1327 #endif // DALI_GLES_VERSION >= 30
1330 void GetInteger64v(GLenum pname, GLint64* params)
1332 #if DALI_GLES_VERSION >= 30
1333 glGetInteger64v(pname,params);
1334 #endif // DALI_GLES_VERSION >= 30
1337 void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
1339 #if DALI_GLES_VERSION >= 30
1340 glGetSynciv(sync,pname,bufSize,length,values);
1341 #endif // DALI_GLES_VERSION >= 30
1344 void GetInteger64i_v(GLenum target, GLuint index, GLint64* data)
1346 #if DALI_GLES_VERSION >= 30
1347 glGetInteger64i_v(target,index,data);
1348 #endif // DALI_GLES_VERSION >= 30
1351 void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
1353 #if DALI_GLES_VERSION >= 30
1354 glGetBufferParameteri64v(target,pname,params);
1355 #endif // DALI_GLES_VERSION >= 30
1358 void GenSamplers(GLsizei count, GLuint* samplers)
1360 #if DALI_GLES_VERSION >= 30
1361 glGenSamplers(count,samplers);
1362 #endif // DALI_GLES_VERSION >= 30
1365 void DeleteSamplers(GLsizei count, const GLuint* samplers)
1367 #if DALI_GLES_VERSION >= 30
1368 glDeleteSamplers(count,samplers);
1369 #endif // DALI_GLES_VERSION >= 30
1372 GLboolean IsSampler(GLuint sampler)
1374 #if DALI_GLES_VERSION >= 30
1375 return glIsSampler(sampler);
1378 #endif // DALI_GLES_VERSION >= 30
1381 void BindSampler(GLuint unit, GLuint sampler)
1383 #if DALI_GLES_VERSION >= 30
1384 glBindSampler(unit,sampler);
1385 #endif // DALI_GLES_VERSION >= 30
1388 void SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
1390 #if DALI_GLES_VERSION >= 30
1391 glSamplerParameteri(sampler,pname,param);
1392 #endif // DALI_GLES_VERSION >= 30
1395 void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param)
1397 #if DALI_GLES_VERSION >= 30
1398 glSamplerParameteriv(sampler,pname,param);
1399 #endif // DALI_GLES_VERSION >= 30
1402 void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
1404 #if DALI_GLES_VERSION >= 30
1405 glSamplerParameterf(sampler,pname,param);
1406 #endif // DALI_GLES_VERSION >= 30
1409 void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param)
1411 #if DALI_GLES_VERSION >= 30
1412 glSamplerParameterfv(sampler,pname,param);
1413 #endif // DALI_GLES_VERSION >= 30
1416 void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
1418 #if DALI_GLES_VERSION >= 30
1419 glGetSamplerParameteriv(sampler,pname,params);
1420 #endif // DALI_GLES_VERSION >= 30
1423 void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
1425 #if DALI_GLES_VERSION >= 30
1426 glGetSamplerParameterfv(sampler,pname,params);
1427 #endif // DALI_GLES_VERSION >= 30
1430 void VertexAttribDivisor(GLuint index, GLuint divisor)
1432 #if DALI_GLES_VERSION >= 30
1433 glVertexAttribDivisor(index,divisor);
1434 #endif // DALI_GLES_VERSION >= 30
1437 void BindTransformFeedback(GLenum target, GLuint id)
1439 #if DALI_GLES_VERSION >= 30
1440 glBindTransformFeedback(target,id);
1441 #endif // DALI_GLES_VERSION >= 30
1444 void DeleteTransformFeedbacks(GLsizei n, const GLuint* ids)
1446 #if DALI_GLES_VERSION >= 30
1447 glDeleteTransformFeedbacks(n,ids);
1448 #endif // DALI_GLES_VERSION >= 30
1451 void GenTransformFeedbacks(GLsizei n, GLuint* ids)
1453 #if DALI_GLES_VERSION >= 30
1454 glGenTransformFeedbacks(n,ids);
1455 #endif // DALI_GLES_VERSION >= 30
1458 GLboolean IsTransformFeedback(GLuint id)
1460 #if DALI_GLES_VERSION >= 30
1461 return glIsTransformFeedback(id);
1464 #endif // DALI_GLES_VERSION >= 30
1467 void PauseTransformFeedback(void)
1469 #if DALI_GLES_VERSION >= 30
1470 glPauseTransformFeedback();
1471 #endif // DALI_GLES_VERSION >= 30
1474 void ResumeTransformFeedback(void)
1476 #if DALI_GLES_VERSION >= 30
1477 glResumeTransformFeedback();
1478 #endif // DALI_GLES_VERSION >= 30
1481 void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
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);
1488 mGlExtensions.GetProgramBinaryOES(program, bufSize, length, binaryFormat, binary);
1489 #endif // DALI_GLES_VERSION >= 30
1492 void ProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)
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);
1499 mGlExtensions.ProgramBinaryOES(program, binaryFormat, binary, length);
1500 #endif // DALI_GLES_VERSION >= 30
1503 void ProgramParameteri(GLuint program, GLenum pname, GLint value)
1505 #if DALI_GLES_VERSION >= 30
1506 glProgramParameteri(program,pname,value);
1507 #endif // DALI_GLES_VERSION >= 30
1510 void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments)
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
1519 void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)
1521 #if DALI_GLES_VERSION >= 30
1522 glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height);
1523 #endif // DALI_GLES_VERSION >= 30
1526 void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
1528 #if DALI_GLES_VERSION >= 30
1529 glTexStorage2D(target,levels,internalformat,width,height);
1530 #endif // DALI_GLES_VERSION >= 30
1533 void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
1535 #if DALI_GLES_VERSION >= 30
1536 glTexStorage3D(target,levels,internalformat,width,height,depth);
1537 #endif // DALI_GLES_VERSION >= 30
1540 void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
1542 #if DALI_GLES_VERSION >= 30
1543 glGetInternalformativ(target,internalformat,pname,bufSize,params);
1544 #endif // DALI_GLES_VERSION >= 30
1548 ECoreX::GlExtensions mGlExtensions;
1552 } // namespace Adaptor
1554 } // namespace Internal
1558 #endif // __DALI_INTERNAL_GL_IMPLEMENTATION_H__