2 * Copyright (c) 2014 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;
36 mGetAttribLocationResult = 0;
38 mGetStringResult = NULL;
41 mIsFramebufferResult = 0;
43 mIsRenderbufferResult = 0;
46 mVertexAttribArrayChanged = false;
48 mCheckFramebufferStatusResult = 0;
49 mFramebufferStatus = 0;
50 mFramebufferColorAttached = 0;
51 mFramebufferDepthAttached = 0;
52 mFramebufferStencilAttached = 0;
54 mNumBinaryFormats = 0;
56 mProgramBinaryLength = 0;
57 mGetProgramBinaryCalled = false;
59 mLastAutoTextureIdUsed = 0;
61 mLastShaderIdUsed = 0;
62 mLastProgramIdUsed = 0;
63 mLastUniformIdUsed = 0;
64 mLastShaderCompiled = 0;
65 mLastClearBitMask = 0;
68 mLastBlendEquationRgb = 0;
69 mLastBlendEquationAlpha = 0;
70 mLastBlendFuncSrcRgb = 0;
71 mLastBlendFuncDstRgb = 0;
72 mLastBlendFuncSrcAlpha = 0;
73 mLastBlendFuncDstAlpha = 0;
76 mProgramUniforms1i.clear();
77 mProgramUniforms1f.clear();
78 mProgramUniforms2f.clear();
79 mProgramUniforms3f.clear();
80 mProgramUniforms4f.clear();
83 void TestGlAbstraction::PreRender()
87 void TestGlAbstraction::PostRender(unsigned int timeDelta)
93 bool BlendEnabled(const Dali::TraceCallStack& callStack)
95 std::stringstream out;
97 bool blendEnabled = callStack.FindMethodAndParams("Enable", out.str());
101 bool BlendDisabled(const Dali::TraceCallStack& callStack)
103 std::stringstream out;
105 bool blendEnabled = callStack.FindMethodAndParams("Disable", out.str());