2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "test-gl-abstraction.h"
23 TestGlAbstraction::TestGlAbstraction()
28 TestGlAbstraction::~TestGlAbstraction() {}
30 void TestGlAbstraction::Initialize()
33 mCompileStatus = GL_TRUE;
34 mLinkStatus = GL_TRUE;
35 mNumberOfActiveUniforms = 0;
36 mGetAttribLocationResult = 0;
38 mGetStringResult = NULL;
41 mIsFramebufferResult = 0;
43 mIsRenderbufferResult = 0;
46 mActiveTextureUnit = 0;
47 mCheckFramebufferStatusResult = 0;
48 mFramebufferStatus = 0;
49 mFramebufferColorAttached = 0;
50 mFramebufferDepthAttached = 0;
51 mFramebufferStencilAttached = 0;
52 mNumBinaryFormats = 0;
54 mProgramBinaryLength = 0;
56 mVertexAttribArrayChanged = false;
57 mGetProgramBinaryCalled = false;
59 mLastShaderCompiled = 0;
60 mLastClearBitMask = 0;
63 mLastBlendEquationRgb = 0;
64 mLastBlendEquationAlpha = 0;
65 mLastBlendFuncSrcRgb = 0;
66 mLastBlendFuncDstRgb = 0;
67 mLastBlendFuncSrcAlpha = 0;
68 mLastBlendFuncDstAlpha = 0;
69 mLastAutoTextureIdUsed = 0;
70 mNumGeneratedTextures = 0;
71 mLastShaderIdUsed = 0;
72 mLastProgramIdUsed = 0;
73 mLastUniformIdUsed = 0;
74 mLastDepthMask = false;
77 mProgramUniforms1i.clear();
78 mProgramUniforms1f.clear();
79 mProgramUniforms2f.clear();
80 mProgramUniforms3f.clear();
81 mProgramUniforms4f.clear();
83 mCullFaceTrace.Reset();
84 mDepthFunctionTrace.Reset();
85 mEnableDisableTrace.Reset();
87 mStencilFunctionTrace.Reset();
88 mScissorTrace.Reset();
89 mTextureTrace.Reset();
90 mTexParamaterTrace.Reset();
93 for( unsigned int i=0; i<MAX_ATTRIBUTE_CACHE_SIZE; ++i )
95 mVertexAttribArrayState[i] = false;
99 void TestGlAbstraction::PreRender()
103 void TestGlAbstraction::PostRender()
109 bool BlendEnabled(const Dali::TraceCallStack& callStack)
111 std::stringstream out;
113 bool blendEnabled = callStack.FindMethodAndParams( "Enable", out.str() );
117 bool BlendDisabled(const Dali::TraceCallStack& callStack)
119 std::stringstream out;
121 bool blendEnabled = callStack.FindMethodAndParams( "Disable", out.str() );