diff --git a/drape/drape_tests/glfunctions.cpp b/drape/drape_tests/glfunctions.cpp index 263150da5c..5711ff5cd3 100644 --- a/drape/drape_tests/glfunctions.cpp +++ b/drape/drape_tests/glfunctions.cpp @@ -185,14 +185,13 @@ bool GLFunctions::glHasExtension(string const & extName) int32_t GLFunctions::glGetProgramiv(uint32_t program, glConst paramname) { - // TODO: implement mock function - return 0; + return MOCK_CALL(glGetProgramiv(program, paramname)); } void GLFunctions::glGetActiveUniform(uint32_t programID, uint32_t uniformIndex, int32_t *uniformSize, glConst *type, string &name) { - // TODO: implement mock function + MOCK_CALL(glGetActiveUniform(programID, uniformIndex, uniformSize, type, name)); } void CheckGLError() {} diff --git a/drape/drape_tests/glmock_functions.hpp b/drape/drape_tests/glmock_functions.hpp index 9d2d5652c6..9c5bca7a95 100644 --- a/drape/drape_tests/glmock_functions.hpp +++ b/drape/drape_tests/glmock_functions.hpp @@ -63,6 +63,12 @@ namespace emul MOCK_METHOD1(glUseProgram, void(uint32_t programID)); MOCK_METHOD1(glHasExtension, bool(string const & extName)); + MOCK_METHOD2(glGetProgramiv, int32_t(uint32_t, glConst)); + + MOCK_METHOD5(glGetActiveUniform, void(uint32_t, uint32_t, + int32_t*, glConst *, + string &)); + private: static GLMockFunctions * m_mock; }; diff --git a/drape/gpu_program.cpp b/drape/gpu_program.cpp index a93194405d..04b65ae114 100644 --- a/drape/gpu_program.cpp +++ b/drape/gpu_program.cpp @@ -60,8 +60,10 @@ GpuProgram::GpuProgram(RefPointer vertexShader, RefPointer fragm GLFunctions::glDetachShader(m_programID, vertexShader->GetID()); GLFunctions::glDetachShader(m_programID, fragmentShader->GetID()); - //get uniforms info + +#ifdef DEBUG m_validator.reset(new UniformValidator(m_programID)); +#endif } GpuProgram::~GpuProgram()