#include <map>
#include <cstdio>
#include <cstring> // for strcmp
+#include <typeinfo>
// INTERNAL INCLUDES
#include <dali/public-api/dali-core.h>
#include <dali/integration-api/core.h>
#include <dali/integration-api/gl-abstraction.h>
#include <dali/integration-api/gl-defines.h>
-#include "test-trace-call-stack.h"
+#include <test-trace-call-stack.h>
+#include <test-compare-types.h>
namespace Dali
{
inline void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
{
const std::string shaderSource = mShaderSources[shader];
- if( static_cast<int>(shaderSource.length()) < bufsize )
+ const int shaderSourceLength = static_cast<int>(shaderSource.length());
+ if( shaderSourceLength < bufsize )
{
- strcpy(source, shaderSource.c_str());
- *length = shaderSource.length();
+ strncpy( source, shaderSource.c_str(), shaderSourceLength );
+ *length = shaderSourceLength;
}
else
{
T uniformValue;
if ( GetUniformValue( program, uniform, uniformValue ) )
{
- return value == uniformValue;
+ return CompareType<T>(value, uniformValue, Math::MACHINE_EPSILON_10);
}
return false;
ProgramUniformValue<Matrix> mProgramUniformsMat4;
ProgramUniformValue<Matrix3> mProgramUniformsMat3;
+
+
+
inline const ProgramUniformValue<int>& GetProgramUniformsForType( const int ) const
{
return mProgramUniforms1i;