opensurgsim
Classes | Namespaces | Functions
OsgMaterialTests.cpp File Reference

Tests for the OsgMaterial class. More...

#include <boost/any.hpp>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "SurgSim/Framework/Runtime.h"
#include "SurgSim/Graphics/OsgMaterial.h"
#include "SurgSim/Graphics/OsgProgram.h"
#include "SurgSim/Graphics/OsgUniform.h"

Classes

class  SurgSim::Graphics::MockUniform
 Uniform that does not subclass OsgUniformBase. More...
 
class  SurgSim::Graphics::MockProgram
 

Namespaces

 SurgSim
 Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui needs glew but we need to call glewInit() from a osg callback, using this call we avoid getting warnings about redefinitions.
 

Functions

 SurgSim::Graphics::TEST (OsgMaterialTests, InitTest)
 
 SurgSim::Graphics::TEST (OsgMaterialTests, AddUniformTest)
 
 SurgSim::Graphics::TEST (OsgMaterialTests, AddAndRemoveUniformsTest)
 
 SurgSim::Graphics::TEST (OsgMaterialTests, SetAndClearShaderTest)
 
 SurgSim::Graphics::TEST (OsgMaterialTests, NamedAccessTest)
 
 SurgSim::Graphics::TEST (OsgMaterialTests, AccessibleUniformTest)
 

Detailed Description

Tests for the OsgMaterial class.

Function Documentation

§ TEST() [1/2]

SurgSim::Graphics::TEST ( OsgMaterialTests  ,
AddAndRemoveUniformsTest   
)

Add another uniform to the material

Remove the first uniform from the material

Try removing the same uniform again

Try adding a non-OSG Uniform

Try removing a non-OSG Uniform

§ TEST() [2/2]

SurgSim::Graphics::TEST ( OsgMaterialTests  ,
SetAndClearShaderTest   
)

Try setting a non-OSG Program

Clear the program