HLSL: Implement member functions calling member functions.

This commit is contained in:
John Kessenich
2017-05-16 23:16:26 -06:00
parent b29cc30cdb
commit 0a2a0cd3a4
7 changed files with 351 additions and 19 deletions

View File

@@ -0,0 +1,16 @@
float method3(float a) { return 1.0; }
struct myContext {
float method1() { return method2(); }
float method2() { return method3(1.0); }
float method3(float a) { return method4(a, a); }
float method4(float a, float b) { return a + b + f; }
float f;
};
float4 main() : SV_TARGET0
{
myContext context;
context.f = 3.0;
return (float4)context.method1();
}