1 #ifndef DALI_INTERNAL_GL_IMPLEMENTATION_H
2 #define DALI_INTERNAL_GL_IMPLEMENTATION_H
5 * Copyright (c) 2023 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 #include <GLES2/gl2.h>
23 #include <GLES2/gl2ext.h>
24 #include <dali/devel-api/threading/conditional-wait.h>
25 #include <dali/integration-api/gl-abstraction.h>
26 #include <dali/internal/graphics/common/egl-include.h>
27 #include <dali/public-api/common/vector-wrapper.h>
33 #include <dali/devel-api/adaptor-framework/environment-variable.h>
34 #include <dali/internal/graphics/gles/gl-extensions-support.h>
35 #include <dali/internal/graphics/gles/gles-abstraction.h>
36 #include <dali/internal/graphics/gles/gles2-implementation.h>
37 #include <dali/internal/graphics/gles/gles3-implementation.h>
38 #include <dali/internal/system/common/time-service.h>
48 static constexpr int32_t INITIAL_GLES_VERSION = 30;
49 static constexpr int32_t GLES_VERSION_SUPPORT_BLEND_EQUATION_ADVANCED = 32;
51 static constexpr int32_t MINIMUM_GLES_VERSION_GET_MAXIMUM_MULTISAMPLES_TO_TEXTURE = 30;
53 static constexpr const char* LEGACY_SHADING_LANGUAGE_VERSION = "100";
55 static constexpr const char* DEFAULT_SAMPLER_TYPE = "sampler2D";
57 static constexpr const char* FRAGMENT_SHADER_ADVANCED_BLEND_EQUATION_PREFIX =
58 "#ifdef GL_KHR_blend_equation_advanced\n"
59 "#extension GL_KHR_blend_equation_advanced : enable\n"
62 "#if defined(GL_KHR_blend_equation_advanced) || __VERSION__>=320\n"
63 " layout(blend_support_all_equations) out;\n"
66 static constexpr const char* FRAGMENT_SHADER_OUTPUT_COLOR_STRING =
67 "out mediump vec4 fragColor;\n";
69 static constexpr const char* OES_EGL_IMAGE_EXTERNAL_STRING = "#extension GL_OES_EGL_image_external:require\n";
71 static constexpr const char* OES_EGL_IMAGE_EXTERNAL_STRING_ESSL3 = "#extension GL_OES_EGL_image_external_essl3:require\n";
73 // Threshold time in miliseconds
74 constexpr auto PERFORMANCE_LOG_THRESHOLD_TIME_ENV = "DALI_EGL_PERFORMANCE_LOG_THRESHOLD_TIME";
76 uint32_t GetPerformanceLogThresholdTime()
78 auto timeString = Dali::EnvironmentVariable::GetEnvironmentVariable(PERFORMANCE_LOG_THRESHOLD_TIME_ENV);
79 uint32_t time = timeString ? static_cast<uint32_t>(std::atoi(timeString)) : 0u;
86 * GlImplementation is a concrete implementation for GlAbstraction.
87 * The class provides an OpenGL-ES 2.0 or 3.0 implementation.
88 * The class is provided when creating the Integration::Core object.
90 class GlImplementation : public Dali::Integration::GlAbstraction
94 : mGlExtensionSupportedCacheList(),
95 mContextCreatedWaitCondition(),
97 mMaxCombinedTextureUnits(0),
98 mMaxTextureSamples(0),
99 mVertexShaderPrefix(""),
100 mGlesVersion(INITIAL_GLES_VERSION),
101 mShadingLanguageVersion(100),
102 mShadingLanguageVersionCached(false),
103 mIsSurfacelessContextSupported(false),
104 mIsContextCreated(false)
106 mImpl.reset(new Gles3Implementation());
109 virtual ~GlImplementation()
113 void PreRender() override
115 /* Do nothing in main implementation */
118 void PostRender() override
120 /* Do nothing in main implementation */
123 void ContextCreated()
125 glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
126 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &mMaxCombinedTextureUnits);
128 // Since gles 2.0 didn't return well for GL_MAJOR_VERSION and GL_MINOR_VERSION,
129 // Only change gles version for the device that support above gles 3.0.
130 if(mGlesVersion >= INITIAL_GLES_VERSION)
132 GLint majorVersion, minorVersion;
133 glGetIntegerv(GL_MAJOR_VERSION, &majorVersion);
134 glGetIntegerv(GL_MINOR_VERSION, &minorVersion);
135 mGlesVersion = majorVersion * 10 + minorVersion;
138 if(mGlesVersion >= GLES_VERSION_SUPPORT_BLEND_EQUATION_ADVANCED)
140 SetIsAdvancedBlendEquationSupported(true);
143 if(mGlExtensionSupportedCacheList.NeedFullCheck())
145 // fully check gl extensions if we miss some extension supported
146 mGlExtensionSupportedCacheList.EnsureGlExtensionSupportedCheck();
149 if(IsMultisampledRenderToTextureSupported())
151 mMaxTextureSamples = 0;
153 if(mGlesVersion >= MINIMUM_GLES_VERSION_GET_MAXIMUM_MULTISAMPLES_TO_TEXTURE)
155 // Try to get maximum FBO MSAA sampling level from GL_RENDERBUFFER first.
156 // If false, than ask again to GL_MAX_SAMPLES_EXT.
157 GetInternalformativ(GL_RENDERBUFFER, GL_RGBA8, GL_SAMPLES, 1, &mMaxTextureSamples);
159 if(mMaxTextureSamples == 0)
161 glGetIntegerv(GL_MAX_SAMPLES_EXT, &mMaxTextureSamples);
165 if(!mShadingLanguageVersionCached)
167 std::istringstream shadingLanguageVersionStream(reinterpret_cast<const char*>(glGetString(GL_SHADING_LANGUAGE_VERSION)));
169 uint32_t tokenCount = 0;
170 while(std::getline(shadingLanguageVersionStream, token, ' '))
172 if(tokenCount == 3 && token == "ES")
174 std::getline(shadingLanguageVersionStream, token, '.');
175 mShadingLanguageVersion = std::atoi(token.c_str());
176 mShadingLanguageVersion *= 100;
177 std::getline(shadingLanguageVersionStream, token, '.');
178 mShadingLanguageVersion += std::atoi(token.c_str());
185 mLogThreshold = GetPerformanceLogThresholdTime();
186 mLogEnabled = mLogThreshold > 0 ? true : false;
189 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
190 mIsContextCreated = true;
191 mContextCreatedWaitCondition.Notify(lock);
195 void SetGlesVersion(const int32_t glesVersion)
197 if(mGlesVersion / 10 != glesVersion / 10)
199 mGlesVersion = glesVersion;
200 if(mGlesVersion >= 30)
202 mImpl.reset(new Gles3Implementation());
206 mImpl.reset(new Gles2Implementation());
211 void SetIsSurfacelessContextSupported(const bool isSupported)
213 mIsSurfacelessContextSupported = isSupported;
216 bool IsSurfacelessContextSupported() const override
218 return mIsSurfacelessContextSupported;
221 void SetIsAdvancedBlendEquationSupported(const bool isSupported)
223 mGlExtensionSupportedCacheList.MarkSupported(GlExtensionCache::GlExtensionCheckerType::BLEND_EQUATION_ADVANCED, isSupported);
226 bool IsAdvancedBlendEquationSupported()
228 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
230 const auto type = GlExtensionCache::GlExtensionCheckerType::BLEND_EQUATION_ADVANCED;
231 if(!mIsContextCreated && !mGlExtensionSupportedCacheList.IsCached(type))
233 mContextCreatedWaitCondition.Wait(lock);
235 return mGlExtensionSupportedCacheList.IsSupported(type);
238 void SetIsMultisampledRenderToTextureSupported(const bool isSupported)
240 mGlExtensionSupportedCacheList.MarkSupported(GlExtensionCache::GlExtensionCheckerType::MULTISAMPLED_RENDER_TO_TEXTURE, isSupported);
243 bool IsMultisampledRenderToTextureSupported()
245 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
247 const auto type = GlExtensionCache::GlExtensionCheckerType::MULTISAMPLED_RENDER_TO_TEXTURE;
248 if(!mIsContextCreated && !mGlExtensionSupportedCacheList.IsCached(type))
250 mContextCreatedWaitCondition.Wait(lock);
252 return mGlExtensionSupportedCacheList.IsSupported(type);
255 bool IsBlendEquationSupported(DevelBlendEquation::Type blendEquation)
257 switch(blendEquation)
259 case DevelBlendEquation::ADD:
260 case DevelBlendEquation::SUBTRACT:
261 case DevelBlendEquation::REVERSE_SUBTRACT:
265 case DevelBlendEquation::MIN:
266 case DevelBlendEquation::MAX:
268 return (GetGlesVersion() >= 30);
270 case DevelBlendEquation::MULTIPLY:
271 case DevelBlendEquation::SCREEN:
272 case DevelBlendEquation::OVERLAY:
273 case DevelBlendEquation::DARKEN:
274 case DevelBlendEquation::LIGHTEN:
275 case DevelBlendEquation::COLOR_DODGE:
276 case DevelBlendEquation::COLOR_BURN:
277 case DevelBlendEquation::HARD_LIGHT:
278 case DevelBlendEquation::SOFT_LIGHT:
279 case DevelBlendEquation::DIFFERENCE:
280 case DevelBlendEquation::EXCLUSION:
281 case DevelBlendEquation::HUE:
282 case DevelBlendEquation::SATURATION:
283 case DevelBlendEquation::COLOR:
284 case DevelBlendEquation::LUMINOSITY:
286 return IsAdvancedBlendEquationSupported();
298 std::string GetShaderVersionPrefix()
300 if(mShaderVersionPrefix == "")
302 mShaderVersionPrefix = "#version " + std::to_string(GetShadingLanguageVersion());
303 if(GetShadingLanguageVersion() < 300)
305 mShaderVersionPrefix += "\n";
309 mShaderVersionPrefix += " es\n";
312 return mShaderVersionPrefix;
315 std::string GetVertexShaderPrefix()
317 if(mVertexShaderPrefix == "")
319 mVertexShaderPrefix = GetShaderVersionPrefix();
321 if(GetShadingLanguageVersion() < 300)
323 mVertexShaderPrefix += "#define INPUT attribute\n";
324 mVertexShaderPrefix += "#define OUTPUT varying\n";
328 mVertexShaderPrefix += "#define INPUT in\n";
329 mVertexShaderPrefix += "#define OUTPUT out\n";
332 return mVertexShaderPrefix;
335 std::string GetFragmentShaderPrefix()
337 if(mFragmentShaderPrefix == "")
339 mFragmentShaderPrefix = GetShaderVersionPrefix();
341 if(GetShadingLanguageVersion() < 300)
343 mFragmentShaderPrefix += "#define INPUT varying\n";
344 mFragmentShaderPrefix += "#define OUT_COLOR gl_FragColor\n";
345 mFragmentShaderPrefix += "#define TEXTURE texture2D\n";
349 mFragmentShaderPrefix += "#define INPUT in\n";
350 mFragmentShaderPrefix += "#define OUT_COLOR fragColor\n";
351 mFragmentShaderPrefix += "#define TEXTURE texture\n";
353 if(IsAdvancedBlendEquationSupported())
355 mFragmentShaderPrefix += FRAGMENT_SHADER_ADVANCED_BLEND_EQUATION_PREFIX;
358 mFragmentShaderPrefix += FRAGMENT_SHADER_OUTPUT_COLOR_STRING;
361 return mFragmentShaderPrefix;
364 bool TextureRequiresConverting(const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage) const override
366 bool convert = ((imageGlFormat == GL_RGB) && (textureGlFormat == GL_RGBA));
367 if(mGlesVersion >= 30)
369 // Don't convert manually from RGB to RGBA if GLES >= 3.0 and a sub-image is uploaded.
370 convert = (convert && !isSubImage);
375 int GetMaxTextureSize()
377 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
378 if(!mIsContextCreated)
380 mContextCreatedWaitCondition.Wait(lock);
382 return mMaxTextureSize;
385 int GetMaxCombinedTextureUnits()
387 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
388 if(!mIsContextCreated)
390 mContextCreatedWaitCondition.Wait(lock);
392 return mMaxCombinedTextureUnits;
395 int GetMaxTextureSamples()
397 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
398 if(!mIsContextCreated)
400 mContextCreatedWaitCondition.Wait(lock);
402 return mMaxTextureSamples;
405 int32_t GetGlesVersion()
407 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
408 if(!mIsContextCreated)
410 mContextCreatedWaitCondition.Wait(lock);
415 void SetShadingLanguageVersion(int shadingLanguageVersion)
417 mShadingLanguageVersion = shadingLanguageVersion;
418 mShadingLanguageVersionCached = true;
421 int GetShadingLanguageVersion()
423 ConditionalWait::ScopedLock lock(mContextCreatedWaitCondition);
424 if(!mIsContextCreated && !mShadingLanguageVersionCached)
426 mContextCreatedWaitCondition.Wait(lock);
428 return mShadingLanguageVersion;
431 bool ApplyNativeFragmentShader(std::string& shader, const char* customSamplerType)
433 bool modified = false;
434 std::string versionString = "#version";
435 size_t versionPosition = shader.find(versionString);
436 if(versionPosition != std::string::npos)
438 std::string extensionString;
439 size_t shadingLanguageVersionPosition = shader.find_first_not_of(" \t", versionPosition + versionString.length());
440 if(shadingLanguageVersionPosition != std::string::npos &&
441 shader.substr(shadingLanguageVersionPosition, 3) == LEGACY_SHADING_LANGUAGE_VERSION)
443 extensionString = OES_EGL_IMAGE_EXTERNAL_STRING;
447 extensionString = OES_EGL_IMAGE_EXTERNAL_STRING_ESSL3;
450 if(shader.find(extensionString) == std::string::npos)
453 size_t extensionPosition = shader.find_first_of("\n", versionPosition) + 1;
454 shader.insert(extensionPosition, extensionString);
459 if(shader.find(OES_EGL_IMAGE_EXTERNAL_STRING) == std::string::npos)
462 shader = OES_EGL_IMAGE_EXTERNAL_STRING + shader;
466 if(shader.find(customSamplerType) == std::string::npos)
468 size_t pos = shader.find(DEFAULT_SAMPLER_TYPE);
469 if(pos != std::string::npos)
472 shader.replace(pos, strlen(DEFAULT_SAMPLER_TYPE), customSamplerType);
481 void ActiveTexture(GLenum texture) override
483 glActiveTexture(texture);
486 void AttachShader(GLuint program, GLuint shader) override
488 glAttachShader(program, shader);
491 void BindAttribLocation(GLuint program, GLuint index, const char* name) override
493 glBindAttribLocation(program, index, name);
496 void BindBuffer(GLenum target, GLuint buffer) override
498 glBindBuffer(target, buffer);
501 void BindFramebuffer(GLenum target, GLuint framebuffer) override
503 glBindFramebuffer(target, framebuffer);
506 void BindRenderbuffer(GLenum target, GLuint renderbuffer) override
508 glBindRenderbuffer(target, renderbuffer);
511 void BindTexture(GLenum target, GLuint texture) override
513 glBindTexture(target, texture);
516 void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) override
518 glBlendColor(red, green, blue, alpha);
521 void BlendEquation(GLenum mode) override
523 glBlendEquation(mode);
526 void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) override
528 glBlendEquationSeparate(modeRGB, modeAlpha);
531 void BlendFunc(GLenum sfactor, GLenum dfactor) override
533 glBlendFunc(sfactor, dfactor);
536 void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) override
538 glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
541 void BufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) override
543 glBufferData(target, size, data, usage);
546 void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) override
548 glBufferSubData(target, offset, size, data);
551 GLenum CheckFramebufferStatus(GLenum target) override
553 return glCheckFramebufferStatus(target);
556 void Clear(GLbitfield mask) override
558 uint32_t startTime = 0, endTime = 0;
561 startTime = TimeService::GetMilliSeconds();
568 endTime = TimeService::GetMilliSeconds();
569 if(endTime - startTime > mLogThreshold)
571 DALI_LOG_DEBUG_INFO("glClear takes long time! [%u ms]\n", endTime - startTime);
576 void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) override
578 glClearColor(red, green, blue, alpha);
581 void ClearDepthf(GLclampf depth) override
583 glClearDepthf(depth);
586 void ClearStencil(GLint s) override
591 void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) override
593 glColorMask(red, green, blue, alpha);
596 void CompileShader(GLuint shader) override
598 glCompileShader(shader);
601 void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) override
603 glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
606 void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) override
608 glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
611 void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) override
613 glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
616 void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) override
618 glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
621 GLuint CreateProgram(void) override
623 return glCreateProgram();
626 GLuint CreateShader(GLenum type) override
628 return glCreateShader(type);
631 void CullFace(GLenum mode) override
636 void DeleteBuffers(GLsizei n, const GLuint* buffers) override
638 glDeleteBuffers(n, buffers);
641 void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override
643 glDeleteFramebuffers(n, framebuffers);
646 void DeleteProgram(GLuint program) override
648 glDeleteProgram(program);
651 void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) override
653 glDeleteRenderbuffers(n, renderbuffers);
656 void DeleteShader(GLuint shader) override
658 glDeleteShader(shader);
661 void DeleteTextures(GLsizei n, const GLuint* textures) override
663 glDeleteTextures(n, textures);
666 void DepthFunc(GLenum func) override
671 void DepthMask(GLboolean flag) override
676 void DepthRangef(GLclampf zNear, GLclampf zFar) override
678 glDepthRangef(zNear, zFar);
681 void DetachShader(GLuint program, GLuint shader) override
683 glDetachShader(program, shader);
686 void Disable(GLenum cap) override
691 void DisableVertexAttribArray(GLuint index) override
693 glDisableVertexAttribArray(index);
696 void DrawArrays(GLenum mode, GLint first, GLsizei count) override
698 glDrawArrays(mode, first, count);
701 void DrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) override
703 glDrawElements(mode, count, type, indices);
706 void Enable(GLenum cap) override
711 void EnableVertexAttribArray(GLuint index) override
713 glEnableVertexAttribArray(index);
716 void Finish(void) override
721 void Flush(void) override
726 void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) override
728 glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
731 void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) override
733 glFramebufferTexture2D(target, attachment, textarget, texture, level);
736 void FrontFace(GLenum mode) override
741 void GenBuffers(GLsizei n, GLuint* buffers) override
743 glGenBuffers(n, buffers);
746 void GenerateMipmap(GLenum target) override
748 glGenerateMipmap(target);
751 void GenFramebuffers(GLsizei n, GLuint* framebuffers) override
753 glGenFramebuffers(n, framebuffers);
756 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override
758 glGenRenderbuffers(n, renderbuffers);
761 void GenTextures(GLsizei n, GLuint* textures) override
763 glGenTextures(n, textures);
766 void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) override
768 glGetActiveAttrib(program, index, bufsize, length, size, type, name);
771 void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) override
773 glGetActiveUniform(program, index, bufsize, length, size, type, name);
776 void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) override
778 glGetAttachedShaders(program, maxcount, count, shaders);
781 int GetAttribLocation(GLuint program, const char* name) override
783 return glGetAttribLocation(program, name);
786 void GetBooleanv(GLenum pname, GLboolean* params) override
788 glGetBooleanv(pname, params);
791 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) override
793 glGetBufferParameteriv(target, pname, params);
796 GLenum GetError(void) override
801 void GetFloatv(GLenum pname, GLfloat* params) override
803 glGetFloatv(pname, params);
806 void GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) override
808 glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
811 void GetIntegerv(GLenum pname, GLint* params) override
813 glGetIntegerv(pname, params);
816 void GetProgramiv(GLuint program, GLenum pname, GLint* params) override
818 glGetProgramiv(program, pname, params);
821 void GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) override
823 glGetProgramInfoLog(program, bufsize, length, infolog);
826 void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) override
828 glGetRenderbufferParameteriv(target, pname, params);
831 void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override
833 glGetShaderiv(shader, pname, params);
836 void GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) override
838 glGetShaderInfoLog(shader, bufsize, length, infolog);
841 void GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) override
843 glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
846 void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) override
848 glGetShaderSource(shader, bufsize, length, source);
851 const GLubyte* GetString(GLenum name) override
853 return glGetString(name);
856 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) override
858 glGetTexParameterfv(target, pname, params);
861 void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) override
863 glGetTexParameteriv(target, pname, params);
866 void GetUniformfv(GLuint program, GLint location, GLfloat* params) override
868 glGetUniformfv(program, location, params);
871 void GetUniformiv(GLuint program, GLint location, GLint* params) override
873 glGetUniformiv(program, location, params);
876 int GetUniformLocation(GLuint program, const char* name) override
878 return glGetUniformLocation(program, name);
881 void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) override
883 glGetVertexAttribfv(index, pname, params);
886 void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) override
888 glGetVertexAttribiv(index, pname, params);
891 void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) override
893 glGetVertexAttribPointerv(index, pname, pointer);
896 void Hint(GLenum target, GLenum mode) override
898 glHint(target, mode);
901 GLboolean IsBuffer(GLuint buffer) override
903 return glIsBuffer(buffer);
906 GLboolean IsEnabled(GLenum cap) override
908 return glIsEnabled(cap);
911 GLboolean IsFramebuffer(GLuint framebuffer) override
913 return glIsFramebuffer(framebuffer);
916 GLboolean IsProgram(GLuint program) override
918 return glIsProgram(program);
921 GLboolean IsRenderbuffer(GLuint renderbuffer) override
923 return glIsRenderbuffer(renderbuffer);
926 GLboolean IsShader(GLuint shader) override
928 return glIsShader(shader);
931 GLboolean IsTexture(GLuint texture) override
933 return glIsTexture(texture);
936 void LineWidth(GLfloat width) override
941 void LinkProgram(GLuint program) override
943 glLinkProgram(program);
946 void PixelStorei(GLenum pname, GLint param) override
948 glPixelStorei(pname, param);
951 void PolygonOffset(GLfloat factor, GLfloat units) override
953 glPolygonOffset(factor, units);
956 void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) override
958 glReadPixels(x, y, width, height, format, type, pixels);
961 void ReleaseShaderCompiler(void) override
963 glReleaseShaderCompiler();
966 void RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) override
968 glRenderbufferStorage(target, internalformat, width, height);
971 void SampleCoverage(GLclampf value, GLboolean invert) override
973 glSampleCoverage(value, invert);
976 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override
978 glScissor(x, y, width, height);
981 void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) override
983 glShaderBinary(n, shaders, binaryformat, binary, length);
986 void ShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) override
988 glShaderSource(shader, count, string, length);
991 void StencilFunc(GLenum func, GLint ref, GLuint mask) override
993 glStencilFunc(func, ref, mask);
996 void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) override
998 glStencilFuncSeparate(face, func, ref, mask);
1001 void StencilMask(GLuint mask) override
1003 glStencilMask(mask);
1006 void StencilMaskSeparate(GLenum face, GLuint mask) override
1008 glStencilMaskSeparate(face, mask);
1011 void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) override
1013 glStencilOp(fail, zfail, zpass);
1016 void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) override
1018 glStencilOpSeparate(face, fail, zfail, zpass);
1021 void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) override
1023 glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
1026 void TexParameterf(GLenum target, GLenum pname, GLfloat param) override
1028 glTexParameterf(target, pname, param);
1031 void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params) override
1033 glTexParameterfv(target, pname, params);
1036 void TexParameteri(GLenum target, GLenum pname, GLint param) override
1038 glTexParameteri(target, pname, param);
1041 void TexParameteriv(GLenum target, GLenum pname, const GLint* params) override
1043 glTexParameteriv(target, pname, params);
1046 void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) override
1048 glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
1051 void Uniform1f(GLint location, GLfloat x) override
1053 glUniform1f(location, x);
1056 void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) override
1058 glUniform1fv(location, count, v);
1061 void Uniform1i(GLint location, GLint x) override
1063 glUniform1i(location, x);
1066 void Uniform1iv(GLint location, GLsizei count, const GLint* v) override
1068 glUniform1iv(location, count, v);
1071 void Uniform2f(GLint location, GLfloat x, GLfloat y) override
1073 glUniform2f(location, x, y);
1076 void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) override
1078 glUniform2fv(location, count, v);
1081 void Uniform2i(GLint location, GLint x, GLint y) override
1083 glUniform2i(location, x, y);
1086 void Uniform2iv(GLint location, GLsizei count, const GLint* v) override
1088 glUniform2iv(location, count, v);
1091 void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) override
1093 glUniform3f(location, x, y, z);
1096 void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) override
1098 glUniform3fv(location, count, v);
1101 void Uniform3i(GLint location, GLint x, GLint y, GLint z) override
1103 glUniform3i(location, x, y, z);
1106 void Uniform3iv(GLint location, GLsizei count, const GLint* v) override
1108 glUniform3iv(location, count, v);
1111 void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) override
1113 glUniform4f(location, x, y, z, w);
1116 void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) override
1118 glUniform4fv(location, count, v);
1121 void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) override
1123 glUniform4i(location, x, y, z, w);
1126 void Uniform4iv(GLint location, GLsizei count, const GLint* v) override
1128 glUniform4iv(location, count, v);
1131 void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1133 glUniformMatrix2fv(location, count, transpose, value);
1136 void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1138 glUniformMatrix3fv(location, count, transpose, value);
1141 void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1143 glUniformMatrix4fv(location, count, transpose, value);
1146 void UseProgram(GLuint program) override
1148 glUseProgram(program);
1151 void ValidateProgram(GLuint program) override
1153 glValidateProgram(program);
1156 void VertexAttrib1f(GLuint indx, GLfloat x) override
1158 glVertexAttrib1f(indx, x);
1161 void VertexAttrib1fv(GLuint indx, const GLfloat* values) override
1163 glVertexAttrib1fv(indx, values);
1166 void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) override
1168 glVertexAttrib2f(indx, x, y);
1171 void VertexAttrib2fv(GLuint indx, const GLfloat* values) override
1173 glVertexAttrib2fv(indx, values);
1176 void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) override
1178 glVertexAttrib3f(indx, x, y, z);
1181 void VertexAttrib3fv(GLuint indx, const GLfloat* values) override
1183 glVertexAttrib3fv(indx, values);
1186 void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) override
1188 glVertexAttrib4f(indx, x, y, z, w);
1191 void VertexAttrib4fv(GLuint indx, const GLfloat* values) override
1193 glVertexAttrib4fv(indx, values);
1196 void VertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) override
1198 glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
1201 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override
1203 glViewport(x, y, width, height);
1208 void ReadBuffer(GLenum mode) override
1210 mImpl->ReadBuffer(mode);
1213 void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) override
1215 mImpl->DrawRangeElements(mode, start, end, count, type, indices);
1218 void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) override
1220 mImpl->TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
1223 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) override
1225 mImpl->TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
1228 void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) override
1230 mImpl->CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
1233 void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) override
1235 mImpl->CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
1238 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) override
1240 mImpl->CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
1243 void GenQueries(GLsizei n, GLuint* ids) override
1245 mImpl->GenQueries(n, ids);
1248 void DeleteQueries(GLsizei n, const GLuint* ids) override
1250 mImpl->DeleteQueries(n, ids);
1253 GLboolean IsQuery(GLuint id) override
1255 return mImpl->IsQuery(id);
1258 void BeginQuery(GLenum target, GLuint id) override
1260 mImpl->BeginQuery(target, id);
1263 void EndQuery(GLenum target) override
1265 mImpl->EndQuery(target);
1268 void GetQueryiv(GLenum target, GLenum pname, GLint* params) override
1270 mImpl->GetQueryiv(target, pname, params);
1273 void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) override
1275 mImpl->GetQueryObjectuiv(id, pname, params);
1278 GLboolean UnmapBuffer(GLenum target) override
1280 return mImpl->UnmapBuffer(target);
1283 void GetBufferPointerv(GLenum target, GLenum pname, GLvoid** params) override
1285 mImpl->GetBufferPointerv(target, pname, params);
1288 void DrawBuffers(GLsizei n, const GLenum* bufs) override
1290 mImpl->DrawBuffers(n, bufs);
1293 void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1295 mImpl->UniformMatrix2x3fv(location, count, transpose, value);
1298 void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1300 mImpl->UniformMatrix3x2fv(location, count, transpose, value);
1303 void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1305 mImpl->UniformMatrix2x4fv(location, count, transpose, value);
1308 void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1310 mImpl->UniformMatrix4x2fv(location, count, transpose, value);
1313 void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1315 mImpl->UniformMatrix3x4fv(location, count, transpose, value);
1318 void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
1320 mImpl->UniformMatrix4x3fv(location, count, transpose, value);
1323 void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) override
1325 mImpl->BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1328 void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) override
1330 mImpl->RenderbufferStorageMultisample(target, samples, internalformat, width, height);
1333 void FramebufferTexture2DMultisample(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) override
1335 mImpl->FramebufferTexture2DMultisample(target, attachment, textarget, texture, level, samples);
1338 void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) override
1340 mImpl->FramebufferTextureLayer(target, attachment, texture, level, layer);
1343 GLvoid* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) override
1345 return mImpl->MapBufferRange(target, offset, length, access);
1348 void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) override
1350 mImpl->FlushMappedBufferRange(target, offset, length);
1353 void BindVertexArray(GLuint array) override
1355 mImpl->BindVertexArray(array);
1358 void DeleteVertexArrays(GLsizei n, const GLuint* arrays) override
1360 mImpl->DeleteVertexArrays(n, arrays);
1363 void GenVertexArrays(GLsizei n, GLuint* arrays) override
1365 mImpl->GenVertexArrays(n, arrays);
1368 GLboolean IsVertexArray(GLuint array) override
1370 return mImpl->IsVertexArray(array);
1373 void GetIntegeri_v(GLenum target, GLuint index, GLint* data) override
1375 mImpl->GetIntegeri_v(target, index, data);
1378 void BeginTransformFeedback(GLenum primitiveMode) override
1380 mImpl->BeginTransformFeedback(primitiveMode);
1383 void EndTransformFeedback(void) override
1385 mImpl->EndTransformFeedback();
1388 void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) override
1390 mImpl->BindBufferRange(target, index, buffer, offset, size);
1393 void BindBufferBase(GLenum target, GLuint index, GLuint buffer) override
1395 mImpl->BindBufferBase(target, index, buffer);
1398 void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) override
1400 mImpl->TransformFeedbackVaryings(program, count, varyings, bufferMode);
1403 void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) override
1405 mImpl->GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
1408 void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) override
1410 mImpl->VertexAttribIPointer(index, size, type, stride, pointer);
1413 void GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) override
1415 mImpl->GetVertexAttribIiv(index, pname, params);
1418 void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) override
1420 mImpl->GetVertexAttribIuiv(index, pname, params);
1423 void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) override
1425 mImpl->VertexAttribI4i(index, x, y, z, w);
1428 void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) override
1430 mImpl->VertexAttribI4ui(index, x, y, z, w);
1433 void VertexAttribI4iv(GLuint index, const GLint* v) override
1435 mImpl->VertexAttribI4iv(index, v);
1438 void VertexAttribI4uiv(GLuint index, const GLuint* v) override
1440 mImpl->VertexAttribI4uiv(index, v);
1443 void GetUniformuiv(GLuint program, GLint location, GLuint* params) override
1445 mImpl->GetUniformuiv(program, location, params);
1448 GLint GetFragDataLocation(GLuint program, const GLchar* name) override
1450 return mImpl->GetFragDataLocation(program, name);
1453 void Uniform1ui(GLint location, GLuint v0) override
1455 mImpl->Uniform1ui(location, v0);
1458 void Uniform2ui(GLint location, GLuint v0, GLuint v1) override
1460 mImpl->Uniform2ui(location, v0, v1);
1463 void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) override
1465 mImpl->Uniform3ui(location, v0, v1, v2);
1468 void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) override
1470 mImpl->Uniform4ui(location, v0, v1, v2, v3);
1473 void Uniform1uiv(GLint location, GLsizei count, const GLuint* value) override
1475 mImpl->Uniform1uiv(location, count, value);
1478 void Uniform2uiv(GLint location, GLsizei count, const GLuint* value) override
1480 mImpl->Uniform2uiv(location, count, value);
1483 void Uniform3uiv(GLint location, GLsizei count, const GLuint* value) override
1485 mImpl->Uniform3uiv(location, count, value);
1488 void Uniform4uiv(GLint location, GLsizei count, const GLuint* value) override
1490 mImpl->Uniform4uiv(location, count, value);
1493 void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) override
1495 mImpl->ClearBufferiv(buffer, drawbuffer, value);
1498 void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) override
1500 mImpl->ClearBufferuiv(buffer, drawbuffer, value);
1503 void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) override
1505 mImpl->ClearBufferfv(buffer, drawbuffer, value);
1508 void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) override
1510 mImpl->ClearBufferfi(buffer, drawbuffer, depth, stencil);
1513 const GLubyte* GetStringi(GLenum name, GLuint index) override
1515 return mImpl->GetStringi(name, index);
1518 void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) override
1520 mImpl->CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
1523 void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) override
1525 mImpl->GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
1528 void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) override
1530 mImpl->GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
1533 GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) override
1535 return mImpl->GetUniformBlockIndex(program, uniformBlockName);
1538 void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) override
1540 mImpl->GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
1543 void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) override
1545 mImpl->GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
1548 void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) override
1550 mImpl->UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
1553 void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) override
1555 mImpl->DrawArraysInstanced(mode, first, count, instanceCount);
1558 void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) override
1560 mImpl->DrawElementsInstanced(mode, count, type, indices, instanceCount);
1563 GLsync FenceSync(GLenum condition, GLbitfield flags) override
1565 return mImpl->FenceSync(condition, flags);
1568 GLboolean IsSync(GLsync sync) override
1570 return mImpl->IsSync(sync);
1573 void DeleteSync(GLsync sync) override
1575 mImpl->DeleteSync(sync);
1578 GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) override
1580 return mImpl->ClientWaitSync(sync, flags, timeout);
1583 void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) override
1585 mImpl->WaitSync(sync, flags, timeout);
1588 void GetInteger64v(GLenum pname, GLint64* params) override
1590 mImpl->GetInteger64v(pname, params);
1593 void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) override
1595 mImpl->GetSynciv(sync, pname, bufSize, length, values);
1598 void GetInteger64i_v(GLenum target, GLuint index, GLint64* data) override
1600 mImpl->GetInteger64i_v(target, index, data);
1603 void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) override
1605 mImpl->GetBufferParameteri64v(target, pname, params);
1608 void GenSamplers(GLsizei count, GLuint* samplers) override
1610 mImpl->GenSamplers(count, samplers);
1613 void DeleteSamplers(GLsizei count, const GLuint* samplers) override
1615 mImpl->DeleteSamplers(count, samplers);
1618 GLboolean IsSampler(GLuint sampler) override
1620 return mImpl->IsSampler(sampler);
1623 void BindSampler(GLuint unit, GLuint sampler) override
1625 mImpl->BindSampler(unit, sampler);
1628 void SamplerParameteri(GLuint sampler, GLenum pname, GLint param) override
1630 mImpl->SamplerParameteri(sampler, pname, param);
1633 void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) override
1635 mImpl->SamplerParameteriv(sampler, pname, param);
1638 void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) override
1640 mImpl->SamplerParameterf(sampler, pname, param);
1643 void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) override
1645 mImpl->SamplerParameterfv(sampler, pname, param);
1648 void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) override
1650 mImpl->GetSamplerParameteriv(sampler, pname, params);
1653 void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) override
1655 mImpl->GetSamplerParameterfv(sampler, pname, params);
1658 void VertexAttribDivisor(GLuint index, GLuint divisor) override
1660 mImpl->VertexAttribDivisor(index, divisor);
1663 void BindTransformFeedback(GLenum target, GLuint id) override
1665 mImpl->BindTransformFeedback(target, id);
1668 void DeleteTransformFeedbacks(GLsizei n, const GLuint* ids) override
1670 mImpl->DeleteTransformFeedbacks(n, ids);
1673 void GenTransformFeedbacks(GLsizei n, GLuint* ids) override
1675 mImpl->GenTransformFeedbacks(n, ids);
1678 GLboolean IsTransformFeedback(GLuint id) override
1680 return mImpl->IsTransformFeedback(id);
1683 void PauseTransformFeedback(void) override
1685 mImpl->PauseTransformFeedback();
1688 void ResumeTransformFeedback(void) override
1690 mImpl->ResumeTransformFeedback();
1693 void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) override
1695 mImpl->GetProgramBinary(program, bufSize, length, binaryFormat, binary);
1698 void ProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) override
1700 mImpl->ProgramBinary(program, binaryFormat, binary, length);
1703 void ProgramParameteri(GLuint program, GLenum pname, GLint value) override
1705 mImpl->ProgramParameteri(program, pname, value);
1708 void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) override
1710 mImpl->InvalidateFramebuffer(target, numAttachments, attachments);
1713 void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) override
1715 mImpl->InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
1718 void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) override
1720 mImpl->TexStorage2D(target, levels, internalformat, width, height);
1723 void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) override
1725 mImpl->TexStorage3D(target, levels, internalformat, width, height, depth);
1728 void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) override
1730 mImpl->GetInternalformativ(target, internalformat, pname, bufSize, params);
1733 void BlendBarrier(void)
1735 if(mGlExtensionSupportedCacheList.IsSupported(GlExtensionCache::GlExtensionCheckerType::BLEND_EQUATION_ADVANCED))
1737 mImpl->BlendBarrier();
1742 std::unique_ptr<GlesAbstraction> mImpl;
1744 GlExtensionCache::GlExtensionSupportedCacheList mGlExtensionSupportedCacheList;
1746 ConditionalWait mContextCreatedWaitCondition;
1747 GLint mMaxTextureSize;
1748 GLint mMaxCombinedTextureUnits;
1749 GLint mMaxTextureSamples;
1750 std::string mShaderVersionPrefix;
1751 std::string mVertexShaderPrefix;
1752 std::string mFragmentShaderPrefix;
1753 int32_t mGlesVersion;
1754 int32_t mShadingLanguageVersion;
1755 uint32_t mLogThreshold{0};
1756 bool mShadingLanguageVersionCached;
1757 bool mIsSurfacelessContextSupported;
1758 bool mIsContextCreated;
1759 bool mLogEnabled{false};
1762 } // namespace Adaptor
1764 } // namespace Internal
1768 #endif // DALI_INTERNAL_GL_IMPLEMENTATION_H