Skip to content

filipwasil/glmock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mock for Opengl functions. It uses GoogleMock for mocking opengl.

Prerequisites:

  • OpenGL
  • GoogleMock
  • GoogleTest

Build:

mkdir build
cd build
cmake ../
make

Usage:

#include "glmock.hpp"
TEST(ShaderLoaderTest, load_shader_from_file)
{
   GlMock mock;
   const GLuint vertextShaderId = 1;
   EXPECT_CALL(mock, gl_CreateShader(GL_VERTEX_SHADER)).WillOnce(Return(vertexShaderId));
}

You can generate new GLmock using generate_glmock.py. Script can generate mocks also for GLES.

About

Opengl mock using GoogleMock

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.9%
  • Python 6.0%
  • CMake 0.1%