X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tests%2Fglsl%2Ffunction_override.glsl;fp=tests%2Fglsl%2Ffunction_override.glsl;h=c7e64d5233920f6a9b55b7a84b481e000016d88b;hb=6dcf74922f46b086ad394c19fd6ce083a635b290;hp=0000000000000000000000000000000000000000;hpb=713ff9619daa858ffbd428f7699cd57598563dbd;p=libs%2Fgl.git diff --git a/tests/glsl/function_override.glsl b/tests/glsl/function_override.glsl new file mode 100644 index 00000000..c7e64d52 --- /dev/null +++ b/tests/glsl/function_override.glsl @@ -0,0 +1,22 @@ +#pragma MSP stage(vertex) +layout(location=0) in vec4 position; +virtual float get_scale() +{ + return 1.0; +} +int main() +{ + gl_Position = position*get_scale(); +} +float get_scale() override +{ + return 2.0; +} + +/* Expected output: vertex +layout(location=0) in vec4 position; +int main() +{ + gl_Position = position*2.0; +} +*/