diff --git a/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp b/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp index 04b622a69..4ad7c09e7 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp @@ -107,11 +107,14 @@ namespace NL3D { material = NULL; vbFormat = 0; + ss.str( "" ); + ss.clear(); } void CGLSLShaderGenerator::generateVS( std::string &vs ) { - std::stringstream ss; + ss.str( "" ); + ss.clear(); ss << "#version 330" << std::endl; ss << "uniform mat4 mvpMatrix;" << std::endl; @@ -163,7 +166,8 @@ namespace NL3D void CGLSLShaderGenerator::generatePS( std::string &ps ) { - std::stringstream ss; + ss.str( "" ); + ss.clear(); ss << "#version 330" << std::endl; ss << std::endl; diff --git a/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.h b/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.h index 9246b6a5e..45d1eaa94 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.h +++ b/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.h @@ -19,6 +19,7 @@ #define GLSL_SHADER_GENERATOR #include +#include namespace NL3D { @@ -38,6 +39,7 @@ namespace NL3D void setVBFormat( uint16 format ){ vbFormat = format; } private: + std::stringstream ss; uint16 vbFormat; CMaterial const *material; };