1 #ifndef __DALI_INTERNAL_GL_IMPLEMENTATION_H__
2 #define __DALI_INTERNAL_GL_IMPLEMENTATION_H__
5 * Copyright (c) 2014 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 #if DALI_GLES_VERSION >= 30
27 #include <GLES3/gl3.h>
30 #include <GLES2/gl2.h>
33 #include <dali/integration-api/gl-abstraction.h>
36 #include <gl/gl-extensions.h>
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.
52 class GlImplementation: public Dali::Integration::GlAbstraction
56 virtual ~GlImplementation() {}
60 /* Do nothing in main implementation */
63 void PostRender( unsigned int timeDelta )
65 /* Do nothing in main implementation */
70 void ActiveTexture (GLenum texture)
72 glActiveTexture(texture);
75 void AttachShader (GLuint program, GLuint shader)
77 glAttachShader(program,shader);
80 void BindAttribLocation (GLuint program, GLuint index, const char* name)
82 glBindAttribLocation(program,index,name);
85 void BindBuffer (GLenum target, GLuint buffer)
87 glBindBuffer(target,buffer);
90 void BindFramebuffer (GLenum target, GLuint framebuffer)
92 glBindFramebuffer(target,framebuffer);
95 void BindRenderbuffer (GLenum target, GLuint renderbuffer)
97 glBindRenderbuffer(target,renderbuffer);
100 void BindTexture (GLenum target, GLuint texture)
102 glBindTexture(target,texture);
105 void BlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
107 glBlendColor(red,green,blue,alpha);
110 void BlendEquation ( GLenum mode )
112 glBlendEquation(mode);
115 void BlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
117 glBlendEquationSeparate(modeRGB,modeAlpha);
120 void BlendFunc (GLenum sfactor, GLenum dfactor)
122 glBlendFunc(sfactor,dfactor);
125 void BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
127 glBlendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
130 void BufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage)
132 glBufferData(target,size,data,usage);
135 void BufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
137 glBufferSubData(target,offset,size,data);
140 GLenum CheckFramebufferStatus (GLenum target)
142 return glCheckFramebufferStatus(target);
145 void Clear (GLbitfield mask)
150 void ClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
152 glClearColor(red,green,blue,alpha);
155 void ClearDepthf (GLclampf depth)
157 glClearDepthf(depth);
160 void ClearStencil (GLint s)
165 void ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
167 glColorMask(red,green,blue,alpha);
170 void CompileShader (GLuint shader)
172 glCompileShader(shader);
175 void CompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
177 glCompressedTexImage2D(target,level,internalformat,width,height,border,imageSize,data);
180 void CompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
182 glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data);
185 void CopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
187 glCopyTexImage2D(target,level,internalformat,x,y,width,height,border);
190 void CopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
192 glCopyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
195 GLuint CreateProgram (void)
197 return glCreateProgram();
200 GLuint CreateShader (GLenum type)
202 return glCreateShader(type);
205 void CullFace (GLenum mode)
210 void DeleteBuffers (GLsizei n, const GLuint* buffers)
212 glDeleteBuffers(n,buffers);
215 void DeleteFramebuffers (GLsizei n, const GLuint* framebuffers)
217 glDeleteFramebuffers(n,framebuffers);
220 void DeleteProgram (GLuint program)
222 glDeleteProgram(program);
225 void DeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers)
227 glDeleteRenderbuffers(n,renderbuffers);
230 void DeleteShader (GLuint shader)
232 glDeleteShader(shader);
235 void DeleteTextures (GLsizei n, const GLuint* textures)
237 glDeleteTextures(n,textures);
240 void DepthFunc (GLenum func)
245 void DepthMask (GLboolean flag)
250 void DepthRangef (GLclampf zNear, GLclampf zFar)
252 glDepthRangef(zNear,zFar);
255 void DetachShader (GLuint program, GLuint shader)
257 glDetachShader(program,shader);
260 void Disable (GLenum cap)
265 void DisableVertexAttribArray (GLuint index)
267 glDisableVertexAttribArray(index);
270 void DrawArrays (GLenum mode, GLint first, GLsizei count)
272 glDrawArrays(mode,first,count);
275 void DrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices)
277 glDrawElements(mode,count,type,indices);
280 void Enable (GLenum cap)
285 void EnableVertexAttribArray (GLuint index)
287 glEnableVertexAttribArray(index);
300 void FramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
302 glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
305 void FramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
307 glFramebufferTexture2D(target,attachment,textarget,texture,level);
310 void FrontFace (GLenum mode)
315 void GenBuffers (GLsizei n, GLuint* buffers)
317 glGenBuffers(n,buffers);
320 void GenerateMipmap (GLenum target)
322 glGenerateMipmap(target);
325 void GenFramebuffers (GLsizei n, GLuint* framebuffers)
327 glGenFramebuffers(n,framebuffers);
330 void GenRenderbuffers (GLsizei n, GLuint* renderbuffers)
332 glGenRenderbuffers(n,renderbuffers);
335 void GenTextures (GLsizei n, GLuint* textures)
337 glGenTextures(n,textures);
340 void GetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
342 glGetActiveAttrib(program,index,bufsize,length,size,type,name);
345 void GetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
347 glGetActiveUniform(program,index,bufsize,length,size,type,name);
350 void GetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
352 glGetAttachedShaders(program,maxcount,count,shaders);
355 int GetAttribLocation (GLuint program, const char* name)
357 return glGetAttribLocation(program,name);
360 void GetBooleanv (GLenum pname, GLboolean* params)
362 glGetBooleanv(pname,params);
365 void GetBufferParameteriv (GLenum target, GLenum pname, GLint* params)
367 glGetBufferParameteriv(target,pname,params);
370 GLenum GetError (void)
375 void GetFloatv (GLenum pname, GLfloat* params)
377 glGetFloatv(pname,params);
380 void GetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params)
382 glGetFramebufferAttachmentParameteriv(target,attachment,pname,params);
385 void GetIntegerv (GLenum pname, GLint* params)
387 glGetIntegerv(pname,params);
390 void GetProgramiv (GLuint program, GLenum pname, GLint* params)
392 glGetProgramiv(program,pname,params);
395 void GetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
397 glGetProgramInfoLog(program,bufsize,length,infolog);
400 void GetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params)
402 glGetRenderbufferParameteriv(target,pname,params);
405 void GetShaderiv (GLuint shader, GLenum pname, GLint* params)
407 glGetShaderiv(shader,pname,params);
410 void GetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
412 glGetShaderInfoLog(shader,bufsize,length,infolog);
415 void GetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
417 glGetShaderPrecisionFormat(shadertype,precisiontype,range,precision);
420 void GetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
422 glGetShaderSource(shader,bufsize,length,source);
425 const GLubyte* GetString (GLenum name)
427 return glGetString(name);
430 void GetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
432 glGetTexParameterfv(target,pname,params);
435 void GetTexParameteriv (GLenum target, GLenum pname, GLint* params)
437 glGetTexParameteriv(target,pname,params);
440 void GetUniformfv (GLuint program, GLint location, GLfloat* params)
442 glGetUniformfv(program,location,params);
445 void GetUniformiv (GLuint program, GLint location, GLint* params)
447 glGetUniformiv(program,location,params);
450 int GetUniformLocation (GLuint program, const char* name)
452 return glGetUniformLocation(program,name);
455 void GetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params)
457 glGetVertexAttribfv(index,pname,params);
460 void GetVertexAttribiv (GLuint index, GLenum pname, GLint* params)
462 glGetVertexAttribiv(index,pname,params);
465 void GetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer)
467 glGetVertexAttribPointerv(index,pname,pointer);
470 void Hint (GLenum target, GLenum mode)
475 GLboolean IsBuffer (GLuint buffer)
477 return glIsBuffer(buffer);
480 GLboolean IsEnabled (GLenum cap)
482 return glIsEnabled(cap);
485 GLboolean IsFramebuffer (GLuint framebuffer)
487 return glIsFramebuffer(framebuffer);
490 GLboolean IsProgram (GLuint program)
492 return glIsProgram(program);
495 GLboolean IsRenderbuffer (GLuint renderbuffer)
497 return glIsRenderbuffer(renderbuffer);
500 GLboolean IsShader (GLuint shader)
502 return glIsShader(shader);
505 GLboolean IsTexture (GLuint texture)
507 return glIsTexture(texture);
510 void LineWidth (GLfloat width)
515 void LinkProgram (GLuint program)
517 glLinkProgram(program);
520 void PixelStorei (GLenum pname, GLint param)
522 glPixelStorei(pname,param);
525 void PolygonOffset (GLfloat factor, GLfloat units)
527 glPolygonOffset(factor,units);
530 void ReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
532 glReadPixels(x,y,width,height,format,type,pixels);
535 void ReleaseShaderCompiler (void)
537 glReleaseShaderCompiler();
540 void RenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
542 glRenderbufferStorage(target,internalformat,width,height);
545 void SampleCoverage (GLclampf value, GLboolean invert)
547 glSampleCoverage(value,invert);
550 void Scissor (GLint x, GLint y, GLsizei width, GLsizei height)
552 glScissor(x,y,width,height);
555 void ShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
557 glShaderBinary(n,shaders,binaryformat,binary,length);
560 void ShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length)
562 glShaderSource(shader,count,string,length);
565 void StencilFunc (GLenum func, GLint ref, GLuint mask)
567 glStencilFunc(func,ref,mask);
570 void StencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
572 glStencilFuncSeparate(face,func,ref,mask);
575 void StencilMask (GLuint mask)
580 void StencilMaskSeparate (GLenum face, GLuint mask)
582 glStencilMaskSeparate(face,mask);
585 void StencilOp (GLenum fail, GLenum zfail, GLenum zpass)
587 glStencilOp(fail,zfail,zpass);
590 void StencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
592 glStencilOpSeparate(face,fail,zfail,zpass);
595 void TexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
597 glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels);
600 void TexParameterf (GLenum target, GLenum pname, GLfloat param)
602 glTexParameterf(target,pname,param);
605 void TexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
607 glTexParameterfv(target,pname,params);
610 void TexParameteri (GLenum target, GLenum pname, GLint param)
612 glTexParameteri(target,pname,param);
615 void TexParameteriv (GLenum target, GLenum pname, const GLint* params)
617 glTexParameteriv(target,pname,params);
620 void TexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
622 glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);
625 void Uniform1f (GLint location, GLfloat x)
627 glUniform1f(location,x);
630 void Uniform1fv (GLint location, GLsizei count, const GLfloat* v)
632 glUniform1fv(location,count,v);
635 void Uniform1i (GLint location, GLint x)
637 glUniform1i(location,x);
640 void Uniform1iv (GLint location, GLsizei count, const GLint* v)
642 glUniform1iv(location,count,v);
645 void Uniform2f (GLint location, GLfloat x, GLfloat y)
647 glUniform2f(location,x,y);
650 void Uniform2fv (GLint location, GLsizei count, const GLfloat* v)
652 glUniform2fv(location,count,v);
655 void Uniform2i (GLint location, GLint x, GLint y)
657 glUniform2i(location,x,y);
660 void Uniform2iv (GLint location, GLsizei count, const GLint* v)
662 glUniform2iv(location,count,v);
665 void Uniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
667 glUniform3f(location,x,y,z);
670 void Uniform3fv (GLint location, GLsizei count, const GLfloat* v)
672 glUniform3fv(location,count,v);
675 void Uniform3i (GLint location, GLint x, GLint y, GLint z)
677 glUniform3i(location,x,y,z);
680 void Uniform3iv (GLint location, GLsizei count, const GLint* v)
682 glUniform3iv(location,count,v);
685 void Uniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
687 glUniform4f(location,x,y,z,w);
690 void Uniform4fv (GLint location, GLsizei count, const GLfloat* v)
692 glUniform4fv(location,count,v);
695 void Uniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)
697 glUniform4i(location,x,y,z,w);
700 void Uniform4iv (GLint location, GLsizei count, const GLint* v)
702 glUniform4iv(location,count,v);
705 void UniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
707 glUniformMatrix2fv(location,count,transpose,value);
710 void UniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
712 glUniformMatrix3fv(location,count,transpose,value);
715 void UniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
717 glUniformMatrix4fv(location,count,transpose,value);
720 void UseProgram (GLuint program)
722 glUseProgram(program);
725 void ValidateProgram (GLuint program)
727 glValidateProgram(program);
730 void VertexAttrib1f (GLuint indx, GLfloat x)
732 glVertexAttrib1f(indx,x);
735 void VertexAttrib1fv (GLuint indx, const GLfloat* values)
737 glVertexAttrib1fv(indx,values);
740 void VertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
742 glVertexAttrib2f(indx,x,y);
745 void VertexAttrib2fv (GLuint indx, const GLfloat* values)
747 glVertexAttrib2fv(indx,values);
750 void VertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
752 glVertexAttrib3f(indx,x,y,z);
755 void VertexAttrib3fv (GLuint indx, const GLfloat* values)
757 glVertexAttrib3fv(indx,values);
760 void VertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
762 glVertexAttrib4f(indx,x,y,z,w);
765 void VertexAttrib4fv (GLuint indx, const GLfloat* values)
767 glVertexAttrib4fv(indx,values);
770 void VertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
772 glVertexAttribPointer(indx,size,type,normalized,stride,ptr);
775 void Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
777 glViewport(x,y,width,height);
782 void ReadBuffer(GLenum mode)
784 #if DALI_GLES_VERSION >= 30
786 #endif // DALI_GLES_VERSION >= 30
789 void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
791 #if DALI_GLES_VERSION >= 30
792 glDrawRangeElements(mode,start,end,count,type,indices);
793 #endif // DALI_GLES_VERSION >= 30
796 void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
798 #if DALI_GLES_VERSION >= 30
799 glTexImage3D(target,level,internalformat,width,height,depth,border,format,type,pixels);
800 #endif // DALI_GLES_VERSION >= 30
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)
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
810 void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
812 #if DALI_GLES_VERSION >= 30
813 glCopyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
814 #endif // DALI_GLES_VERSION >= 30
817 void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
819 #if DALI_GLES_VERSION >= 30
820 glCompressedTexImage3D(target,level,internalformat,width,height,depth,border,imageSize,data);
821 #endif // DALI_GLES_VERSION >= 30
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)
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
831 void GenQueries(GLsizei n, GLuint* ids)
833 #if DALI_GLES_VERSION >= 30
835 #endif // DALI_GLES_VERSION >= 30
838 void DeleteQueries(GLsizei n, const GLuint* ids)
840 #if DALI_GLES_VERSION >= 30
841 glDeleteQueries(n,ids);
842 #endif // DALI_GLES_VERSION >= 30
845 GLboolean IsQuery(GLuint id)
847 #if DALI_GLES_VERSION >= 30
848 return glIsQuery(id);
851 #endif // DALI_GLES_VERSION >= 30
854 void BeginQuery(GLenum target, GLuint id)
856 #if DALI_GLES_VERSION >= 30
857 glBeginQuery(target,id);
858 #endif // DALI_GLES_VERSION >= 30
861 void EndQuery(GLenum target)
863 #if DALI_GLES_VERSION >= 30
865 #endif // DALI_GLES_VERSION >= 30
868 void GetQueryiv(GLenum target, GLenum pname, GLint* params)
870 #if DALI_GLES_VERSION >= 30
871 glGetQueryiv(target,pname,params);
872 #endif // DALI_GLES_VERSION >= 30
875 void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
877 #if DALI_GLES_VERSION >= 30
878 glGetQueryObjectuiv(id,pname,params);
879 #endif // DALI_GLES_VERSION >= 30
882 GLboolean UnmapBuffer(GLenum target)
884 #if DALI_GLES_VERSION >= 30
885 return glUnmapBuffer(target);
888 #endif // DALI_GLES_VERSION >= 30
891 void GetBufferPointerv(GLenum target, GLenum pname, GLvoid** params)
893 #if DALI_GLES_VERSION >= 30
894 glGetBufferPointerv(target,pname,params);
895 #endif // DALI_GLES_VERSION >= 30
898 void DrawBuffers(GLsizei n, const GLenum* bufs)
900 #if DALI_GLES_VERSION >= 30
901 glDrawBuffers(n,bufs);
902 #endif // DALI_GLES_VERSION >= 30
905 void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
907 #if DALI_GLES_VERSION >= 30
908 glUniformMatrix2x3fv(location,count,transpose,value);
909 #endif // DALI_GLES_VERSION >= 30
912 void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
914 #if DALI_GLES_VERSION >= 30
915 glUniformMatrix3x2fv(location,count,transpose,value);
916 #endif // DALI_GLES_VERSION >= 30
919 void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
921 #if DALI_GLES_VERSION >= 30
922 glUniformMatrix2x4fv(location,count,transpose,value);
923 #endif // DALI_GLES_VERSION >= 30
926 void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
928 #if DALI_GLES_VERSION >= 30
929 glUniformMatrix4x2fv(location,count,transpose,value);
930 #endif // DALI_GLES_VERSION >= 30
933 void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
935 #if DALI_GLES_VERSION >= 30
936 glUniformMatrix3x4fv(location,count,transpose,value);
937 #endif // DALI_GLES_VERSION >= 30
940 void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
942 #if DALI_GLES_VERSION >= 30
943 glUniformMatrix4x3fv(location,count,transpose,value);
944 #endif // DALI_GLES_VERSION >= 30
947 void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
949 #if DALI_GLES_VERSION >= 30
950 glBlitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
951 #endif // DALI_GLES_VERSION >= 30
954 void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
956 #if DALI_GLES_VERSION >= 30
957 glRenderbufferStorageMultisample(target,samples,internalformat,width,height);
958 #endif // DALI_GLES_VERSION >= 30
961 void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
963 #if DALI_GLES_VERSION >= 30
964 glFramebufferTextureLayer(target,attachment,texture,level,layer);
965 #endif // DALI_GLES_VERSION >= 30
968 GLvoid* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
970 #if DALI_GLES_VERSION >= 30
971 return glMapBufferRange(target,offset,length,access);
974 #endif // DALI_GLES_VERSION >= 30
977 void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
979 #if DALI_GLES_VERSION >= 30
980 glFlushMappedBufferRange(target,offset,length);
981 #endif // DALI_GLES_VERSION >= 30
984 void BindVertexArray(GLuint array)
986 #if DALI_GLES_VERSION >= 30
987 glBindVertexArray(array);
988 #endif // DALI_GLES_VERSION >= 30
991 void DeleteVertexArrays(GLsizei n, const GLuint* arrays)
993 #if DALI_GLES_VERSION >= 30
994 glDeleteVertexArrays(n,arrays);
995 #endif // DALI_GLES_VERSION >= 30
998 void GenVertexArrays(GLsizei n, GLuint* arrays)
1000 #if DALI_GLES_VERSION >= 30
1001 glGenVertexArrays(n,arrays);
1002 #endif // DALI_GLES_VERSION >= 30
1005 GLboolean IsVertexArray(GLuint array)
1007 #if DALI_GLES_VERSION >= 30
1008 return glIsVertexArray(array);
1011 #endif // DALI_GLES_VERSION >= 30
1014 void GetIntegeri_v(GLenum target, GLuint index, GLint* data)
1016 #if DALI_GLES_VERSION >= 30
1017 glGetIntegeri_v(target,index,data);
1018 #endif // DALI_GLES_VERSION >= 30
1021 void BeginTransformFeedback(GLenum primitiveMode)
1023 #if DALI_GLES_VERSION >= 30
1024 glBeginTransformFeedback(primitiveMode);
1025 #endif // DALI_GLES_VERSION >= 30
1028 void EndTransformFeedback(void)
1030 #if DALI_GLES_VERSION >= 30
1031 glEndTransformFeedback();
1032 #endif // DALI_GLES_VERSION >= 30
1035 void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
1037 #if DALI_GLES_VERSION >= 30
1038 glBindBufferRange(target,index,buffer,offset,size);
1039 #endif // DALI_GLES_VERSION >= 30
1042 void BindBufferBase(GLenum target, GLuint index, GLuint buffer)
1044 #if DALI_GLES_VERSION >= 30
1045 glBindBufferBase(target,index,buffer);
1046 #endif // DALI_GLES_VERSION >= 30
1049 void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)
1051 #if DALI_GLES_VERSION >= 30
1052 glTransformFeedbackVaryings(program,count,varyings,bufferMode);
1053 #endif // DALI_GLES_VERSION >= 30
1056 void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
1058 #if DALI_GLES_VERSION >= 30
1059 glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name);
1060 #endif // DALI_GLES_VERSION >= 30
1063 void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
1065 #if DALI_GLES_VERSION >= 30
1066 glVertexAttribIPointer(index,size,type,stride,pointer);
1067 #endif // DALI_GLES_VERSION >= 30
1070 void GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
1072 #if DALI_GLES_VERSION >= 30
1073 glGetVertexAttribIiv(index,pname,params);
1074 #endif // DALI_GLES_VERSION >= 30
1077 void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
1079 #if DALI_GLES_VERSION >= 30
1080 glGetVertexAttribIuiv(index,pname,params);
1081 #endif // DALI_GLES_VERSION >= 30
1084 void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
1086 #if DALI_GLES_VERSION >= 30
1087 glVertexAttribI4i(index,x,y,z,w);
1088 #endif // DALI_GLES_VERSION >= 30
1091 void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
1093 #if DALI_GLES_VERSION >= 30
1094 glVertexAttribI4ui(index,x,y,z,w);
1095 #endif // DALI_GLES_VERSION >= 30
1098 void VertexAttribI4iv(GLuint index, const GLint* v)
1100 #if DALI_GLES_VERSION >= 30
1101 glVertexAttribI4iv(index,v);
1102 #endif // DALI_GLES_VERSION >= 30
1105 void VertexAttribI4uiv(GLuint index, const GLuint* v)
1107 #if DALI_GLES_VERSION >= 30
1108 glVertexAttribI4uiv(index,v);
1109 #endif // DALI_GLES_VERSION >= 30
1112 void GetUniformuiv(GLuint program, GLint location, GLuint* params)
1114 #if DALI_GLES_VERSION >= 30
1115 glGetUniformuiv(program,location,params);
1116 #endif // DALI_GLES_VERSION >= 30
1119 GLint GetFragDataLocation(GLuint program, const GLchar *name)
1121 #if DALI_GLES_VERSION >= 30
1122 return glGetFragDataLocation(program,name);
1125 #endif // DALI_GLES_VERSION >= 30
1128 void Uniform1ui(GLint location, GLuint v0)
1130 #if DALI_GLES_VERSION >= 30
1131 glUniform1ui(location,v0);
1132 #endif // DALI_GLES_VERSION >= 30
1135 void Uniform2ui(GLint location, GLuint v0, GLuint v1)
1137 #if DALI_GLES_VERSION >= 30
1138 glUniform2ui(location,v0,v1);
1139 #endif // DALI_GLES_VERSION >= 30
1142 void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
1144 #if DALI_GLES_VERSION >= 30
1145 glUniform3ui(location,v0,v1,v2);
1146 #endif // DALI_GLES_VERSION >= 30
1149 void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
1151 #if DALI_GLES_VERSION >= 30
1152 glUniform4ui(location,v0,v1,v2,v3);
1153 #endif // DALI_GLES_VERSION >= 30
1156 void Uniform1uiv(GLint location, GLsizei count, const GLuint* value)
1158 #if DALI_GLES_VERSION >= 30
1159 glUniform1uiv(location,count,value);
1160 #endif // DALI_GLES_VERSION >= 30
1163 void Uniform2uiv(GLint location, GLsizei count, const GLuint* value)
1165 #if DALI_GLES_VERSION >= 30
1166 glUniform2uiv(location,count,value);
1167 #endif // DALI_GLES_VERSION >= 30
1170 void Uniform3uiv(GLint location, GLsizei count, const GLuint* value)
1172 #if DALI_GLES_VERSION >= 30
1173 glUniform3uiv(location,count,value);
1174 #endif // DALI_GLES_VERSION >= 30
1177 void Uniform4uiv(GLint location, GLsizei count, const GLuint* value)
1179 #if DALI_GLES_VERSION >= 30
1180 glUniform4uiv(location,count,value);
1181 #endif // DALI_GLES_VERSION >= 30
1184 void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value)
1186 #if DALI_GLES_VERSION >= 30
1187 glClearBufferiv(buffer,drawbuffer,value);
1188 #endif // DALI_GLES_VERSION >= 30
1191 void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value)
1193 #if DALI_GLES_VERSION >= 30
1194 glClearBufferuiv(buffer,drawbuffer,value);
1195 #endif // DALI_GLES_VERSION >= 30
1198 void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value)
1200 #if DALI_GLES_VERSION >= 30
1201 glClearBufferfv(buffer,drawbuffer,value);
1202 #endif // DALI_GLES_VERSION >= 30
1205 void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
1207 #if DALI_GLES_VERSION >= 30
1208 glClearBufferfi(buffer,drawbuffer,depth,stencil);
1209 #endif // DALI_GLES_VERSION >= 30
1212 const GLubyte* GetStringi(GLenum name, GLuint index)
1214 #if DALI_GLES_VERSION >= 30
1215 return glGetStringi(name,index);
1218 #endif // DALI_GLES_VERSION >= 30
1221 void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
1223 #if DALI_GLES_VERSION >= 30
1224 glCopyBufferSubData(readTarget,writeTarget,readOffset,writeOffset,size);
1225 #endif // DALI_GLES_VERSION >= 30
1228 void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)
1230 #if DALI_GLES_VERSION >= 30
1231 glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices);
1232 #endif // DALI_GLES_VERSION >= 30
1235 void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
1237 #if DALI_GLES_VERSION >= 30
1238 glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params);
1239 #endif // DALI_GLES_VERSION >= 30
1242 GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName)
1244 #if DALI_GLES_VERSION >= 30
1245 return glGetUniformBlockIndex(program,uniformBlockName);
1248 #endif // DALI_GLES_VERSION >= 30
1251 void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
1253 #if DALI_GLES_VERSION >= 30
1254 glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params);
1255 #endif // DALI_GLES_VERSION >= 30
1258 void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
1260 #if DALI_GLES_VERSION >= 30
1261 glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName);
1262 #endif // DALI_GLES_VERSION >= 30
1265 void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
1267 #if DALI_GLES_VERSION >= 30
1268 glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
1269 #endif // DALI_GLES_VERSION >= 30
1272 void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
1274 #if DALI_GLES_VERSION >= 30
1275 glDrawArraysInstanced(mode,first,count,instanceCount);
1276 #endif // DALI_GLES_VERSION >= 30
1279 void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)
1281 #if DALI_GLES_VERSION >= 30
1282 glDrawElementsInstanced(mode,count,type,indices,instanceCount);
1283 #endif // DALI_GLES_VERSION >= 30
1286 GLsync FenceSync(GLenum condition, GLbitfield flags)
1288 #if DALI_GLES_VERSION >= 30
1289 return glFenceSync(condition,flags);
1292 #endif // DALI_GLES_VERSION >= 30
1295 GLboolean IsSync(GLsync sync)
1297 #if DALI_GLES_VERSION >= 30
1298 return glIsSync(sync);
1301 #endif // DALI_GLES_VERSION >= 30
1304 void DeleteSync(GLsync sync)
1306 #if DALI_GLES_VERSION >= 30
1308 #endif // DALI_GLES_VERSION >= 30
1311 GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1313 #if DALI_GLES_VERSION >= 30
1314 return glClientWaitSync(sync,flags,timeout);
1317 #endif // DALI_GLES_VERSION >= 30
1320 void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1322 #if DALI_GLES_VERSION >= 30
1323 glWaitSync(sync,flags,timeout);
1324 #endif // DALI_GLES_VERSION >= 30
1327 void GetInteger64v(GLenum pname, GLint64* params)
1329 #if DALI_GLES_VERSION >= 30
1330 glGetInteger64v(pname,params);
1331 #endif // DALI_GLES_VERSION >= 30
1334 void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
1336 #if DALI_GLES_VERSION >= 30
1337 glGetSynciv(sync,pname,bufSize,length,values);
1338 #endif // DALI_GLES_VERSION >= 30
1341 void GetInteger64i_v(GLenum target, GLuint index, GLint64* data)
1343 #if DALI_GLES_VERSION >= 30
1344 glGetInteger64i_v(target,index,data);
1345 #endif // DALI_GLES_VERSION >= 30
1348 void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
1350 #if DALI_GLES_VERSION >= 30
1351 glGetBufferParameteri64v(target,pname,params);
1352 #endif // DALI_GLES_VERSION >= 30
1355 void GenSamplers(GLsizei count, GLuint* samplers)
1357 #if DALI_GLES_VERSION >= 30
1358 glGenSamplers(count,samplers);
1359 #endif // DALI_GLES_VERSION >= 30
1362 void DeleteSamplers(GLsizei count, const GLuint* samplers)
1364 #if DALI_GLES_VERSION >= 30
1365 glDeleteSamplers(count,samplers);
1366 #endif // DALI_GLES_VERSION >= 30
1369 GLboolean IsSampler(GLuint sampler)
1371 #if DALI_GLES_VERSION >= 30
1372 return glIsSampler(sampler);
1375 #endif // DALI_GLES_VERSION >= 30
1378 void BindSampler(GLuint unit, GLuint sampler)
1380 #if DALI_GLES_VERSION >= 30
1381 glBindSampler(unit,sampler);
1382 #endif // DALI_GLES_VERSION >= 30
1385 void SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
1387 #if DALI_GLES_VERSION >= 30
1388 glSamplerParameteri(sampler,pname,param);
1389 #endif // DALI_GLES_VERSION >= 30
1392 void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param)
1394 #if DALI_GLES_VERSION >= 30
1395 glSamplerParameteriv(sampler,pname,param);
1396 #endif // DALI_GLES_VERSION >= 30
1399 void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
1401 #if DALI_GLES_VERSION >= 30
1402 glSamplerParameterf(sampler,pname,param);
1403 #endif // DALI_GLES_VERSION >= 30
1406 void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param)
1408 #if DALI_GLES_VERSION >= 30
1409 glSamplerParameterfv(sampler,pname,param);
1410 #endif // DALI_GLES_VERSION >= 30
1413 void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
1415 #if DALI_GLES_VERSION >= 30
1416 glGetSamplerParameteriv(sampler,pname,params);
1417 #endif // DALI_GLES_VERSION >= 30
1420 void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
1422 #if DALI_GLES_VERSION >= 30
1423 glGetSamplerParameterfv(sampler,pname,params);
1424 #endif // DALI_GLES_VERSION >= 30
1427 void VertexAttribDivisor(GLuint index, GLuint divisor)
1429 #if DALI_GLES_VERSION >= 30
1430 glVertexAttribDivisor(index,divisor);
1431 #endif // DALI_GLES_VERSION >= 30
1434 void BindTransformFeedback(GLenum target, GLuint id)
1436 #if DALI_GLES_VERSION >= 30
1437 glBindTransformFeedback(target,id);
1438 #endif // DALI_GLES_VERSION >= 30
1441 void DeleteTransformFeedbacks(GLsizei n, const GLuint* ids)
1443 #if DALI_GLES_VERSION >= 30
1444 glDeleteTransformFeedbacks(n,ids);
1445 #endif // DALI_GLES_VERSION >= 30
1448 void GenTransformFeedbacks(GLsizei n, GLuint* ids)
1450 #if DALI_GLES_VERSION >= 30
1451 glGenTransformFeedbacks(n,ids);
1452 #endif // DALI_GLES_VERSION >= 30
1455 GLboolean IsTransformFeedback(GLuint id)
1457 #if DALI_GLES_VERSION >= 30
1458 return glIsTransformFeedback(id);
1461 #endif // DALI_GLES_VERSION >= 30
1464 void PauseTransformFeedback(void)
1466 #if DALI_GLES_VERSION >= 30
1467 glPauseTransformFeedback();
1468 #endif // DALI_GLES_VERSION >= 30
1471 void ResumeTransformFeedback(void)
1473 #if DALI_GLES_VERSION >= 30
1474 glResumeTransformFeedback();
1475 #endif // DALI_GLES_VERSION >= 30
1478 void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
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 #endif // DALI_GLES_VERSION >= 30
1487 void ProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)
1489 #if DALI_GLES_VERSION >= 30
1490 // if OpenGL ES 2.0 compatibility is need this can be implemented with
1491 // glProgramBinaryOES
1492 glProgramBinary(program,binaryFormat,binary,length);
1493 #endif // DALI_GLES_VERSION >= 30
1496 void ProgramParameteri(GLuint program, GLenum pname, GLint value)
1498 #if DALI_GLES_VERSION >= 30
1499 glProgramParameteri(program,pname,value);
1500 #endif // DALI_GLES_VERSION >= 30
1503 void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments)
1505 #if DALI_GLES_VERSION >= 30
1506 // if OpenGL ES 2.0 compatibility is need this can be implemented with
1507 // glDiscardFramebufferEXT
1508 glInvalidateFramebuffer(target,numAttachments,attachments);
1509 #endif // DALI_GLES_VERSION >= 30
1512 void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)
1514 #if DALI_GLES_VERSION >= 30
1515 glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height);
1516 #endif // DALI_GLES_VERSION >= 30
1519 void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
1521 #if DALI_GLES_VERSION >= 30
1522 glTexStorage2D(target,levels,internalformat,width,height);
1523 #endif // DALI_GLES_VERSION >= 30
1526 void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
1528 #if DALI_GLES_VERSION >= 30
1529 glTexStorage3D(target,levels,internalformat,width,height,depth);
1530 #endif // DALI_GLES_VERSION >= 30
1533 void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
1535 #if DALI_GLES_VERSION >= 30
1536 glGetInternalformativ(target,internalformat,pname,bufSize,params);
1537 #endif // DALI_GLES_VERSION >= 30
1541 ECoreX::GlExtensions mGlExtensions;
1545 } // namespace Adaptor
1547 } // namespace Internal
1551 #endif // __DALI_INTERNAL_GL_IMPLEMENTATION_H__