There are two "ways" to get stuff out:
1) out type instName; // one var - where type is any type (float, vector, matrix ... and even structs)
2) out blockName { ... } instName; // multiple vars (aka. interface block)
Separating the declaration of the struct type and its instantiations should not matter with non-broken compilers.
edit: I doubt there is any real difference between using a struct in in/out or an interface block as far as interface is concerned (if you leave "out" out of the struct declaration then you can use it for non-interface business too - that is not an option for interface blocks obviously).
PS. your use of separate floats for red, green, blue is a bit alarming: one should prefer vectors to avoid extra work for rasterizer.
Show differencesHistory of post edits
#1tanzanite7
Posted 02 April 2012 - 07:25 PM
There are two "ways" to get stuff out:
1) out type instName; // one var - where type is any type (float, vector, matrix ... and even structs)
2) out blockName { ... } instName; // multiple vars (aka. interface block)
Separating the declaration of the struct type and its instantiations should not matter with non-broken compilers.
PS. your use of separate floats for red, green, blue is a bit alarming: one should prefer vectors to avoid extra work for rasterizer.
1) out type instName; // one var - where type is any type (float, vector, matrix ... and even structs)
2) out blockName { ... } instName; // multiple vars (aka. interface block)
Separating the declaration of the struct type and its instantiations should not matter with non-broken compilers.
PS. your use of separate floats for red, green, blue is a bit alarming: one should prefer vectors to avoid extra work for rasterizer.