forked from organicmaps/organicmaps-tmp
[gl] Mock functions.
This commit is contained in:
parent
6112d763a9
commit
a39969c740
3 changed files with 11 additions and 4 deletions
|
@ -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() {}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -60,8 +60,10 @@ GpuProgram::GpuProgram(RefPointer<Shader> vertexShader, RefPointer<Shader> 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()
|
||||
|
|
Loading…
Add table
Reference in a new issue