1 #ifndef __TEST_GL_ABSTRACTION_H__
2 #define __TEST_GL_ABSTRACTION_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 #include <cstdio> // fprintf
25 #include <cstring> // for strcpy, strncpy
29 #include <dali/public-api/dali-core.h>
30 #include <dali/integration-api/core.h>
31 #include <dali/integration-api/gl-abstraction.h>
32 #include <dali/integration-api/gl-defines.h>
33 #include "test-trace-call-stack.h"
38 static const unsigned int MAX_ATTRIBUTE_CACHE_SIZE = 64;
39 static const char *mStdAttribs[MAX_ATTRIBUTE_CACHE_SIZE] =
41 "aPosition", // ATTRIB_POSITION
42 "aNormal", // ATTRIB_NORMAL
43 "aTexCoord", // ATTRIB_TEXCOORD
44 "aColor", // ATTRIB_COLOR
45 "aBoneWeights", // ATTRIB_BONE_WEIGHTS
46 "aBoneIndices" // ATTRIB_BONE_INDICES
49 class DALI_IMPORT_API TestGlAbstraction: public Dali::Integration::GlAbstraction
57 void PostRender(unsigned int timeDelta);
61 inline void ActiveTexture( GLenum textureUnit )
63 mActiveTextureUnit = textureUnit - GL_TEXTURE0;
66 inline GLenum GetActiveTextureUnit() const
68 return mActiveTextureUnit + GL_TEXTURE0;
71 inline void AttachShader( GLuint program, GLuint shader )
73 std::stringstream out;
74 out << program << ", " << shader;
75 mShaderTrace.PushCall("AttachShader", out.str());
78 inline void BindAttribLocation( GLuint program, GLuint index, const char* name )
82 inline void BindBuffer( GLenum target, GLuint buffer )
86 inline void BindFramebuffer( GLenum target, GLuint framebuffer )
90 inline void BindRenderbuffer( GLenum target, GLuint renderbuffer )
95 * This method can be used by test cases, to query the texture IDs that have been bound by BindTexture.
96 * @return A vector containing the IDs that were bound.
98 inline const std::vector<GLuint>& GetBoundTextures() const
100 return mBoundTextures;
104 * Query the texture IDs that have been bound with BindTexture, with a specific active texture unit.
105 * @param[in] activeTextureUnit The specific active texture unit.
106 * @return A vector containing the IDs that were bound.
108 inline const std::vector<GLuint>& GetBoundTextures( GLuint activeTextureUnit ) const
110 return mActiveTextures[ activeTextureUnit - GL_TEXTURE0 ].mBoundTextures;
114 * This method can be used by test cases, to clear the record of texture IDs that have been bound by BindTexture.
116 inline void ClearBoundTextures()
118 mBoundTextures.clear();
120 for( unsigned int i=0; i<MIN_TEXTURE_UNIT_LIMIT; ++i )
122 mActiveTextures[ i ].mBoundTextures.clear();
126 inline void BindTexture( GLenum target, GLuint texture )
128 // Record the bound textures for future checks
131 mBoundTextures.push_back( texture );
133 if( mActiveTextureUnit < MIN_TEXTURE_UNIT_LIMIT )
135 mActiveTextures[ mActiveTextureUnit ].mBoundTextures.push_back( texture );
139 std::stringstream out;
140 out << target << ", " << texture;
141 mTextureTrace.PushCall("BindTexture", out.str());
144 inline void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
146 mLastBlendColor.r = red;
147 mLastBlendColor.g = green;
148 mLastBlendColor.b = blue;
149 mLastBlendColor.a = alpha;
152 inline const Vector4& GetLastBlendColor() const
154 return mLastBlendColor;
157 inline void BlendEquation( GLenum mode )
159 mLastBlendEquationRgb = mode;
160 mLastBlendEquationAlpha = mode;
163 inline void BlendEquationSeparate( GLenum modeRgb, GLenum modeAlpha )
165 mLastBlendEquationRgb = modeRgb;
166 mLastBlendEquationAlpha = modeAlpha;
169 inline GLenum GetLastBlendEquationRgb() const
171 return mLastBlendEquationRgb;
174 inline GLenum GetLastBlendEquationAlpha() const
176 return mLastBlendEquationAlpha;
179 inline void BlendFunc(GLenum sfactor, GLenum dfactor)
181 mLastBlendFuncSrcRgb = sfactor;
182 mLastBlendFuncDstRgb = dfactor;
183 mLastBlendFuncSrcAlpha = sfactor;
184 mLastBlendFuncDstAlpha = dfactor;
187 inline void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
189 mLastBlendFuncSrcRgb = srcRGB;
190 mLastBlendFuncDstRgb = dstRGB;
191 mLastBlendFuncSrcAlpha = srcAlpha;
192 mLastBlendFuncDstAlpha = dstAlpha;
195 inline GLenum GetLastBlendFuncSrcRgb() const
197 return mLastBlendFuncSrcRgb;
200 inline GLenum GetLastBlendFuncDstRgb() const
202 return mLastBlendFuncDstRgb;
205 inline GLenum GetLastBlendFuncSrcAlpha() const
207 return mLastBlendFuncSrcAlpha;
210 inline GLenum GetLastBlendFuncDstAlpha() const
212 return mLastBlendFuncDstAlpha;
215 inline void BufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage)
219 inline void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
223 inline GLenum CheckFramebufferStatus(GLenum target)
225 return mCheckFramebufferStatusResult;
228 inline void Clear(GLbitfield mask)
232 inline void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
236 inline void ClearDepthf(GLclampf depth)
240 inline void ClearStencil(GLint s)
244 inline void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
248 inline void CompileShader(GLuint shader)
250 std::stringstream out;
252 mShaderTrace.PushCall("CompileShader", out.str());
255 inline void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
259 inline void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
263 inline void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
267 inline void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
271 inline GLuint CreateProgram(void)
273 mShaderTrace.PushCall("CreateProgram", "");
275 ++mLastProgramIdUsed;
276 mUniforms[mLastProgramIdUsed] = UniformIDMap();
277 return mLastProgramIdUsed;
280 inline GLuint CreateShader(GLenum type)
282 std::stringstream out;
284 mShaderTrace.PushCall("CreateShader", out.str());
286 return ++mLastShaderIdUsed;
289 inline void CullFace(GLenum mode)
291 std::stringstream out;
293 mCullFaceTrace.PushCall("CullFace", out.str());
296 inline void DeleteBuffers(GLsizei n, const GLuint* buffers)
300 inline void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
304 inline void DeleteProgram(GLuint program)
306 std::stringstream out;
308 mShaderTrace.PushCall("DeleteProgram", out.str());
311 inline void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
315 inline void DeleteShader(GLuint shader)
317 std::stringstream out;
319 mShaderTrace.PushCall("DeleteShader", out.str());
322 inline void DeleteTextures(GLsizei n, const GLuint* textures)
324 std::stringstream out;
325 out << n << ", " << textures << " = [" ;
327 for(GLsizei i=0; i<n; i++)
329 out << textures[i] << ", " ;
330 mDeletedTextureIds.push_back(textures[i]);
333 mTextureTrace.PushCall("DeleteTextures", out.str());
336 inline bool CheckNoTexturesDeleted()
338 return mDeletedTextureIds.size() == 0;
341 inline bool CheckTextureDeleted( GLuint textureId )
345 for(std::vector<GLuint>::iterator iter=mDeletedTextureIds.begin(); iter != mDeletedTextureIds.end(); ++iter)
347 if(*iter == textureId)
356 inline void ClearDeletedTextures()
358 mDeletedTextureIds.clear();
361 inline void DepthFunc(GLenum func)
365 inline void DepthMask(GLboolean flag)
369 inline void DepthRangef(GLclampf zNear, GLclampf zFar)
373 inline void DetachShader(GLuint program, GLuint shader)
375 std::stringstream out;
376 out << program << ", " << shader;
377 mShaderTrace.PushCall("DetachShader", out.str());
380 inline void Disable(GLenum cap)
382 std::stringstream out;
384 mCullFaceTrace.PushCall("Disable", out.str());
387 inline void DisableVertexAttribArray(GLuint index)
389 SetVertexAttribArray( index, false );
392 inline void DrawArrays(GLenum mode, GLint first, GLsizei count)
394 std::stringstream out;
395 out << mode << ", " << first << ", " << count;
396 mDrawTrace.PushCall("DrawArrays", out.str());
399 inline void DrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices)
401 std::stringstream out;
402 out << mode << ", " << count << ", " << type << ", indices";
403 mDrawTrace.PushCall("DrawElements", out.str());
406 inline void Enable(GLenum cap)
408 std::stringstream out;
410 mCullFaceTrace.PushCall("Enable", out.str());
413 inline void EnableVertexAttribArray(GLuint index)
415 SetVertexAttribArray( index, true);
418 inline void Finish(void)
422 inline void Flush(void)
426 inline void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
430 inline void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
434 inline void FrontFace(GLenum mode)
438 inline void GenBuffers(GLsizei n, GLuint* buffers)
440 // avoids an assert in GpuBuffers
444 inline void GenerateMipmap(GLenum target)
448 inline void GenFramebuffers(GLsizei n, GLuint* framebuffers)
452 inline void GenRenderbuffers(GLsizei n, GLuint* renderbuffers)
457 * This method can be used by test cases, to manipulate the texture IDs generated by GenTextures.
458 * @param[in] ids A vector containing the next IDs to be generated
460 inline void SetNextTextureIds( const std::vector<GLuint>& ids )
462 mNextTextureIds = ids;
465 inline const std::vector<GLuint>& GetNextTextureIds()
467 return mNextTextureIds;
470 inline void GenTextures(GLsizei n, GLuint* textures)
472 for( int i=0; i<n; ++i )
474 if( !mNextTextureIds.empty() )
476 *(textures+i) = mNextTextureIds[0];
477 mNextTextureIds.erase( mNextTextureIds.begin() );
481 *(textures+i) = ++mLastAutoTextureIdUsed;
485 std::stringstream out;
486 for(int i=0; i<n; i++)
494 mTextureTrace.PushCall("GenTexture", out.str());
497 inline void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
501 inline void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
505 inline void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
509 inline int GetAttribLocation(GLuint program, const char* name)
511 std::string attribName(name);
513 for( unsigned int i = 0; i < ATTRIB_TYPE_LAST; ++i )
515 if( mStdAttribs[i] == attribName )
521 // 0 is a valid location
525 inline void GetBooleanv(GLenum pname, GLboolean* params)
529 inline void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
533 inline GLenum GetError(void)
535 return mGetErrorResult;
538 inline void GetFloatv(GLenum pname, GLfloat* params)
542 inline void GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
546 inline void GetIntegerv(GLenum pname, GLint* params)
550 case GL_MAX_TEXTURE_SIZE:
553 case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
556 case GL_NUM_PROGRAM_BINARY_FORMATS_OES:
557 *params = mNumBinaryFormats;
559 case GL_PROGRAM_BINARY_FORMATS_OES:
560 *params = mBinaryFormats;
565 inline void GetProgramiv(GLuint program, GLenum pname, GLint* params)
569 *params = mLinkStatus;
571 case GL_PROGRAM_BINARY_LENGTH_OES:
572 *params = mProgramBinaryLength;
577 inline void GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
582 inline void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
586 inline void GetShaderiv(GLuint shader, GLenum pname, GLint* params)
589 case GL_COMPILE_STATUS:
590 *params = mCompileStatus;
595 inline void GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
599 inline void GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
603 inline const GLubyte* GetString(GLenum name)
605 return mGetStringResult;
608 inline void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
612 inline void GetTexParameteriv(GLenum target, GLenum pname, GLint* params)
616 inline void GetUniformfv(GLuint program, GLint location, GLfloat* params)
620 inline void GetUniformiv(GLuint program, GLint location, GLint* params)
624 inline GLint GetUniformLocation(GLuint program, const char* name)
626 ProgramUniformMap::iterator it = mUniforms.find(program);
627 if( it == mUniforms.end() )
629 // Not a valid program ID
630 mGetErrorResult = GL_INVALID_OPERATION;
634 UniformIDMap& uniformIDs = it->second;
635 UniformIDMap::iterator it2 = uniformIDs.find( name );
636 if( it2 == uniformIDs.end() )
638 // Uniform not found, so add it...
639 uniformIDs[name] = ++mLastUniformIdUsed;
640 return mLastUniformIdUsed;
646 inline void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
650 inline void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
654 inline void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
658 inline void Hint(GLenum target, GLenum mode)
662 inline GLboolean IsBuffer(GLuint buffer)
664 return mIsBufferResult;
667 inline GLboolean IsEnabled(GLenum cap)
669 return mIsEnabledResult;
672 inline GLboolean IsFramebuffer(GLuint framebuffer)
674 return mIsFramebufferResult;
677 inline GLboolean IsProgram(GLuint program)
679 return mIsProgramResult;
682 inline GLboolean IsRenderbuffer(GLuint renderbuffer)
684 return mIsRenderbufferResult;
687 inline GLboolean IsShader(GLuint shader)
689 return mIsShaderResult;
692 inline GLboolean IsTexture(GLuint texture)
694 return mIsTextureResult;
697 inline void LineWidth(GLfloat width)
701 inline void LinkProgram(GLuint program)
703 std::stringstream out;
705 mShaderTrace.PushCall("LinkProgram", out.str());
708 inline void PixelStorei(GLenum pname, GLint param)
712 inline void PolygonOffset(GLfloat factor, GLfloat units)
716 inline void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
720 inline void ReleaseShaderCompiler(void)
724 inline void RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
728 inline void SampleCoverage(GLclampf value, GLboolean invert)
732 inline void Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
734 mScissorParams.x = x;
735 mScissorParams.y = y;
736 mScissorParams.width = width;
737 mScissorParams.height = height;
740 inline void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
744 inline void ShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
746 std::string stringBuilder;
747 for(int i = 0; i < count; ++i)
749 stringBuilder += string[i];
751 mShaderSources[shader] = stringBuilder;
752 mLastShaderCompiled = shader;
755 inline void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
757 const std::string shaderSource = mShaderSources[shader];
758 if( static_cast<int>(shaderSource.length()) < bufsize )
760 strcpy(source, shaderSource.c_str());
761 *length = shaderSource.length();
765 *length = bufsize -1;
766 strncpy(source, shaderSource.c_str(), *length);
767 source[*length] = 0x0;
771 inline std::string GetShaderSource(GLuint shader)
773 return mShaderSources[shader];
776 inline void StencilFunc(GLenum func, GLint ref, GLuint mask)
780 inline void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
784 inline void StencilMask(GLuint mask)
788 inline void StencilMaskSeparate(GLenum face, GLuint mask)
792 inline void StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
796 inline void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
800 inline void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
802 std::stringstream out;
803 out << width << ", " << height;
804 mTextureTrace.PushCall("TexImage2D", out.str());
807 inline void TexParameterf(GLenum target, GLenum pname, GLfloat param)
809 std::stringstream out;
810 out << target << ", " << pname << ", " << param;
811 mTexParamaterTrace.PushCall("TexParameterf", out.str());
814 inline void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
816 std::stringstream out;
817 out << target << ", " << pname << ", " << params[0];
818 mTexParamaterTrace.PushCall("TexParameterfv", out.str());
821 inline void TexParameteri(GLenum target, GLenum pname, GLint param)
823 std::stringstream out;
824 out << target << ", " << pname << ", " << param;
825 mTexParamaterTrace.PushCall("TexParameteri", out.str());
828 inline void TexParameteriv(GLenum target, GLenum pname, const GLint* params)
830 std::stringstream out;
831 out << target << ", " << pname << ", " << params[0];
832 mTexParamaterTrace.PushCall("TexParameteriv", out.str());
835 inline void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
837 std::stringstream out;
838 out << xoffset << ", " << yoffset << ", " << width << ", " << height;
839 mTextureTrace.PushCall("TexSubImage2D", out.str());
842 inline void Uniform1f(GLint location, GLfloat x)
844 if( ! mProgramUniforms1f.SetUniformValue( mCurrentProgram, location, x ) )
846 mGetErrorResult = GL_INVALID_OPERATION;
850 inline void Uniform1fv(GLint location, GLsizei count, const GLfloat* v)
852 for( int i = 0; i < count; ++i )
854 if( ! mProgramUniforms1f.SetUniformValue( mCurrentProgram, location, v[i] ) )
856 mGetErrorResult = GL_INVALID_OPERATION;
862 inline void Uniform1i(GLint location, GLint x)
864 if( ! mProgramUniforms1i.SetUniformValue( mCurrentProgram, location, x ) )
866 mGetErrorResult = GL_INVALID_OPERATION;
870 inline void Uniform1iv(GLint location, GLsizei count, const GLint* v)
872 for( int i = 0; i < count; ++i )
874 if( ! mProgramUniforms1i.SetUniformValue( mCurrentProgram,
878 mGetErrorResult = GL_INVALID_OPERATION;
884 inline void Uniform2f(GLint location, GLfloat x, GLfloat y)
886 if( ! mProgramUniforms2f.SetUniformValue( mCurrentProgram,
890 mGetErrorResult = GL_INVALID_OPERATION;
894 inline void Uniform2fv(GLint location, GLsizei count, const GLfloat* v)
896 for( int i = 0; i < count; ++i )
898 if( ! mProgramUniforms2f.SetUniformValue( mCurrentProgram,
900 Vector2( v[2*i], v[2*i+1] ) ) )
902 mGetErrorResult = GL_INVALID_OPERATION;
908 inline void Uniform2i(GLint location, GLint x, GLint y)
912 inline void Uniform2iv(GLint location, GLsizei count, const GLint* v)
916 inline void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
918 if( ! mProgramUniforms3f.SetUniformValue( mCurrentProgram,
920 Vector3( x, y, z ) ) )
922 mGetErrorResult = GL_INVALID_OPERATION;
926 inline void Uniform3fv(GLint location, GLsizei count, const GLfloat* v)
928 for( int i = 0; i < count; ++i )
930 if( ! mProgramUniforms3f.SetUniformValue(
933 Vector3( v[3*i], v[3*i+1], v[3*i+2] ) ) )
935 mGetErrorResult = GL_INVALID_OPERATION;
941 inline void Uniform3i(GLint location, GLint x, GLint y, GLint z)
945 inline void Uniform3iv(GLint location, GLsizei count, const GLint* v)
949 inline void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
951 if( ! mProgramUniforms4f.SetUniformValue( mCurrentProgram,
953 Vector4( x, y, z, w ) ) )
955 mGetErrorResult = GL_INVALID_OPERATION;
959 inline void Uniform4fv(GLint location, GLsizei count, const GLfloat* v)
961 for( int i = 0; i < count; ++i )
963 if( ! mProgramUniforms4f.SetUniformValue(
966 Vector4( v[4*i], v[4*i+1], v[4*i+2], v[4*i+3] ) ) )
968 mGetErrorResult = GL_INVALID_OPERATION;
974 inline void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
978 inline void Uniform4iv(GLint location, GLsizei count, const GLint* v)
982 inline void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
986 inline void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
988 for( int i = 0; i < count; ++i )
990 if( ! mProgramUniformsMat3.SetUniformValue(
993 Matrix3( value[0], value[1], value[2], value[3], value[4], value[5], value[6], value[7], value[8] ) ) )
995 mGetErrorResult = GL_INVALID_OPERATION;
1001 inline void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1003 for( int i = 0; i < count; ++i )
1005 if( ! mProgramUniformsMat4.SetUniformValue(
1010 mGetErrorResult = GL_INVALID_OPERATION;
1016 inline void UseProgram(GLuint program)
1018 mCurrentProgram = program;
1021 inline void ValidateProgram(GLuint program)
1025 inline void VertexAttrib1f(GLuint indx, GLfloat x)
1029 inline void VertexAttrib1fv(GLuint indx, const GLfloat* values)
1033 inline void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
1037 inline void VertexAttrib2fv(GLuint indx, const GLfloat* values)
1041 inline void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
1045 inline void VertexAttrib3fv(GLuint indx, const GLfloat* values)
1049 inline void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1053 inline void VertexAttrib4fv(GLuint indx, const GLfloat* values)
1057 inline void VertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
1061 inline void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
1067 inline void ReadBuffer(GLenum mode)
1071 inline void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
1075 inline void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1079 inline 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)
1083 inline void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1087 inline void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
1091 inline 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)
1095 inline void GenQueries(GLsizei n, GLuint* ids)
1099 inline void DeleteQueries(GLsizei n, const GLuint* ids)
1103 inline GLboolean IsQuery(GLuint id)
1108 inline void BeginQuery(GLenum target, GLuint id)
1112 inline void EndQuery(GLenum target)
1116 inline void GetQueryiv(GLenum target, GLenum pname, GLint* params)
1120 inline void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
1124 inline GLboolean UnmapBuffer(GLenum target)
1129 inline void GetBufferPointerv(GLenum target, GLenum pname, GLvoid** params)
1133 inline void DrawBuffers(GLsizei n, const GLenum* bufs)
1137 inline void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1141 inline void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1145 inline void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1149 inline void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1153 inline void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1157 inline void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1161 inline void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
1165 inline void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
1169 inline void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
1173 inline GLvoid* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
1178 inline void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
1182 inline void BindVertexArray(GLuint array)
1186 inline void DeleteVertexArrays(GLsizei n, const GLuint* arrays)
1190 inline void GenVertexArrays(GLsizei n, GLuint* arrays)
1194 inline GLboolean IsVertexArray(GLuint array)
1199 inline void GetIntegeri_v(GLenum target, GLuint index, GLint* data)
1203 inline void BeginTransformFeedback(GLenum primitiveMode)
1207 inline void EndTransformFeedback(void)
1211 inline void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
1215 inline void BindBufferBase(GLenum target, GLuint index, GLuint buffer)
1219 inline void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)
1223 inline void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
1227 inline void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
1231 inline void GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
1235 inline void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
1239 inline void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
1243 inline void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
1247 inline void VertexAttribI4iv(GLuint index, const GLint* v)
1251 inline void VertexAttribI4uiv(GLuint index, const GLuint* v)
1255 inline void GetUniformuiv(GLuint program, GLint location, GLuint* params)
1259 inline GLint GetFragDataLocation(GLuint program, const GLchar *name)
1264 inline void Uniform1ui(GLint location, GLuint v0)
1268 inline void Uniform2ui(GLint location, GLuint v0, GLuint v1)
1272 inline void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
1276 inline void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
1280 inline void Uniform1uiv(GLint location, GLsizei count, const GLuint* value)
1284 inline void Uniform2uiv(GLint location, GLsizei count, const GLuint* value)
1288 inline void Uniform3uiv(GLint location, GLsizei count, const GLuint* value)
1292 inline void Uniform4uiv(GLint location, GLsizei count, const GLuint* value)
1296 inline void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value)
1300 inline void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value)
1304 inline void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value)
1308 inline void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
1312 inline const GLubyte* GetStringi(GLenum name, GLuint index)
1317 inline void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
1321 inline void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)
1325 inline void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
1329 inline GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName)
1331 return GL_INVALID_INDEX;
1334 inline void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
1338 inline void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
1342 inline void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
1346 inline void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
1350 inline void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)
1354 inline GLsync FenceSync(GLenum condition, GLbitfield flags)
1359 inline GLboolean IsSync(GLsync sync)
1364 inline void DeleteSync(GLsync sync)
1368 inline GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1373 inline void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1377 inline void GetInteger64v(GLenum pname, GLint64* params)
1381 inline void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
1385 inline void GetInteger64i_v(GLenum target, GLuint index, GLint64* data)
1389 inline void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
1393 inline void GenSamplers(GLsizei count, GLuint* samplers)
1397 inline void DeleteSamplers(GLsizei count, const GLuint* samplers)
1401 inline GLboolean IsSampler(GLuint sampler)
1406 inline void BindSampler(GLuint unit, GLuint sampler)
1410 inline void SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
1414 inline void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param)
1418 inline void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
1422 inline void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param)
1426 inline void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
1430 inline void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
1434 inline void VertexAttribDivisor(GLuint index, GLuint divisor)
1438 inline void BindTransformFeedback(GLenum target, GLuint id)
1442 inline void DeleteTransformFeedbacks(GLsizei n, const GLuint* ids)
1446 inline void GenTransformFeedbacks(GLsizei n, GLuint* ids)
1450 inline GLboolean IsTransformFeedback(GLuint id)
1455 inline void PauseTransformFeedback(void)
1459 inline void ResumeTransformFeedback(void)
1463 inline void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
1467 inline void ProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)
1471 inline void ProgramParameteri(GLuint program, GLenum pname, GLint value)
1475 inline void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments)
1479 inline void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)
1483 inline void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
1487 inline void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
1491 inline void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
1495 public: // TEST FUNCTIONS
1496 inline void SetCompileStatus( GLuint value ) { mCompileStatus = value; }
1497 inline void SetLinkStatus( GLuint value ) { mLinkStatus = value; }
1498 inline void SetGetAttribLocationResult( int result) { mGetAttribLocationResult = result; }
1499 inline void SetGetErrorResult( GLenum result) { mGetErrorResult = result; }
1500 inline void SetGetStringResult( GLubyte* result) { mGetStringResult = result; }
1501 inline void SetIsBufferResult( GLboolean result) { mIsBufferResult = result; }
1502 inline void SetIsEnabledResult( GLboolean result) { mIsEnabledResult = result; }
1503 inline void SetIsFramebufferResult( GLboolean result) { mIsFramebufferResult = result; }
1504 inline void SetIsProgramResult( GLboolean result) { mIsProgramResult = result; }
1505 inline void SetIsRenderbufferResult( GLboolean result) { mIsRenderbufferResult = result; }
1506 inline void SetIsShaderResult( GLboolean result) { mIsShaderResult = result; }
1507 inline void SetIsTextureResult( GLboolean result) { mIsTextureResult = result; }
1508 inline void SetCheckFramebufferStatusResult( GLenum result) { mCheckFramebufferStatusResult = result; }
1509 inline void SetNumBinaryFormats( GLint numFormats ) { mNumBinaryFormats = numFormats; }
1510 inline void SetBinaryFormats( GLint binaryFormats ) { mBinaryFormats = binaryFormats; }
1511 inline void SetProgramBinaryLength( GLint length ) { mProgramBinaryLength = length; }
1513 inline bool GetVertexAttribArrayState(GLuint index)
1515 if( index >= MAX_ATTRIBUTE_CACHE_SIZE )
1520 return mVertexAttribArrayState[ index ];
1522 inline void ClearVertexAttribArrayChanged() { mVertexAttribArrayChanged = false; }
1523 inline bool GetVertexAttribArrayChanged() { return mVertexAttribArrayChanged; }
1525 //Methods for CullFace verification
1526 inline void EnableCullFaceCallTrace(bool enable) { mCullFaceTrace.Enable(enable); }
1527 inline void ResetCullFaceCallStack() { mCullFaceTrace.Reset(); }
1528 inline TraceCallStack& GetCullFaceTrace() { return mCullFaceTrace; }
1530 //Methods for Shader verification
1531 inline void EnableShaderCallTrace(bool enable) { mShaderTrace.Enable(enable); }
1532 inline void ResetShaderCallStack() { mShaderTrace.Reset(); }
1533 inline TraceCallStack& GetShaderTrace() { return mShaderTrace; }
1535 //Methods for Texture verification
1536 inline void EnableTextureCallTrace(bool enable) { mTextureTrace.Enable(enable); }
1537 inline void ResetTextureCallStack() { mTextureTrace.Reset(); }
1538 inline TraceCallStack& GetTextureTrace() { return mTextureTrace; }
1540 //Methods for Texture verification
1541 inline void EnableTexParameterCallTrace(bool enable) { mTexParamaterTrace.Enable(enable); }
1542 inline void ResetTexParameterCallStack() { mTexParamaterTrace.Reset(); }
1543 inline TraceCallStack& GetTexParameterTrace() { return mTexParamaterTrace; }
1545 //Methods for Draw verification
1546 inline void EnableDrawCallTrace(bool enable) { mDrawTrace.Enable(enable); }
1547 inline void ResetDrawCallStack() { mDrawTrace.Reset(); }
1548 inline TraceCallStack& GetDrawTrace() { return mDrawTrace; }
1550 template <typename T>
1551 inline bool CheckUniformValue( const char* name, const T& value ) const
1553 for( ProgramUniformMap::const_iterator program_it = mUniforms.begin();
1554 program_it != mUniforms.end();
1557 const UniformIDMap &uniformIDs = program_it->second;
1559 UniformIDMap::const_iterator uniform_it = uniformIDs.find( name );
1560 if( uniform_it != uniformIDs.end() )
1562 // found one matching uniform name, lets check the value...
1563 GLuint programId = program_it->first;
1564 GLint uniformId = uniform_it->second;
1566 const ProgramUniformValue<T> &mProgramUniforms = GetProgramUniformsForType( value );
1567 if( mProgramUniforms.CheckUniformValue( programId, uniformId, value ) )
1569 // the value matches
1575 fprintf(stderr, "Not found, printing possible values:" );
1576 for( ProgramUniformMap::const_iterator program_it = mUniforms.begin();
1577 program_it != mUniforms.end();
1580 const UniformIDMap &uniformIDs = program_it->second;
1582 UniformIDMap::const_iterator uniform_it = uniformIDs.find( name );
1583 if( uniform_it != uniformIDs.end() )
1585 // found one matching uniform name, lets check the value...
1586 GLuint programId = program_it->first;
1587 GLint uniformId = uniform_it->second;
1589 const ProgramUniformValue<T> &mProgramUniforms = GetProgramUniformsForType( value );
1591 if ( mProgramUniforms.GetUniformValue(programId, uniformId, origValue) )
1593 std::stringstream out;
1594 out << uniform_it->first << ": " << origValue;
1595 fprintf(stderr, "%s", out.str().c_str() );
1602 template <typename T>
1603 inline bool GetUniformValue( GLuint programId, GLuint uniformId, T& outValue) const
1605 const ProgramUniformValue<T> &mProgramUniforms = GetProgramUniformsForType( outValue );
1606 return mProgramUniforms.GetUniformValue( programId, uniformId, outValue );
1609 inline bool GetUniformIds( const char* name, GLuint& programId, GLuint& uniformId ) const
1611 for( ProgramUniformMap::const_iterator program_it = mUniforms.begin();
1612 program_it != mUniforms.end();
1615 const UniformIDMap &uniformIDs = program_it->second;
1617 UniformIDMap::const_iterator uniform_it = uniformIDs.find( name );
1618 if( uniform_it != uniformIDs.end() )
1620 programId = program_it->first;
1621 uniformId = uniform_it->second;
1630 inline GLuint GetLastShaderCompiled() const
1632 return mLastShaderCompiled;
1635 inline GLuint GetLastProgramCreated() const
1637 return mLastProgramIdUsed;
1642 ATTRIB_UNKNOWN = -1,
1647 ATTRIB_BONE_WEIGHTS,
1648 ATTRIB_BONE_INDICES,
1652 struct ScissorParams
1659 ScissorParams() : x( 0 ), y( 0 ), width( 0 ), height( 0 ) { }
1662 // Methods to check scissor tests
1663 inline const ScissorParams& GetScissorParams() const { return mScissorParams; }
1666 GLuint mCurrentProgram;
1667 GLuint mCompileStatus;
1669 GLint mGetAttribLocationResult;
1670 GLenum mGetErrorResult;
1671 GLubyte* mGetStringResult;
1672 GLboolean mIsBufferResult;
1673 GLboolean mIsEnabledResult;
1674 GLboolean mIsFramebufferResult;
1675 GLboolean mIsProgramResult;
1676 GLboolean mIsRenderbufferResult;
1677 GLboolean mIsShaderResult;
1678 GLboolean mIsTextureResult;
1679 GLenum mActiveTextureUnit;
1680 GLenum mCheckFramebufferStatusResult;
1681 GLint mNumBinaryFormats;
1682 GLint mBinaryFormats;
1683 GLint mProgramBinaryLength;
1684 bool mVertexAttribArrayState[MAX_ATTRIBUTE_CACHE_SIZE];
1685 bool mVertexAttribArrayChanged; // whether the vertex attrib array has been changed
1686 typedef std::map< GLuint, std::string> ShaderSourceMap;
1687 ShaderSourceMap mShaderSources;
1688 GLuint mLastShaderCompiled;
1690 Vector4 mLastBlendColor;
1691 GLenum mLastBlendEquationRgb;
1692 GLenum mLastBlendEquationAlpha;
1693 GLenum mLastBlendFuncSrcRgb;
1694 GLenum mLastBlendFuncDstRgb;
1695 GLenum mLastBlendFuncSrcAlpha;
1696 GLenum mLastBlendFuncDstAlpha;
1698 // Data for manipulating the IDs returned by GenTextures
1699 GLuint mLastAutoTextureIdUsed;
1700 std::vector<GLuint> mNextTextureIds;
1701 std::vector<GLuint> mDeletedTextureIds;
1702 std::vector<GLuint> mBoundTextures;
1704 struct ActiveTextureType
1706 std::vector<GLuint> mBoundTextures;
1709 ActiveTextureType mActiveTextures[ MIN_TEXTURE_UNIT_LIMIT ];
1711 TraceCallStack mCullFaceTrace;
1712 TraceCallStack mShaderTrace;
1713 TraceCallStack mTextureTrace;
1714 TraceCallStack mTexParamaterTrace;
1715 TraceCallStack mDrawTrace;
1717 // Shaders & Uniforms
1718 GLuint mLastShaderIdUsed;
1719 GLuint mLastProgramIdUsed;
1720 GLuint mLastUniformIdUsed;
1721 typedef std::map< std::string, GLint > UniformIDMap;
1722 typedef std::map< GLuint, UniformIDMap > ProgramUniformMap;
1723 ProgramUniformMap mUniforms;
1725 template <typename T>
1726 struct ProgramUniformValue : public std::map< GLuint, std::map< GLint, T > >
1729 typedef std::map< GLint, T > UniformValueMap;
1730 typedef std::map< GLuint, UniformValueMap > Map;
1732 bool SetUniformValue( GLuint program, GLuint uniform, const T& value )
1739 typename Map::iterator it = Map::find( program );
1740 if( it == Map::end() )
1742 // if its the first uniform for this program add it
1743 std::pair< typename Map::iterator, bool > result =
1744 Map::insert( typename Map::value_type( program, UniformValueMap() ) );
1748 UniformValueMap& uniforms = it->second;
1749 uniforms[uniform] = value;
1754 bool CheckUniformValue( GLuint program, GLuint uniform, const T& value ) const
1757 if ( GetUniformValue( program, uniform, uniformValue ) )
1759 return value == uniformValue;
1765 bool GetUniformValue( GLuint program, GLuint uniform, T& value ) const
1772 typename Map::const_iterator it = Map::find( program );
1773 if( it == Map::end() )
1775 // Uniform values always initialised as 0
1780 const UniformValueMap& uniforms = it->second;
1781 typename UniformValueMap::const_iterator it2 = uniforms.find( uniform );
1782 if( it2 == uniforms.end() )
1784 // Uniform values always initialised as 0
1788 value = it2->second;
1795 ProgramUniformValue<int> mProgramUniforms1i;
1796 ProgramUniformValue<float> mProgramUniforms1f;
1797 ProgramUniformValue<Vector2> mProgramUniforms2f;
1798 ProgramUniformValue<Vector3> mProgramUniforms3f;
1799 ProgramUniformValue<Vector4> mProgramUniforms4f;
1800 ProgramUniformValue<Matrix> mProgramUniformsMat4;
1801 ProgramUniformValue<Matrix3> mProgramUniformsMat3;
1803 inline const ProgramUniformValue<int>& GetProgramUniformsForType( const int ) const
1805 return mProgramUniforms1i;
1807 inline const ProgramUniformValue<float>& GetProgramUniformsForType( const float ) const
1809 return mProgramUniforms1f;
1811 inline const ProgramUniformValue<Vector2>& GetProgramUniformsForType( const Vector2& ) const
1813 return mProgramUniforms2f;
1815 inline const ProgramUniformValue<Vector3>& GetProgramUniformsForType( const Vector3& ) const
1817 return mProgramUniforms3f;
1819 inline const ProgramUniformValue<Vector4>& GetProgramUniformsForType( const Vector4& ) const
1821 return mProgramUniforms4f;
1823 inline const ProgramUniformValue<Matrix>& GetProgramUniformsForType( const Matrix& ) const
1825 return mProgramUniformsMat4;
1827 inline const ProgramUniformValue<Matrix3>& GetProgramUniformsForType( const Matrix3& ) const
1829 return mProgramUniformsMat3;
1831 inline void SetVertexAttribArray(GLuint index, bool state)
1833 if( index >= MAX_ATTRIBUTE_CACHE_SIZE )
1838 mVertexAttribArrayState[ index ] = state;
1839 mVertexAttribArrayChanged = true;
1842 ScissorParams mScissorParams;
1846 inline int TestGlAbstraction::ProgramUniformValue<int>::GetZero() const
1852 inline float TestGlAbstraction::ProgramUniformValue<float>::GetZero() const
1858 inline Vector2 TestGlAbstraction::ProgramUniformValue<Vector2>::GetZero() const
1860 return Vector2::ZERO;
1864 inline Vector3 TestGlAbstraction::ProgramUniformValue<Vector3>::GetZero() const
1866 return Vector3::ZERO;
1870 inline Vector4 TestGlAbstraction::ProgramUniformValue<Vector4>::GetZero() const
1872 return Vector4::ZERO;
1876 inline Matrix TestGlAbstraction::ProgramUniformValue<Matrix>::GetZero() const
1882 inline Matrix3 TestGlAbstraction::ProgramUniformValue<Matrix3>::GetZero() const
1884 return Matrix3( Matrix() );
1889 bool BlendEnabled(const Dali::TraceCallStack& callStack);
1890 bool BlendDisabled(const Dali::TraceCallStack& callStack);
1895 #endif // __TEST_GL_ES_H__