The stringstream used is now part of the generator class.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent 7384cdd10a
commit c49265b9db

@ -107,11 +107,14 @@ namespace NL3D
{ {
material = NULL; material = NULL;
vbFormat = 0; vbFormat = 0;
ss.str( "" );
ss.clear();
} }
void CGLSLShaderGenerator::generateVS( std::string &vs ) void CGLSLShaderGenerator::generateVS( std::string &vs )
{ {
std::stringstream ss; ss.str( "" );
ss.clear();
ss << "#version 330" << std::endl; ss << "#version 330" << std::endl;
ss << "uniform mat4 mvpMatrix;" << std::endl; ss << "uniform mat4 mvpMatrix;" << std::endl;
@ -163,7 +166,8 @@ namespace NL3D
void CGLSLShaderGenerator::generatePS( std::string &ps ) void CGLSLShaderGenerator::generatePS( std::string &ps )
{ {
std::stringstream ss; ss.str( "" );
ss.clear();
ss << "#version 330" << std::endl; ss << "#version 330" << std::endl;
ss << std::endl; ss << std::endl;

@ -19,6 +19,7 @@
#define GLSL_SHADER_GENERATOR #define GLSL_SHADER_GENERATOR
#include <string> #include <string>
#include <sstream>
namespace NL3D namespace NL3D
{ {
@ -38,6 +39,7 @@ namespace NL3D
void setVBFormat( uint16 format ){ vbFormat = format; } void setVBFormat( uint16 format ){ vbFormat = format; }
private: private:
std::stringstream ss;
uint16 vbFormat; uint16 vbFormat;
CMaterial const *material; CMaterial const *material;
}; };

Loading…
Cancel
Save