added code to deal with #extension for shader, added int64 and uint64 support

This commit is contained in:
d-a-heitbrink
2017-01-13 09:33:49 -06:00
parent fee45b7c46
commit 18369bed2d
3 changed files with 200 additions and 3 deletions

View File

@@ -1226,6 +1226,13 @@ bool State::convertVertexShaderSourceToOsgBuiltIns(std::string& source) const
declPos = 0;
}
std::string::size_type extPos = source.rfind( "#extension " );
if ( extPos != std::string::npos )
{
// found the string, now find the next linefeed and set the insertion point after it.
declPos = source.find( '\n', extPos );
declPos = declPos != std::string::npos ? declPos+1 : source.length();
}
if (_useModelViewAndProjectionUniforms)
{
// replace ftransform as it only works with built-ins