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 <dali/public-api/dali-core.h>
23 #include <dali/integration-api/core.h>
24 #include <dali/integration-api/gl-abstraction.h>
25 #include <dali/integration-api/gl-defines.h>
26 #include "test-trace-call-stack.h"
37 static const unsigned int MAX_ATTRIBUTE_CACHE_SIZE = 64;
38 static const char *mStdAttribs[MAX_ATTRIBUTE_CACHE_SIZE] =
40 "aPosition", // ATTRIB_POSITION
41 "aNormal", // ATTRIB_NORMAL
42 "aTexCoord", // ATTRIB_TEXCOORD
43 "aColor", // ATTRIB_COLOR
44 "aBoneWeights", // ATTRIB_BONE_WEIGHTS
45 "aBoneIndices" // ATTRIB_BONE_INDICES
48 class DALI_IMPORT_API TestGlAbstraction: public Dali::Integration::GlAbstraction
56 void PostRender(unsigned int timeDelta);
60 inline void ActiveTexture( GLenum textureUnit )
62 mActiveTextureUnit = textureUnit - GL_TEXTURE0;
65 inline GLenum GetActiveTextureUnit() const
67 return mActiveTextureUnit + GL_TEXTURE0;
70 inline void AttachShader( GLuint program, GLuint shader )
72 std::stringstream out;
73 out << program << ", " << shader;
74 mShaderTrace.PushCall("AttachShader", out.str());
77 inline void BindAttribLocation( GLuint program, GLuint index, const char* name )
81 inline void BindBuffer( GLenum target, GLuint buffer )
85 inline void BindFramebuffer( GLenum target, GLuint framebuffer )
89 inline void BindRenderbuffer( GLenum target, GLuint renderbuffer )
94 * This method can be used by test cases, to query the texture IDs that have been bound by BindTexture.
95 * @return A vector containing the IDs that were bound.
97 inline const std::vector<GLuint>& GetBoundTextures() const
99 return mBoundTextures;
103 * Query the texture IDs that have been bound with BindTexture, with a specific active texture unit.
104 * @param[in] activeTextureUnit The specific active texture unit.
105 * @return A vector containing the IDs that were bound.
107 inline const std::vector<GLuint>& GetBoundTextures( GLuint activeTextureUnit ) const
109 return mActiveTextures[ activeTextureUnit - GL_TEXTURE0 ].mBoundTextures;
113 * This method can be used by test cases, to clear the record of texture IDs that have been bound by BindTexture.
115 inline void ClearBoundTextures()
117 mBoundTextures.clear();
119 for( unsigned int i=0; i<MIN_TEXTURE_UNIT_LIMIT; ++i )
121 mActiveTextures[ i ].mBoundTextures.clear();
125 inline void BindTexture( GLenum target, GLuint texture )
127 // Record the bound textures for future checks
130 mBoundTextures.push_back( texture );
132 if( mActiveTextureUnit < MIN_TEXTURE_UNIT_LIMIT )
134 mActiveTextures[ mActiveTextureUnit ].mBoundTextures.push_back( texture );
138 std::stringstream out;
139 out << target << ", " << texture;
140 mTextureTrace.PushCall("BindTexture", out.str());
143 inline void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
145 mLastBlendColor.r = red;
146 mLastBlendColor.g = green;
147 mLastBlendColor.b = blue;
148 mLastBlendColor.a = alpha;
151 inline const Vector4& GetLastBlendColor() const
153 return mLastBlendColor;
156 inline void BlendEquation( GLenum mode )
158 mLastBlendEquationRgb = mode;
159 mLastBlendEquationAlpha = mode;
162 inline void BlendEquationSeparate( GLenum modeRgb, GLenum modeAlpha )
164 mLastBlendEquationRgb = modeRgb;
165 mLastBlendEquationAlpha = modeAlpha;
168 inline GLenum GetLastBlendEquationRgb() const
170 return mLastBlendEquationRgb;
173 inline GLenum GetLastBlendEquationAlpha() const
175 return mLastBlendEquationAlpha;
178 inline void BlendFunc(GLenum sfactor, GLenum dfactor)
180 mLastBlendFuncSrcRgb = sfactor;
181 mLastBlendFuncDstRgb = dfactor;
182 mLastBlendFuncSrcAlpha = sfactor;
183 mLastBlendFuncDstAlpha = dfactor;
186 inline void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
188 mLastBlendFuncSrcRgb = srcRGB;
189 mLastBlendFuncDstRgb = dstRGB;
190 mLastBlendFuncSrcAlpha = srcAlpha;
191 mLastBlendFuncDstAlpha = dstAlpha;
194 inline GLenum GetLastBlendFuncSrcRgb() const
196 return mLastBlendFuncSrcRgb;
199 inline GLenum GetLastBlendFuncDstRgb() const
201 return mLastBlendFuncDstRgb;
204 inline GLenum GetLastBlendFuncSrcAlpha() const
206 return mLastBlendFuncSrcAlpha;
209 inline GLenum GetLastBlendFuncDstAlpha() const
211 return mLastBlendFuncDstAlpha;
214 inline void BufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage)
218 inline void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
222 inline GLenum CheckFramebufferStatus(GLenum target)
224 return mCheckFramebufferStatusResult;
227 inline void Clear(GLbitfield mask)
231 inline void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
235 inline void ClearDepthf(GLclampf depth)
239 inline void ClearStencil(GLint s)
243 inline void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
247 inline void CompileShader(GLuint shader)
249 std::stringstream out;
251 mShaderTrace.PushCall("CompileShader", out.str());
254 inline void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
258 inline void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
262 inline void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
266 inline void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
270 inline GLuint CreateProgram(void)
272 mShaderTrace.PushCall("CreateProgram", "");
274 ++mLastProgramIdUsed;
275 mUniforms[mLastProgramIdUsed] = UniformIDMap();
276 return mLastProgramIdUsed;
279 inline GLuint CreateShader(GLenum type)
281 std::stringstream out;
283 mShaderTrace.PushCall("CreateShader", out.str());
285 return ++mLastShaderIdUsed;
288 inline void CullFace(GLenum mode)
290 std::stringstream out;
292 mCullFaceTrace.PushCall("CullFace", out.str());
295 inline void DeleteBuffers(GLsizei n, const GLuint* buffers)
299 inline void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
303 inline void DeleteProgram(GLuint program)
305 std::stringstream out;
307 mShaderTrace.PushCall("DeleteProgram", out.str());
310 inline void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
314 inline void DeleteShader(GLuint shader)
316 std::stringstream out;
318 mShaderTrace.PushCall("DeleteShader", out.str());
321 inline void DeleteTextures(GLsizei n, const GLuint* textures)
323 std::stringstream out;
324 out << n << ", " << textures << " = [" ;
326 for(GLsizei i=0; i<n; i++)
328 out << textures[i] << ", " ;
329 mDeletedTextureIds.push_back(textures[i]);
332 mTextureTrace.PushCall("DeleteTextures", out.str());
335 inline bool CheckNoTexturesDeleted()
337 return mDeletedTextureIds.size() == 0;
340 inline bool CheckTextureDeleted( GLuint textureId )
344 for(std::vector<GLuint>::iterator iter=mDeletedTextureIds.begin(); iter != mDeletedTextureIds.end(); ++iter)
346 if(*iter == textureId)
355 inline void ClearDeletedTextures()
357 mDeletedTextureIds.clear();
360 inline void DepthFunc(GLenum func)
364 inline void DepthMask(GLboolean flag)
368 inline void DepthRangef(GLclampf zNear, GLclampf zFar)
372 inline void DetachShader(GLuint program, GLuint shader)
374 std::stringstream out;
375 out << program << ", " << shader;
376 mShaderTrace.PushCall("DetachShader", out.str());
379 inline void Disable(GLenum cap)
381 std::stringstream out;
383 mCullFaceTrace.PushCall("Disable", out.str());
386 inline void DisableVertexAttribArray(GLuint index)
388 SetVertexAttribArray( index, false );
391 inline void DrawArrays(GLenum mode, GLint first, GLsizei count)
393 std::stringstream out;
394 out << mode << ", " << first << ", " << count;
395 mDrawTrace.PushCall("DrawArrays", out.str());
398 inline void DrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices)
400 std::stringstream out;
401 out << mode << ", " << count << ", " << type << ", indices";
402 mDrawTrace.PushCall("DrawElements", out.str());
405 inline void Enable(GLenum cap)
407 std::stringstream out;
409 mCullFaceTrace.PushCall("Enable", out.str());
412 inline void EnableVertexAttribArray(GLuint index)
414 SetVertexAttribArray( index, true);
417 inline void Finish(void)
421 inline void Flush(void)
425 inline void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
429 inline void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
433 inline void FrontFace(GLenum mode)
437 inline void GenBuffers(GLsizei n, GLuint* buffers)
439 // avoids an assert in GpuBuffers
443 inline void GenerateMipmap(GLenum target)
447 inline void GenFramebuffers(GLsizei n, GLuint* framebuffers)
451 inline void GenRenderbuffers(GLsizei n, GLuint* renderbuffers)
456 * This method can be used by test cases, to manipulate the texture IDs generated by GenTextures.
457 * @param[in] ids A vector containing the next IDs to be generated
459 inline void SetNextTextureIds( const std::vector<GLuint>& ids )
461 mNextTextureIds = ids;
464 inline const std::vector<GLuint>& GetNextTextureIds()
466 return mNextTextureIds;
469 inline void GenTextures(GLsizei n, GLuint* textures)
471 for( int i=0; i<n; ++i )
473 if( !mNextTextureIds.empty() )
475 *(textures+i) = mNextTextureIds[0];
476 mNextTextureIds.erase( mNextTextureIds.begin() );
480 *(textures+i) = ++mLastAutoTextureIdUsed;
484 std::stringstream out;
485 for(int i=0; i<n; i++)
493 mTextureTrace.PushCall("GenTextures", out.str());
496 inline void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
500 inline void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
504 inline void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
508 inline int GetAttribLocation(GLuint program, const char* name)
510 std::string attribName(name);
512 for( unsigned int i = 0; i < ATTRIB_TYPE_LAST; ++i )
514 if( mStdAttribs[i] == attribName )
520 // 0 is a valid location
524 inline void GetBooleanv(GLenum pname, GLboolean* params)
528 inline void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
532 inline GLenum GetError(void)
534 return mGetErrorResult;
537 inline void GetFloatv(GLenum pname, GLfloat* params)
541 inline void GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
545 inline void GetIntegerv(GLenum pname, GLint* params)
549 case GL_MAX_TEXTURE_SIZE:
552 case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
555 case GL_NUM_PROGRAM_BINARY_FORMATS_OES:
556 *params = mNumBinaryFormats;
558 case GL_PROGRAM_BINARY_FORMATS_OES:
559 *params = mBinaryFormats;
564 inline void GetProgramiv(GLuint program, GLenum pname, GLint* params)
568 *params = mLinkStatus;
570 case GL_PROGRAM_BINARY_LENGTH_OES:
571 *params = mProgramBinaryLength;
576 inline void GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
581 inline void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
585 inline void GetShaderiv(GLuint shader, GLenum pname, GLint* params)
588 case GL_COMPILE_STATUS:
589 *params = mCompileStatus;
594 inline void GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
598 inline void GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
602 inline const GLubyte* GetString(GLenum name)
604 return mGetStringResult;
607 inline void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
611 inline void GetTexParameteriv(GLenum target, GLenum pname, GLint* params)
615 inline void GetUniformfv(GLuint program, GLint location, GLfloat* params)
619 inline void GetUniformiv(GLuint program, GLint location, GLint* params)
623 inline GLint GetUniformLocation(GLuint program, const char* name)
625 ProgramUniformMap::iterator it = mUniforms.find(program);
626 if( it == mUniforms.end() )
628 // Not a valid program ID
629 mGetErrorResult = GL_INVALID_OPERATION;
633 UniformIDMap& uniformIDs = it->second;
634 UniformIDMap::iterator it2 = uniformIDs.find( name );
635 if( it2 == uniformIDs.end() )
637 // Uniform not found, so add it...
638 uniformIDs[name] = ++mLastUniformIdUsed;
639 return mLastUniformIdUsed;
645 inline void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
649 inline void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
653 inline void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
657 inline void Hint(GLenum target, GLenum mode)
661 inline GLboolean IsBuffer(GLuint buffer)
663 return mIsBufferResult;
666 inline GLboolean IsEnabled(GLenum cap)
668 return mIsEnabledResult;
671 inline GLboolean IsFramebuffer(GLuint framebuffer)
673 return mIsFramebufferResult;
676 inline GLboolean IsProgram(GLuint program)
678 return mIsProgramResult;
681 inline GLboolean IsRenderbuffer(GLuint renderbuffer)
683 return mIsRenderbufferResult;
686 inline GLboolean IsShader(GLuint shader)
688 return mIsShaderResult;
691 inline GLboolean IsTexture(GLuint texture)
693 return mIsTextureResult;
696 inline void LineWidth(GLfloat width)
700 inline void LinkProgram(GLuint program)
702 std::stringstream out;
704 mShaderTrace.PushCall("LinkProgram", out.str());
707 inline void PixelStorei(GLenum pname, GLint param)
711 inline void PolygonOffset(GLfloat factor, GLfloat units)
715 inline void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
719 inline void ReleaseShaderCompiler(void)
723 inline void RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
727 inline void SampleCoverage(GLclampf value, GLboolean invert)
731 inline void Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
733 mScissorParams.x = x;
734 mScissorParams.y = y;
735 mScissorParams.width = width;
736 mScissorParams.height = height;
739 inline void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
743 inline void ShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
745 std::string stringBuilder;
746 for(int i = 0; i < count; ++i)
748 stringBuilder += string[i];
750 mShaderSources[shader] = stringBuilder;
751 mLastShaderCompiled = shader;
754 inline void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
756 const std::string shaderSource = mShaderSources[shader];
757 if( static_cast<int>(shaderSource.length()) < bufsize )
759 strcpy(source, shaderSource.c_str());
760 *length = shaderSource.length();
764 *length = bufsize -1;
765 strncpy(source, shaderSource.c_str(), *length);
766 source[*length] = 0x0;
770 inline std::string GetShaderSource(GLuint shader)
772 return mShaderSources[shader];
775 inline void StencilFunc(GLenum func, GLint ref, GLuint mask)
779 inline void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
783 inline void StencilMask(GLuint mask)
787 inline void StencilMaskSeparate(GLenum face, GLuint mask)
791 inline void StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
795 inline void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
799 inline void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
801 std::stringstream out;
802 out << width << ", " << height;
803 mTextureTrace.PushCall("TexImage2D", out.str());
806 inline void TexParameterf(GLenum target, GLenum pname, GLfloat param)
808 std::stringstream out;
809 out << target << ", " << pname << ", " << param;
810 mTexParamaterTrace.PushCall("TexParameterf", out.str());
813 inline void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
815 std::stringstream out;
816 out << target << ", " << pname << ", " << params[0];
817 mTexParamaterTrace.PushCall("TexParameterfv", out.str());
820 inline void TexParameteri(GLenum target, GLenum pname, GLint param)
822 std::stringstream out;
823 out << target << ", " << pname << ", " << param;
824 mTexParamaterTrace.PushCall("TexParameteri", out.str());
827 inline void TexParameteriv(GLenum target, GLenum pname, const GLint* params)
829 std::stringstream out;
830 out << target << ", " << pname << ", " << params[0];
831 mTexParamaterTrace.PushCall("TexParameteriv", out.str());
834 inline void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
836 std::stringstream out;
837 out << xoffset << ", " << yoffset << ", " << width << ", " << height;
838 mTextureTrace.PushCall("TexSubImage2D", out.str());
841 inline void Uniform1f(GLint location, GLfloat x)
843 if( ! mProgramUniforms1f.SetUniformValue( mCurrentProgram, location, x ) )
845 mGetErrorResult = GL_INVALID_OPERATION;
849 inline void Uniform1fv(GLint location, GLsizei count, const GLfloat* v)
851 for( int i = 0; i < count; ++i )
853 if( ! mProgramUniforms1f.SetUniformValue( mCurrentProgram, location, v[i] ) )
855 mGetErrorResult = GL_INVALID_OPERATION;
861 inline void Uniform1i(GLint location, GLint x)
863 if( ! mProgramUniforms1i.SetUniformValue( mCurrentProgram, location, x ) )
865 mGetErrorResult = GL_INVALID_OPERATION;
869 inline void Uniform1iv(GLint location, GLsizei count, const GLint* v)
871 for( int i = 0; i < count; ++i )
873 if( ! mProgramUniforms1i.SetUniformValue( mCurrentProgram,
877 mGetErrorResult = GL_INVALID_OPERATION;
883 inline void Uniform2f(GLint location, GLfloat x, GLfloat y)
885 if( ! mProgramUniforms2f.SetUniformValue( mCurrentProgram,
889 mGetErrorResult = GL_INVALID_OPERATION;
893 inline void Uniform2fv(GLint location, GLsizei count, const GLfloat* v)
895 for( int i = 0; i < count; ++i )
897 if( ! mProgramUniforms2f.SetUniformValue( mCurrentProgram,
899 Vector2( v[2*i], v[2*i+1] ) ) )
901 mGetErrorResult = GL_INVALID_OPERATION;
907 inline void Uniform2i(GLint location, GLint x, GLint y)
911 inline void Uniform2iv(GLint location, GLsizei count, const GLint* v)
915 inline void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
917 if( ! mProgramUniforms3f.SetUniformValue( mCurrentProgram,
919 Vector3( x, y, z ) ) )
921 mGetErrorResult = GL_INVALID_OPERATION;
925 inline void Uniform3fv(GLint location, GLsizei count, const GLfloat* v)
927 for( int i = 0; i < count; ++i )
929 if( ! mProgramUniforms3f.SetUniformValue(
932 Vector3( v[3*i], v[3*i+1], v[3*i+2] ) ) )
934 mGetErrorResult = GL_INVALID_OPERATION;
940 inline void Uniform3i(GLint location, GLint x, GLint y, GLint z)
944 inline void Uniform3iv(GLint location, GLsizei count, const GLint* v)
948 inline void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
950 if( ! mProgramUniforms4f.SetUniformValue( mCurrentProgram,
952 Vector4( x, y, z, w ) ) )
954 mGetErrorResult = GL_INVALID_OPERATION;
958 inline void Uniform4fv(GLint location, GLsizei count, const GLfloat* v)
960 for( int i = 0; i < count; ++i )
962 if( ! mProgramUniforms4f.SetUniformValue(
965 Vector4( v[4*i], v[4*i+1], v[4*i+2], v[4*i+3] ) ) )
967 mGetErrorResult = GL_INVALID_OPERATION;
973 inline void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
977 inline void Uniform4iv(GLint location, GLsizei count, const GLint* v)
981 inline void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
985 inline void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
987 for( int i = 0; i < count; ++i )
989 if( ! mProgramUniformsMat3.SetUniformValue(
992 Matrix3( value[0], value[1], value[2], value[3], value[4], value[5], value[6], value[7], value[8] ) ) )
994 mGetErrorResult = GL_INVALID_OPERATION;
1000 inline void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1002 for( int i = 0; i < count; ++i )
1004 if( ! mProgramUniformsMat4.SetUniformValue(
1009 mGetErrorResult = GL_INVALID_OPERATION;
1015 inline void UseProgram(GLuint program)
1017 mCurrentProgram = program;
1020 inline void ValidateProgram(GLuint program)
1024 inline void VertexAttrib1f(GLuint indx, GLfloat x)
1028 inline void VertexAttrib1fv(GLuint indx, const GLfloat* values)
1032 inline void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
1036 inline void VertexAttrib2fv(GLuint indx, const GLfloat* values)
1040 inline void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
1044 inline void VertexAttrib3fv(GLuint indx, const GLfloat* values)
1048 inline void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1052 inline void VertexAttrib4fv(GLuint indx, const GLfloat* values)
1056 inline void VertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
1060 inline void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
1066 inline void ReadBuffer(GLenum mode)
1070 inline void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
1074 inline void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1078 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)
1082 inline void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1086 inline void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
1090 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)
1094 inline void GenQueries(GLsizei n, GLuint* ids)
1098 inline void DeleteQueries(GLsizei n, const GLuint* ids)
1102 inline GLboolean IsQuery(GLuint id)
1107 inline void BeginQuery(GLenum target, GLuint id)
1111 inline void EndQuery(GLenum target)
1115 inline void GetQueryiv(GLenum target, GLenum pname, GLint* params)
1119 inline void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
1123 inline GLboolean UnmapBuffer(GLenum target)
1128 inline void GetBufferPointerv(GLenum target, GLenum pname, GLvoid** params)
1132 inline void DrawBuffers(GLsizei n, const GLenum* bufs)
1136 inline void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1140 inline void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1144 inline void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1148 inline void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1152 inline void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1156 inline void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1160 inline void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
1164 inline void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
1168 inline void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
1172 inline GLvoid* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
1177 inline void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
1181 inline void BindVertexArray(GLuint array)
1185 inline void DeleteVertexArrays(GLsizei n, const GLuint* arrays)
1189 inline void GenVertexArrays(GLsizei n, GLuint* arrays)
1193 inline GLboolean IsVertexArray(GLuint array)
1198 inline void GetIntegeri_v(GLenum target, GLuint index, GLint* data)
1202 inline void BeginTransformFeedback(GLenum primitiveMode)
1206 inline void EndTransformFeedback(void)
1210 inline void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
1214 inline void BindBufferBase(GLenum target, GLuint index, GLuint buffer)
1218 inline void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)
1222 inline void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
1226 inline void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
1230 inline void GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
1234 inline void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
1238 inline void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
1242 inline void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
1246 inline void VertexAttribI4iv(GLuint index, const GLint* v)
1250 inline void VertexAttribI4uiv(GLuint index, const GLuint* v)
1254 inline void GetUniformuiv(GLuint program, GLint location, GLuint* params)
1258 inline GLint GetFragDataLocation(GLuint program, const GLchar *name)
1263 inline void Uniform1ui(GLint location, GLuint v0)
1267 inline void Uniform2ui(GLint location, GLuint v0, GLuint v1)
1271 inline void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
1275 inline void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
1279 inline void Uniform1uiv(GLint location, GLsizei count, const GLuint* value)
1283 inline void Uniform2uiv(GLint location, GLsizei count, const GLuint* value)
1287 inline void Uniform3uiv(GLint location, GLsizei count, const GLuint* value)
1291 inline void Uniform4uiv(GLint location, GLsizei count, const GLuint* value)
1295 inline void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value)
1299 inline void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value)
1303 inline void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value)
1307 inline void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
1311 inline const GLubyte* GetStringi(GLenum name, GLuint index)
1316 inline void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
1320 inline void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)
1324 inline void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
1328 inline GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName)
1330 return GL_INVALID_INDEX;
1333 inline void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
1337 inline void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
1341 inline void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
1345 inline void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
1349 inline void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)
1353 inline GLsync FenceSync(GLenum condition, GLbitfield flags)
1358 inline GLboolean IsSync(GLsync sync)
1363 inline void DeleteSync(GLsync sync)
1367 inline GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1372 inline void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
1376 inline void GetInteger64v(GLenum pname, GLint64* params)
1380 inline void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
1384 inline void GetInteger64i_v(GLenum target, GLuint index, GLint64* data)
1388 inline void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
1392 inline void GenSamplers(GLsizei count, GLuint* samplers)
1396 inline void DeleteSamplers(GLsizei count, const GLuint* samplers)
1400 inline GLboolean IsSampler(GLuint sampler)
1405 inline void BindSampler(GLuint unit, GLuint sampler)
1409 inline void SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
1413 inline void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param)
1417 inline void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
1421 inline void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param)
1425 inline void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
1429 inline void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
1433 inline void VertexAttribDivisor(GLuint index, GLuint divisor)
1437 inline void BindTransformFeedback(GLenum target, GLuint id)
1441 inline void DeleteTransformFeedbacks(GLsizei n, const GLuint* ids)
1445 inline void GenTransformFeedbacks(GLsizei n, GLuint* ids)
1449 inline GLboolean IsTransformFeedback(GLuint id)
1454 inline void PauseTransformFeedback(void)
1458 inline void ResumeTransformFeedback(void)
1462 inline void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
1464 mGetProgramBinaryCalled = true;
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 GetUniformValue( const char* name, 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 return mProgramUniforms.GetUniformValue( programId, uniformId, value );
1574 template <typename T>
1575 inline bool CheckUniformValue( const char* name, const T& value ) const
1577 for( ProgramUniformMap::const_iterator program_it = mUniforms.begin();
1578 program_it != mUniforms.end();
1581 const UniformIDMap &uniformIDs = program_it->second;
1583 UniformIDMap::const_iterator uniform_it = uniformIDs.find( name );
1584 if( uniform_it != uniformIDs.end() )
1586 // found one matching uniform name, lets check the value...
1587 GLuint programId = program_it->first;
1588 GLint uniformId = uniform_it->second;
1590 const ProgramUniformValue<T> &mProgramUniforms = GetProgramUniformsForType( value );
1591 if( mProgramUniforms.CheckUniformValue( programId, uniformId, value ) )
1593 // the value matches
1599 fprintf(stderr, "Not found, printing possible values:" );
1600 for( ProgramUniformMap::const_iterator program_it = mUniforms.begin();
1601 program_it != mUniforms.end();
1604 const UniformIDMap &uniformIDs = program_it->second;
1606 UniformIDMap::const_iterator uniform_it = uniformIDs.find( name );
1607 if( uniform_it != uniformIDs.end() )
1609 // found one matching uniform name, lets check the value...
1610 GLuint programId = program_it->first;
1611 GLint uniformId = uniform_it->second;
1613 const ProgramUniformValue<T> &mProgramUniforms = GetProgramUniformsForType( value );
1615 if ( mProgramUniforms.GetUniformValue(programId, uniformId, origValue) )
1617 std::stringstream out;
1618 out << uniform_it->first << ": " << origValue;
1619 fprintf(stderr, "%s", out.str().c_str() );
1626 template <typename T>
1627 inline bool GetUniformValue( GLuint programId, GLuint uniformId, T& outValue) const
1629 const ProgramUniformValue<T> &mProgramUniforms = GetProgramUniformsForType( outValue );
1630 return mProgramUniforms.GetUniformValue( programId, uniformId, outValue );
1633 inline bool GetUniformIds( const char* name, GLuint& programId, GLuint& uniformId ) const
1635 for( ProgramUniformMap::const_iterator program_it = mUniforms.begin();
1636 program_it != mUniforms.end();
1639 const UniformIDMap &uniformIDs = program_it->second;
1641 UniformIDMap::const_iterator uniform_it = uniformIDs.find( name );
1642 if( uniform_it != uniformIDs.end() )
1644 programId = program_it->first;
1645 uniformId = uniform_it->second;
1652 inline GLuint GetLastShaderCompiled() const
1654 return mLastShaderCompiled;
1657 inline GLuint GetLastProgramCreated() const
1659 return mLastProgramIdUsed;
1664 ATTRIB_UNKNOWN = -1,
1669 ATTRIB_BONE_WEIGHTS,
1670 ATTRIB_BONE_INDICES,
1674 struct ScissorParams
1681 ScissorParams() : x( 0 ), y( 0 ), width( 0 ), height( 0 ) { }
1684 // Methods to check scissor tests
1685 inline const ScissorParams& GetScissorParams() const { return mScissorParams; }
1687 inline bool GetProgramBinaryCalled() const { return mGetProgramBinaryCalled; }
1690 GLuint mCurrentProgram;
1691 GLuint mCompileStatus;
1693 GLint mGetAttribLocationResult;
1694 GLenum mGetErrorResult;
1695 GLubyte* mGetStringResult;
1696 GLboolean mIsBufferResult;
1697 GLboolean mIsEnabledResult;
1698 GLboolean mIsFramebufferResult;
1699 GLboolean mIsProgramResult;
1700 GLboolean mIsRenderbufferResult;
1701 GLboolean mIsShaderResult;
1702 GLboolean mIsTextureResult;
1703 GLenum mActiveTextureUnit;
1704 GLenum mCheckFramebufferStatusResult;
1705 GLint mNumBinaryFormats;
1706 GLint mBinaryFormats;
1707 GLint mProgramBinaryLength;
1708 bool mVertexAttribArrayState[MAX_ATTRIBUTE_CACHE_SIZE];
1709 bool mVertexAttribArrayChanged; // whether the vertex attrib array has been changed
1710 bool mGetProgramBinaryCalled;
1711 typedef std::map< GLuint, std::string> ShaderSourceMap;
1712 ShaderSourceMap mShaderSources;
1713 GLuint mLastShaderCompiled;
1715 Vector4 mLastBlendColor;
1716 GLenum mLastBlendEquationRgb;
1717 GLenum mLastBlendEquationAlpha;
1718 GLenum mLastBlendFuncSrcRgb;
1719 GLenum mLastBlendFuncDstRgb;
1720 GLenum mLastBlendFuncSrcAlpha;
1721 GLenum mLastBlendFuncDstAlpha;
1723 // Data for manipulating the IDs returned by GenTextures
1724 GLuint mLastAutoTextureIdUsed;
1725 std::vector<GLuint> mNextTextureIds;
1726 std::vector<GLuint> mDeletedTextureIds;
1727 std::vector<GLuint> mBoundTextures;
1729 struct ActiveTextureType
1731 std::vector<GLuint> mBoundTextures;
1734 ActiveTextureType mActiveTextures[ MIN_TEXTURE_UNIT_LIMIT ];
1736 TraceCallStack mCullFaceTrace;
1737 TraceCallStack mShaderTrace;
1738 TraceCallStack mTextureTrace;
1739 TraceCallStack mTexParamaterTrace;
1740 TraceCallStack mDrawTrace;
1742 // Shaders & Uniforms
1743 GLuint mLastShaderIdUsed;
1744 GLuint mLastProgramIdUsed;
1745 GLuint mLastUniformIdUsed;
1746 typedef std::map< std::string, GLint > UniformIDMap;
1747 typedef std::map< GLuint, UniformIDMap > ProgramUniformMap;
1748 ProgramUniformMap mUniforms;
1750 template <typename T>
1751 struct ProgramUniformValue : public std::map< GLuint, std::map< GLint, T > >
1754 typedef std::map< GLint, T > UniformValueMap;
1755 typedef std::map< GLuint, UniformValueMap > Map;
1757 bool SetUniformValue( GLuint program, GLuint uniform, const T& value )
1764 typename Map::iterator it = Map::find( program );
1765 if( it == Map::end() )
1767 // if its the first uniform for this program add it
1768 std::pair< typename Map::iterator, bool > result =
1769 Map::insert( typename Map::value_type( program, UniformValueMap() ) );
1773 UniformValueMap& uniforms = it->second;
1774 uniforms[uniform] = value;
1779 bool CheckUniformValue( GLuint program, GLuint uniform, const T& value ) const
1782 if ( GetUniformValue( program, uniform, uniformValue ) )
1784 return value == uniformValue;
1790 bool GetUniformValue( GLuint program, GLuint uniform, T& value ) const
1797 typename Map::const_iterator it = Map::find( program );
1798 if( it == Map::end() )
1800 // Uniform values always initialised as 0
1805 const UniformValueMap& uniforms = it->second;
1806 typename UniformValueMap::const_iterator it2 = uniforms.find( uniform );
1807 if( it2 == uniforms.end() )
1809 // Uniform values always initialised as 0
1813 value = it2->second;
1820 ProgramUniformValue<int> mProgramUniforms1i;
1821 ProgramUniformValue<float> mProgramUniforms1f;
1822 ProgramUniformValue<Vector2> mProgramUniforms2f;
1823 ProgramUniformValue<Vector3> mProgramUniforms3f;
1824 ProgramUniformValue<Vector4> mProgramUniforms4f;
1825 ProgramUniformValue<Matrix> mProgramUniformsMat4;
1826 ProgramUniformValue<Matrix3> mProgramUniformsMat3;
1828 inline const ProgramUniformValue<int>& GetProgramUniformsForType( const int ) const
1830 return mProgramUniforms1i;
1832 inline const ProgramUniformValue<float>& GetProgramUniformsForType( const float ) const
1834 return mProgramUniforms1f;
1836 inline const ProgramUniformValue<Vector2>& GetProgramUniformsForType( const Vector2& ) const
1838 return mProgramUniforms2f;
1840 inline const ProgramUniformValue<Vector3>& GetProgramUniformsForType( const Vector3& ) const
1842 return mProgramUniforms3f;
1844 inline const ProgramUniformValue<Vector4>& GetProgramUniformsForType( const Vector4& ) const
1846 return mProgramUniforms4f;
1848 inline const ProgramUniformValue<Matrix>& GetProgramUniformsForType( const Matrix& ) const
1850 return mProgramUniformsMat4;
1852 inline const ProgramUniformValue<Matrix3>& GetProgramUniformsForType( const Matrix3& ) const
1854 return mProgramUniformsMat3;
1856 inline void SetVertexAttribArray(GLuint index, bool state)
1858 if( index >= MAX_ATTRIBUTE_CACHE_SIZE )
1863 mVertexAttribArrayState[ index ] = state;
1864 mVertexAttribArrayChanged = true;
1867 ScissorParams mScissorParams;
1871 inline int TestGlAbstraction::ProgramUniformValue<int>::GetZero() const
1877 inline float TestGlAbstraction::ProgramUniformValue<float>::GetZero() const
1883 inline Vector2 TestGlAbstraction::ProgramUniformValue<Vector2>::GetZero() const
1885 return Vector2::ZERO;
1889 inline Vector3 TestGlAbstraction::ProgramUniformValue<Vector3>::GetZero() const
1891 return Vector3::ZERO;
1895 inline Vector4 TestGlAbstraction::ProgramUniformValue<Vector4>::GetZero() const
1897 return Vector4::ZERO;
1901 inline Matrix TestGlAbstraction::ProgramUniformValue<Matrix>::GetZero() const
1907 inline Matrix3 TestGlAbstraction::ProgramUniformValue<Matrix3>::GetZero() const
1909 return Matrix3( Matrix() );
1914 bool BlendEnabled(const Dali::TraceCallStack& callStack);
1915 bool BlendDisabled(const Dali::TraceCallStack& callStack);
1920 #endif // __TEST_GL_ES_H__