Merge pull request #933 from BeamNG/shadergen_glsl

Changes on ShaderGen for generate GLSL shaders.
This commit is contained in:
LuisAntonRebollo 2014-11-30 02:22:58 +01:00
commit 82315a9960
4 changed files with 20 additions and 18 deletions

View file

@ -409,13 +409,13 @@ void ShaderGen::_printVertShader( Stream &stream )
_printFeatureList(stream);
// print out structures
mComponents[C_VERT_STRUCT]->print( stream );
mComponents[C_CONNECTOR]->print( stream );
mComponents[C_VERT_STRUCT]->print( stream, true );
mComponents[C_CONNECTOR]->print( stream, true );
mPrinter->printMainComment(stream);
mComponents[C_VERT_MAIN]->print( stream );
mComponents[C_VERT_MAIN]->print( stream, true );
mComponents[C_VERT_STRUCT]->printOnMain( stream, true );
// print out the function
_printFeatures( stream );
@ -430,12 +430,13 @@ void ShaderGen::_printPixShader( Stream &stream )
_printDependencies(stream); // TODO: Split into vert and pix dependencies?
_printFeatureList(stream);
mComponents[C_CONNECTOR]->print( stream );
mComponents[C_CONNECTOR]->print( stream, false );
mPrinter->printPixelShaderOutputStruct(stream, mFeatureData);
mPrinter->printMainComment(stream);
mComponents[C_PIX_MAIN]->print( stream );
mComponents[C_PIX_MAIN]->print( stream, false );
mComponents[C_CONNECTOR]->printOnMain( stream, false );
// print out the function
_printFeatures( stream );