X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-gl-abstraction.cpp;h=7a31046b7b1dbf188463146ea0c46b62ac2c9ee0;hp=f2086d6d9a616d9f5798bcc4c991bccaf5742d0c;hb=b49330a83a1f09d3437225e31619f94efdf97cf3;hpb=9898539d73faa8f3eebc454f0084727479ef8ba9 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp index f2086d6..7a31046 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,21 +18,24 @@ #include "test-gl-abstraction.h" #include "test-trace-call-stack.h" +static const bool TRACE{ + false}; + namespace Dali { TestGlAbstraction::TestGlAbstraction() -: mBufferTrace(true, std::string("gl")), - mCullFaceTrace(true, "gl"), - mEnableDisableTrace(true, "gl"), - mShaderTrace(true, "gl"), - mTextureTrace(true, std::string("gl")), - mTexParameterTrace(true, "gl"), - mDrawTrace(true, "gl"), - mDepthFunctionTrace(true, "gl"), - mStencilFunctionTrace(true, "gl"), - mScissorTrace(true, "gl"), - mSetUniformTrace(true, "Uniform "), - mViewportTrace(true, "gl") +: mBufferTrace(TRACE, std::string("gl")), + mCullFaceTrace(TRACE, "gl"), + mEnableDisableTrace(TRACE, "gl"), + mShaderTrace(TRACE, "gl"), + mTextureTrace(TRACE, std::string("gl")), + mTexParameterTrace(TRACE, "gl"), + mDrawTrace(TRACE, "gl"), + mDepthFunctionTrace(TRACE, "gl"), + mStencilFunctionTrace(TRACE, "gl"), + mScissorTrace(TRACE, "gl"), + mSetUniformTrace(TRACE, "Uniform "), + mViewportTrace(TRACE, "gl") { Initialize(); } @@ -43,29 +46,32 @@ TestGlAbstraction::~TestGlAbstraction() void TestGlAbstraction::Initialize() { - mCurrentProgram = 0; - mCompileStatus = GL_TRUE; - mLinkStatus = GL_TRUE; - mNumberOfActiveUniforms = 0; - mGetErrorResult = 0; - mGetStringResult = NULL; - mIsBufferResult = 0; - mIsEnabledResult = 0; - mIsFramebufferResult = 0; - mIsProgramResult = 0; - mIsRenderbufferResult = 0; - mIsShaderResult = 0; - mIsTextureResult = 0; - mActiveTextureUnit = 0; - mCheckFramebufferStatusResult = 0; - mFramebufferStatus = 0; - mFramebufferDepthAttached = 0; - mFramebufferStencilAttached = 0; - mFramebufferColorAttachmentCount = 0; - mFrameBufferColorStatus = 0; - mNumBinaryFormats = 0; - mBinaryFormats = 0; - mProgramBinaryLength = 0; + mCurrentProgram = 0; + mCompileStatus = GL_TRUE; + mLinkStatus = GL_TRUE; + mGetErrorResult = 0; + mGetStringResult = NULL; + mIsBufferResult = 0; + mIsEnabledResult = 0; + mIsFramebufferResult = 0; + mIsProgramResult = 0; + mIsRenderbufferResult = 0; + mIsShaderResult = 0; + mIsTextureResult = 0; + mActiveTextureUnit = 0; + mCheckFramebufferStatusResult = 0; + mFramebufferStatus = 0; + mFramebufferDepthAttached = 0; + mFramebufferStencilAttached = 0; + mFramebufferDepthStencilAttached = 0; + mFramebufferColorAttachmentCount = 0; + mFrameBufferColorStatus = 0; + mFramebufferDepthAttachmentCount = 0; + mFramebufferStencilAttachmentCount = 0; + mFramebufferDepthStencilAttachmentCount = 0; + mNumBinaryFormats = 0; + mBinaryFormats = 0; + mProgramBinaryLength = 0; mVertexAttribArrayChanged = false; mGetProgramBinaryCalled = false; @@ -112,6 +118,34 @@ void TestGlAbstraction::Initialize() { mVertexAttribArrayState[i] = false; } + + mActiveUniforms = std::vector{ + {"uRendererColor", GL_FLOAT, 1}, + {"uCustom", GL_FLOAT_VEC3, 1}, + {"uCustom3", GL_FLOAT_VEC3, 1}, + {"uFadeColor", GL_FLOAT_VEC4, 1}, + {"uUniform1", GL_FLOAT_VEC4, 1}, + {"uUniform2", GL_FLOAT_VEC4, 1}, + {"uUniform3", GL_FLOAT_VEC4, 1}, + {"uFadeProgress", GL_FLOAT, 1}, + {"uANormalMatrix", GL_FLOAT_MAT3, 1}, + {"sEffect", GL_SAMPLER_2D, 1}, + {"sTexture", GL_SAMPLER_2D, 1}, + {"sTextureRect", GL_SAMPLER_2D, 1}, + {"sGloss", GL_SAMPLER_2D, 1}, + {"uColor", GL_FLOAT_VEC4, 1}, + {"uActorColor", GL_FLOAT_VEC4, 1}, + {"uModelMatrix", GL_FLOAT_MAT4, 1}, + {"uModelView", GL_FLOAT_MAT4, 1}, + {"uMvpMatrix", GL_FLOAT_MAT4, 1}, + {"uNormalMatrix", GL_FLOAT_MAT4, 1}, + {"uProjection", GL_FLOAT_MAT4, 1}, + {"uSize", GL_FLOAT_VEC3, 1}, + {"uViewMatrix", GL_FLOAT_MAT4, 1}, + {"uLightCameraProjectionMatrix", GL_FLOAT_MAT4, 1}, + {"uLightCameraViewMatrix", GL_FLOAT_MAT4, 1}}; + + // WARNING: IF YOU CHANGE THIS LIST, ALSO CHANGE UNIFORMS IN test-graphics-reflection.cpp } void TestGlAbstraction::PreRender()