summaryrefslogtreecommitdiff
path: root/ddl/out/java
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2016-03-20 22:44:29 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2016-03-21 14:12:02 +0100
commitc5e063b3c9aeff65161e24445e9672daff980b45 (patch)
treef469f6e8eb1a24060b01453f3f23db5c72a4850c /ddl/out/java
parent3b50722f433ec5ecc515ea1441fd633d85118cb9 (diff)
working c# backend
Diffstat (limited to 'ddl/out/java')
-rw-r--r--ddl/out/java/LambdaCube/IR/AccumulationContext.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/ArrayValue.java37
-rw-r--r--ddl/out/java/LambdaCube/IR/Backend.java19
-rw-r--r--ddl/out/java/LambdaCube/IR/BlendEquation.java22
-rw-r--r--ddl/out/java/LambdaCube/IR/Blending.java34
-rw-r--r--ddl/out/java/LambdaCube/IR/BlendingFactor.java32
-rw-r--r--ddl/out/java/LambdaCube/IR/ClearImage.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/ColorArity.java21
-rw-r--r--ddl/out/java/LambdaCube/IR/Command.java87
-rw-r--r--ddl/out/java/LambdaCube/IR/ComparisonFunction.java25
-rw-r--r--ddl/out/java/LambdaCube/IR/CullMode.java28
-rw-r--r--ddl/out/java/LambdaCube/IR/EdgeMode.java21
-rw-r--r--ddl/out/java/LambdaCube/IR/FetchPrimitive.java22
-rw-r--r--ddl/out/java/LambdaCube/IR/Filter.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/FragmentOperation.java36
-rw-r--r--ddl/out/java/LambdaCube/IR/FrontFace.java19
-rw-r--r--ddl/out/java/LambdaCube/IR/ImageRef.java29
-rw-r--r--ddl/out/java/LambdaCube/IR/ImageSemantic.java20
-rw-r--r--ddl/out/java/LambdaCube/IR/InputType.java78
-rw-r--r--ddl/out/java/LambdaCube/IR/JSON.java1460
-rw-r--r--ddl/out/java/LambdaCube/IR/LogicOperation.java33
-rw-r--r--ddl/out/java/LambdaCube/IR/MipMap.java30
-rw-r--r--ddl/out/java/LambdaCube/IR/OutputPrimitive.java20
-rw-r--r--ddl/out/java/LambdaCube/IR/Parameter.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/Pipeline.java30
-rw-r--r--ddl/out/java/LambdaCube/IR/PointSize.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/PointSpriteCoordOrigin.java19
-rw-r--r--ddl/out/java/LambdaCube/IR/PolygonMode.java28
-rw-r--r--ddl/out/java/LambdaCube/IR/PolygonOffset.java24
-rw-r--r--ddl/out/java/LambdaCube/IR/Program.java28
-rw-r--r--ddl/out/java/LambdaCube/IR/ProvokingVertex.java19
-rw-r--r--ddl/out/java/LambdaCube/IR/RasterContext.java38
-rw-r--r--ddl/out/java/LambdaCube/IR/RenderTarget.java22
-rw-r--r--ddl/out/java/LambdaCube/IR/SamplerDescriptor.java31
-rw-r--r--ddl/out/java/LambdaCube/IR/Slot.java26
-rw-r--r--ddl/out/java/LambdaCube/IR/StencilOperation.java25
-rw-r--r--ddl/out/java/LambdaCube/IR/StencilOps.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/StencilTest.java24
-rw-r--r--ddl/out/java/LambdaCube/IR/StencilTests.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/StreamData.java25
-rw-r--r--ddl/out/java/LambdaCube/IR/TargetItem.java23
-rw-r--r--ddl/out/java/LambdaCube/IR/TextureDataType.java33
-rw-r--r--ddl/out/java/LambdaCube/IR/TextureDescriptor.java27
-rw-r--r--ddl/out/java/LambdaCube/IR/TextureType.java57
-rw-r--r--ddl/out/java/LambdaCube/IR/Value.java142
-rw-r--r--ddl/out/java/LambdaCube/Mesh/JSON.java206
-rw-r--r--ddl/out/java/LambdaCube/Mesh/Mesh.java23
-rw-r--r--ddl/out/java/LambdaCube/Mesh/MeshAttribute.java62
-rw-r--r--ddl/out/java/LambdaCube/Mesh/MeshPrimitive.java30
-rw-r--r--ddl/out/java/LambdaCube/PipelineSchema/JSON.java122
-rw-r--r--ddl/out/java/LambdaCube/PipelineSchema/ObjectArraySchema.java24
-rw-r--r--ddl/out/java/LambdaCube/PipelineSchema/PipelineSchema.java24
-rw-r--r--ddl/out/java/LambdaCube/PipelineSchema/StreamType.java39
-rw-r--r--ddl/out/java/LambdaCube/TypeInfo/CompileResult.java32
-rw-r--r--ddl/out/java/LambdaCube/TypeInfo/JSON.java85
-rw-r--r--ddl/out/java/LambdaCube/TypeInfo/Range.java26
-rw-r--r--ddl/out/java/LambdaCube/TypeInfo/TypeInfo.java24
-rw-r--r--ddl/out/java/TestData/ClientInfo.java26
-rw-r--r--ddl/out/java/TestData/Frame.java27
-rw-r--r--ddl/out/java/TestData/FrameResult.java27
-rw-r--r--ddl/out/java/TestData/JSON.java193
-rw-r--r--ddl/out/java/TestData/PipelineInfo.java26
-rw-r--r--ddl/out/java/TestData/RenderJob.java29
-rw-r--r--ddl/out/java/TestData/RenderJobResult.java30
-rw-r--r--ddl/out/java/TestData/Scene.java28
65 files changed, 3938 insertions, 0 deletions
diff --git a/ddl/out/java/LambdaCube/IR/AccumulationContext.java b/ddl/out/java/LambdaCube/IR/AccumulationContext.java
new file mode 100644
index 0000000..a190597
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/AccumulationContext.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class AccumulationContext {
12 public enum Tag {
13 AccumulationContext
14 }
15 public Tag tag;
16
17 public class AccumulationContext_ extends AccumulationContext {
18 public Maybe<String> accViewportName;
19 public ArrayList<FragmentOperation> accOperations;
20 public AccumulationContext_() { tag = AccumulationContext.Tag.AccumulationContext; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/ArrayValue.java b/ddl/out/java/LambdaCube/IR/ArrayValue.java
new file mode 100644
index 0000000..b176300
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/ArrayValue.java
@@ -0,0 +1,37 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class ArrayValue {
12 public enum Tag {
13 VBoolArray,
14 VIntArray,
15 VWordArray,
16 VFloatArray
17 }
18 public Tag tag;
19
20 public class VBoolArray_ extends ArrayValue {
21 public ArrayList<Boolean> _0;
22 public VBoolArray_() { tag = ArrayValue.Tag.VBoolArray; }
23 }
24 public class VIntArray_ extends ArrayValue {
25 public ArrayList<Integer> _0;
26 public VIntArray_() { tag = ArrayValue.Tag.VIntArray; }
27 }
28 public class VWordArray_ extends ArrayValue {
29 public ArrayList<Integer> _0;
30 public VWordArray_() { tag = ArrayValue.Tag.VWordArray; }
31 }
32 public class VFloatArray_ extends ArrayValue {
33 public ArrayList<Float> _0;
34 public VFloatArray_() { tag = ArrayValue.Tag.VFloatArray; }
35 }
36}
37
diff --git a/ddl/out/java/LambdaCube/IR/Backend.java b/ddl/out/java/LambdaCube/IR/Backend.java
new file mode 100644
index 0000000..bbe74b8
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Backend.java
@@ -0,0 +1,19 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Backend {
12 public enum Tag {
13 WebGL1,
14 OpenGL33
15 }
16 public Tag tag;
17
18}
19
diff --git a/ddl/out/java/LambdaCube/IR/BlendEquation.java b/ddl/out/java/LambdaCube/IR/BlendEquation.java
new file mode 100644
index 0000000..6dd1523
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/BlendEquation.java
@@ -0,0 +1,22 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class BlendEquation {
12 public enum Tag {
13 FuncAdd,
14 FuncSubtract,
15 FuncReverseSubtract,
16 Min,
17 Max
18 }
19 public Tag tag;
20
21}
22
diff --git a/ddl/out/java/LambdaCube/IR/Blending.java b/ddl/out/java/LambdaCube/IR/Blending.java
new file mode 100644
index 0000000..331ae4e
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Blending.java
@@ -0,0 +1,34 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Blending {
12 public enum Tag {
13 NoBlending,
14 BlendLogicOp,
15 Blend
16 }
17 public Tag tag;
18
19 public class BlendLogicOp_ extends Blending {
20 public LogicOperation _0;
21 public BlendLogicOp_() { tag = Blending.Tag.BlendLogicOp; }
22 }
23 public class Blend_ extends Blending {
24 public BlendEquation colorEqSrc;
25 public BlendEquation alphaEqSrc;
26 public BlendingFactor colorFSrc;
27 public BlendingFactor colorFDst;
28 public BlendingFactor alphaFSrc;
29 public BlendingFactor alphaFDst;
30 public V4<Float> color;
31 public Blend_() { tag = Blending.Tag.Blend; }
32 }
33}
34
diff --git a/ddl/out/java/LambdaCube/IR/BlendingFactor.java b/ddl/out/java/LambdaCube/IR/BlendingFactor.java
new file mode 100644
index 0000000..fe73075
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/BlendingFactor.java
@@ -0,0 +1,32 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class BlendingFactor {
12 public enum Tag {
13 Zero,
14 One,
15 SrcColor,
16 OneMinusSrcColor,
17 DstColor,
18 OneMinusDstColor,
19 SrcAlpha,
20 OneMinusSrcAlpha,
21 DstAlpha,
22 OneMinusDstAlpha,
23 ConstantColor,
24 OneMinusConstantColor,
25 ConstantAlpha,
26 OneMinusConstantAlpha,
27 SrcAlphaSaturate
28 }
29 public Tag tag;
30
31}
32
diff --git a/ddl/out/java/LambdaCube/IR/ClearImage.java b/ddl/out/java/LambdaCube/IR/ClearImage.java
new file mode 100644
index 0000000..64491e9
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/ClearImage.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class ClearImage {
12 public enum Tag {
13 ClearImage
14 }
15 public Tag tag;
16
17 public class ClearImage_ extends ClearImage {
18 public ImageSemantic imageSemantic;
19 public Value clearValue;
20 public ClearImage_() { tag = ClearImage.Tag.ClearImage; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/ColorArity.java b/ddl/out/java/LambdaCube/IR/ColorArity.java
new file mode 100644
index 0000000..77ba1a0
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/ColorArity.java
@@ -0,0 +1,21 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class ColorArity {
12 public enum Tag {
13 Red,
14 RG,
15 RGB,
16 RGBA
17 }
18 public Tag tag;
19
20}
21
diff --git a/ddl/out/java/LambdaCube/IR/Command.java b/ddl/out/java/LambdaCube/IR/Command.java
new file mode 100644
index 0000000..90ec2c5
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Command.java
@@ -0,0 +1,87 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Command {
12 public enum Tag {
13 SetRasterContext,
14 SetAccumulationContext,
15 SetRenderTarget,
16 SetProgram,
17 SetSamplerUniform,
18 SetTexture,
19 SetSampler,
20 RenderSlot,
21 RenderStream,
22 ClearRenderTarget,
23 GenerateMipMap,
24 SaveImage,
25 LoadImage
26 }
27 public Tag tag;
28
29 public class SetRasterContext_ extends Command {
30 public RasterContext _0;
31 public SetRasterContext_() { tag = Command.Tag.SetRasterContext; }
32 }
33 public class SetAccumulationContext_ extends Command {
34 public AccumulationContext _0;
35 public SetAccumulationContext_() { tag = Command.Tag.SetAccumulationContext; }
36 }
37 public class SetRenderTarget_ extends Command {
38 public Integer _0;
39 public SetRenderTarget_() { tag = Command.Tag.SetRenderTarget; }
40 }
41 public class SetProgram_ extends Command {
42 public Integer _0;
43 public SetProgram_() { tag = Command.Tag.SetProgram; }
44 }
45 public class SetSamplerUniform_ extends Command {
46 public String _0;
47 public Integer _1;
48 public SetSamplerUniform_() { tag = Command.Tag.SetSamplerUniform; }
49 }
50 public class SetTexture_ extends Command {
51 public Integer _0;
52 public Integer _1;
53 public SetTexture_() { tag = Command.Tag.SetTexture; }
54 }
55 public class SetSampler_ extends Command {
56 public Integer _0;
57 public Maybe<Integer> _1;
58 public SetSampler_() { tag = Command.Tag.SetSampler; }
59 }
60 public class RenderSlot_ extends Command {
61 public Integer _0;
62 public RenderSlot_() { tag = Command.Tag.RenderSlot; }
63 }
64 public class RenderStream_ extends Command {
65 public Integer _0;
66 public RenderStream_() { tag = Command.Tag.RenderStream; }
67 }
68 public class ClearRenderTarget_ extends Command {
69 public ArrayList<ClearImage> _0;
70 public ClearRenderTarget_() { tag = Command.Tag.ClearRenderTarget; }
71 }
72 public class GenerateMipMap_ extends Command {
73 public Integer _0;
74 public GenerateMipMap_() { tag = Command.Tag.GenerateMipMap; }
75 }
76 public class SaveImage_ extends Command {
77 public Integer _0;
78 public ImageRef _1;
79 public SaveImage_() { tag = Command.Tag.SaveImage; }
80 }
81 public class LoadImage_ extends Command {
82 public ImageRef _0;
83 public Integer _1;
84 public LoadImage_() { tag = Command.Tag.LoadImage; }
85 }
86}
87
diff --git a/ddl/out/java/LambdaCube/IR/ComparisonFunction.java b/ddl/out/java/LambdaCube/IR/ComparisonFunction.java
new file mode 100644
index 0000000..d3c5112
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/ComparisonFunction.java
@@ -0,0 +1,25 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class ComparisonFunction {
12 public enum Tag {
13 Never,
14 Less,
15 Equal,
16 Lequal,
17 Greater,
18 Notequal,
19 Gequal,
20 Always
21 }
22 public Tag tag;
23
24}
25
diff --git a/ddl/out/java/LambdaCube/IR/CullMode.java b/ddl/out/java/LambdaCube/IR/CullMode.java
new file mode 100644
index 0000000..f2ce3a8
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/CullMode.java
@@ -0,0 +1,28 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class CullMode {
12 public enum Tag {
13 CullNone,
14 CullFront,
15 CullBack
16 }
17 public Tag tag;
18
19 public class CullFront_ extends CullMode {
20 public FrontFace _0;
21 public CullFront_() { tag = CullMode.Tag.CullFront; }
22 }
23 public class CullBack_ extends CullMode {
24 public FrontFace _0;
25 public CullBack_() { tag = CullMode.Tag.CullBack; }
26 }
27}
28
diff --git a/ddl/out/java/LambdaCube/IR/EdgeMode.java b/ddl/out/java/LambdaCube/IR/EdgeMode.java
new file mode 100644
index 0000000..19a8eba
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/EdgeMode.java
@@ -0,0 +1,21 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class EdgeMode {
12 public enum Tag {
13 Repeat,
14 MirroredRepeat,
15 ClampToEdge,
16 ClampToBorder
17 }
18 public Tag tag;
19
20}
21
diff --git a/ddl/out/java/LambdaCube/IR/FetchPrimitive.java b/ddl/out/java/LambdaCube/IR/FetchPrimitive.java
new file mode 100644
index 0000000..16453bc
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/FetchPrimitive.java
@@ -0,0 +1,22 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class FetchPrimitive {
12 public enum Tag {
13 Points,
14 Lines,
15 Triangles,
16 LinesAdjacency,
17 TrianglesAdjacency
18 }
19 public Tag tag;
20
21}
22
diff --git a/ddl/out/java/LambdaCube/IR/Filter.java b/ddl/out/java/LambdaCube/IR/Filter.java
new file mode 100644
index 0000000..4bd3b7c
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Filter.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Filter {
12 public enum Tag {
13 Nearest,
14 Linear,
15 NearestMipmapNearest,
16 NearestMipmapLinear,
17 LinearMipmapNearest,
18 LinearMipmapLinear
19 }
20 public Tag tag;
21
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/FragmentOperation.java b/ddl/out/java/LambdaCube/IR/FragmentOperation.java
new file mode 100644
index 0000000..35aa5a9
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/FragmentOperation.java
@@ -0,0 +1,36 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class FragmentOperation {
12 public enum Tag {
13 DepthOp,
14 StencilOp,
15 ColorOp
16 }
17 public Tag tag;
18
19 public class DepthOp_ extends FragmentOperation {
20 public ComparisonFunction _0;
21 public Boolean _1;
22 public DepthOp_() { tag = FragmentOperation.Tag.DepthOp; }
23 }
24 public class StencilOp_ extends FragmentOperation {
25 public StencilTests _0;
26 public StencilOps _1;
27 public StencilOps _2;
28 public StencilOp_() { tag = FragmentOperation.Tag.StencilOp; }
29 }
30 public class ColorOp_ extends FragmentOperation {
31 public Blending _0;
32 public Value _1;
33 public ColorOp_() { tag = FragmentOperation.Tag.ColorOp; }
34 }
35}
36
diff --git a/ddl/out/java/LambdaCube/IR/FrontFace.java b/ddl/out/java/LambdaCube/IR/FrontFace.java
new file mode 100644
index 0000000..dff345f
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/FrontFace.java
@@ -0,0 +1,19 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class FrontFace {
12 public enum Tag {
13 CCW,
14 CW
15 }
16 public Tag tag;
17
18}
19
diff --git a/ddl/out/java/LambdaCube/IR/ImageRef.java b/ddl/out/java/LambdaCube/IR/ImageRef.java
new file mode 100644
index 0000000..51385dc
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/ImageRef.java
@@ -0,0 +1,29 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class ImageRef {
12 public enum Tag {
13 TextureImage,
14 Framebuffer
15 }
16 public Tag tag;
17
18 public class TextureImage_ extends ImageRef {
19 public Integer _0;
20 public Integer _1;
21 public Maybe<Integer> _2;
22 public TextureImage_() { tag = ImageRef.Tag.TextureImage; }
23 }
24 public class Framebuffer_ extends ImageRef {
25 public ImageSemantic _0;
26 public Framebuffer_() { tag = ImageRef.Tag.Framebuffer; }
27 }
28}
29
diff --git a/ddl/out/java/LambdaCube/IR/ImageSemantic.java b/ddl/out/java/LambdaCube/IR/ImageSemantic.java
new file mode 100644
index 0000000..22aea08
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/ImageSemantic.java
@@ -0,0 +1,20 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class ImageSemantic {
12 public enum Tag {
13 Depth,
14 Stencil,
15 Color
16 }
17 public Tag tag;
18
19}
20
diff --git a/ddl/out/java/LambdaCube/IR/InputType.java b/ddl/out/java/LambdaCube/IR/InputType.java
new file mode 100644
index 0000000..f8764d1
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/InputType.java
@@ -0,0 +1,78 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class InputType {
12 public enum Tag {
13 Bool,
14 V2B,
15 V3B,
16 V4B,
17 Word,
18 V2U,
19 V3U,
20 V4U,
21 Int,
22 V2I,
23 V3I,
24 V4I,
25 Float,
26 V2F,
27 V3F,
28 V4F,
29 M22F,
30 M23F,
31 M24F,
32 M32F,
33 M33F,
34 M34F,
35 M42F,
36 M43F,
37 M44F,
38 STexture1D,
39 STexture2D,
40 STextureCube,
41 STexture1DArray,
42 STexture2DArray,
43 STexture2DRect,
44 FTexture1D,
45 FTexture2D,
46 FTexture3D,
47 FTextureCube,
48 FTexture1DArray,
49 FTexture2DArray,
50 FTexture2DMS,
51 FTexture2DMSArray,
52 FTextureBuffer,
53 FTexture2DRect,
54 ITexture1D,
55 ITexture2D,
56 ITexture3D,
57 ITextureCube,
58 ITexture1DArray,
59 ITexture2DArray,
60 ITexture2DMS,
61 ITexture2DMSArray,
62 ITextureBuffer,
63 ITexture2DRect,
64 UTexture1D,
65 UTexture2D,
66 UTexture3D,
67 UTextureCube,
68 UTexture1DArray,
69 UTexture2DArray,
70 UTexture2DMS,
71 UTexture2DMSArray,
72 UTextureBuffer,
73 UTexture2DRect
74 }
75 public Tag tag;
76
77}
78
diff --git a/ddl/out/java/LambdaCube/IR/JSON.java b/ddl/out/java/LambdaCube/IR/JSON.java
new file mode 100644
index 0000000..3515e25
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/JSON.java
@@ -0,0 +1,1460 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import org.json.*;
9import RT.*;
10
11
12public class JSON {
13 // JSON deserializer
14 public enum Type {
15 Int,
16 Int32,
17 Word,
18 Word32,
19 Float,
20 Bool,
21 String,
22 V2_Int,
23 V2_Word,
24 V2_Float,
25 V2_Bool,
26 V2_V2_Float,
27 V2_V3_Float,
28 V2_V4_Float,
29 V3_Int,
30 V3_Word,
31 V3_Float,
32 V3_Bool,
33 V3_V2_Float,
34 V3_V3_Float,
35 V3_V4_Float,
36 V4_Int,
37 V4_Word,
38 V4_Float,
39 V4_Bool,
40 V4_V2_Float,
41 V4_V3_Float,
42 V4_V4_Float,
43 Array_Int,
44 Array_Int32,
45 Array_Word32,
46 Array_Float,
47 Array_Bool,
48 Array_ClearImage,
49 Array_Command,
50 Array_Parameter,
51 Array_Program,
52 Array_RenderTarget,
53 Array_SamplerDescriptor,
54 Array_Slot,
55 Array_StreamData,
56 Array_TargetItem,
57 Array_TextureDescriptor,
58 List_FragmentOperation,
59 Maybe_Int,
60 Maybe_Float,
61 Maybe_String,
62 Maybe_ComparisonFunction,
63 Maybe_EdgeMode,
64 Maybe_ImageRef,
65 Map_String_ArrayValue,
66 Map_String_InputType,
67 Map_String_Parameter,
68 AccumulationContext,
69 ArrayValue,
70 Backend,
71 BlendEquation,
72 Blending,
73 BlendingFactor,
74 ClearImage,
75 ColorArity,
76 Command,
77 ComparisonFunction,
78 CullMode,
79 EdgeMode,
80 FetchPrimitive,
81 Filter,
82 FragmentOperation,
83 FrontFace,
84 ImageRef,
85 ImageSemantic,
86 InputType,
87 LogicOperation,
88 MipMap,
89 OutputPrimitive,
90 Parameter,
91 Pipeline,
92 PointSize,
93 PointSpriteCoordOrigin,
94 PolygonMode,
95 PolygonOffset,
96 Program,
97 ProvokingVertex,
98 RasterContext,
99 RenderTarget,
100 SamplerDescriptor,
101 Slot,
102 StencilOperation,
103 StencilOps,
104 StencilTest,
105 StencilTests,
106 StreamData,
107 TargetItem,
108 TextureDataType,
109 TextureDescriptor,
110 TextureType,
111 Value
112 }
113
114 public static Object fromJSON(Type type, Object rawObj) throws JSONException, Exception {
115 switch (type) {
116 case Int: return (Integer)rawObj;
117 case Int32: return (Integer)rawObj;
118 case Word: return (Integer)rawObj;
119 case Word32: return (Integer)rawObj;
120 case Float: return (Float)rawObj;
121 case Bool: return (Boolean)rawObj;
122 case String: return (String)rawObj;
123 case V2_Int: {
124 JSONObject obj = (JSONObject)rawObj;
125 return new V2<Integer>
126 ( (Integer)fromJSON(Type.Int,obj.get("x"))
127 , (Integer)fromJSON(Type.Int,obj.get("y"))
128 );
129 }
130 case V2_Word: {
131 JSONObject obj = (JSONObject)rawObj;
132 return new V2<Integer>
133 ( (Integer)fromJSON(Type.Word,obj.get("x"))
134 , (Integer)fromJSON(Type.Word,obj.get("y"))
135 );
136 }
137 case V2_Float: {
138 JSONObject obj = (JSONObject)rawObj;
139 return new V2<Float>
140 ( (Float)fromJSON(Type.Float,obj.get("x"))
141 , (Float)fromJSON(Type.Float,obj.get("y"))
142 );
143 }
144 case V2_Bool: {
145 JSONObject obj = (JSONObject)rawObj;
146 return new V2<Boolean>
147 ( (Boolean)fromJSON(Type.Bool,obj.get("x"))
148 , (Boolean)fromJSON(Type.Bool,obj.get("y"))
149 );
150 }
151 case V2_V2_Float: {
152 JSONObject obj = (JSONObject)rawObj;
153 return new V2<V2<Float>>
154 ( (V2<Float>)fromJSON(Type.V2_Float,obj.get("x"))
155 , (V2<Float>)fromJSON(Type.V2_Float,obj.get("y"))
156 );
157 }
158 case V2_V3_Float: {
159 JSONObject obj = (JSONObject)rawObj;
160 return new V2<V3<Float>>
161 ( (V3<Float>)fromJSON(Type.V3_Float,obj.get("x"))
162 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("y"))
163 );
164 }
165 case V2_V4_Float: {
166 JSONObject obj = (JSONObject)rawObj;
167 return new V2<V4<Float>>
168 ( (V4<Float>)fromJSON(Type.V4_Float,obj.get("x"))
169 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("y"))
170 );
171 }
172 case V3_Int: {
173 JSONObject obj = (JSONObject)rawObj;
174 return new V3<Integer>
175 ( (Integer)fromJSON(Type.Int,obj.get("x"))
176 , (Integer)fromJSON(Type.Int,obj.get("y"))
177 , (Integer)fromJSON(Type.Int,obj.get("z"))
178 );
179 }
180 case V3_Word: {
181 JSONObject obj = (JSONObject)rawObj;
182 return new V3<Integer>
183 ( (Integer)fromJSON(Type.Word,obj.get("x"))
184 , (Integer)fromJSON(Type.Word,obj.get("y"))
185 , (Integer)fromJSON(Type.Word,obj.get("z"))
186 );
187 }
188 case V3_Float: {
189 JSONObject obj = (JSONObject)rawObj;
190 return new V3<Float>
191 ( (Float)fromJSON(Type.Float,obj.get("x"))
192 , (Float)fromJSON(Type.Float,obj.get("y"))
193 , (Float)fromJSON(Type.Float,obj.get("z"))
194 );
195 }
196 case V3_Bool: {
197 JSONObject obj = (JSONObject)rawObj;
198 return new V3<Boolean>
199 ( (Boolean)fromJSON(Type.Bool,obj.get("x"))
200 , (Boolean)fromJSON(Type.Bool,obj.get("y"))
201 , (Boolean)fromJSON(Type.Bool,obj.get("z"))
202 );
203 }
204 case V3_V2_Float: {
205 JSONObject obj = (JSONObject)rawObj;
206 return new V3<V2<Float>>
207 ( (V2<Float>)fromJSON(Type.V2_Float,obj.get("x"))
208 , (V2<Float>)fromJSON(Type.V2_Float,obj.get("y"))
209 , (V2<Float>)fromJSON(Type.V2_Float,obj.get("z"))
210 );
211 }
212 case V3_V3_Float: {
213 JSONObject obj = (JSONObject)rawObj;
214 return new V3<V3<Float>>
215 ( (V3<Float>)fromJSON(Type.V3_Float,obj.get("x"))
216 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("y"))
217 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("z"))
218 );
219 }
220 case V3_V4_Float: {
221 JSONObject obj = (JSONObject)rawObj;
222 return new V3<V4<Float>>
223 ( (V4<Float>)fromJSON(Type.V4_Float,obj.get("x"))
224 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("y"))
225 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("z"))
226 );
227 }
228 case V4_Int: {
229 JSONObject obj = (JSONObject)rawObj;
230 return new V4<Integer>
231 ( (Integer)fromJSON(Type.Int,obj.get("x"))
232 , (Integer)fromJSON(Type.Int,obj.get("y"))
233 , (Integer)fromJSON(Type.Int,obj.get("z"))
234 , (Integer)fromJSON(Type.Int,obj.get("w"))
235 );
236 }
237 case V4_Word: {
238 JSONObject obj = (JSONObject)rawObj;
239 return new V4<Integer>
240 ( (Integer)fromJSON(Type.Word,obj.get("x"))
241 , (Integer)fromJSON(Type.Word,obj.get("y"))
242 , (Integer)fromJSON(Type.Word,obj.get("z"))
243 , (Integer)fromJSON(Type.Word,obj.get("w"))
244 );
245 }
246 case V4_Float: {
247 JSONObject obj = (JSONObject)rawObj;
248 return new V4<Float>
249 ( (Float)fromJSON(Type.Float,obj.get("x"))
250 , (Float)fromJSON(Type.Float,obj.get("y"))
251 , (Float)fromJSON(Type.Float,obj.get("z"))
252 , (Float)fromJSON(Type.Float,obj.get("w"))
253 );
254 }
255 case V4_Bool: {
256 JSONObject obj = (JSONObject)rawObj;
257 return new V4<Boolean>
258 ( (Boolean)fromJSON(Type.Bool,obj.get("x"))
259 , (Boolean)fromJSON(Type.Bool,obj.get("y"))
260 , (Boolean)fromJSON(Type.Bool,obj.get("z"))
261 , (Boolean)fromJSON(Type.Bool,obj.get("w"))
262 );
263 }
264 case V4_V2_Float: {
265 JSONObject obj = (JSONObject)rawObj;
266 return new V4<V2<Float>>
267 ( (V2<Float>)fromJSON(Type.V2_Float,obj.get("x"))
268 , (V2<Float>)fromJSON(Type.V2_Float,obj.get("y"))
269 , (V2<Float>)fromJSON(Type.V2_Float,obj.get("z"))
270 , (V2<Float>)fromJSON(Type.V2_Float,obj.get("w"))
271 );
272 }
273 case V4_V3_Float: {
274 JSONObject obj = (JSONObject)rawObj;
275 return new V4<V3<Float>>
276 ( (V3<Float>)fromJSON(Type.V3_Float,obj.get("x"))
277 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("y"))
278 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("z"))
279 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("w"))
280 );
281 }
282 case V4_V4_Float: {
283 JSONObject obj = (JSONObject)rawObj;
284 return new V4<V4<Float>>
285 ( (V4<Float>)fromJSON(Type.V4_Float,obj.get("x"))
286 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("y"))
287 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("z"))
288 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("w"))
289 );
290 }
291// case Array_Int: return ((JArray)obj).Select(x => fromJSON (Type.Int, x)).ToList();
292// case Array_Int32: return ((JArray)obj).Select(x => fromJSON (Type.Int32, x)).ToList();
293// case Array_Word32: return ((JArray)obj).Select(x => fromJSON (Type.Word32, x)).ToList();
294// case Array_Float: return ((JArray)obj).Select(x => fromJSON (Type.Float, x)).ToList();
295// case Array_Bool: return ((JArray)obj).Select(x => fromJSON (Type.Bool, x)).ToList();
296// case Array_ClearImage: return ((JArray)obj).Select(x => fromJSON (Type.ClearImage, x)).ToList();
297// case Array_Command: return ((JArray)obj).Select(x => fromJSON (Type.Command, x)).ToList();
298// case Array_Parameter: return ((JArray)obj).Select(x => fromJSON (Type.Parameter, x)).ToList();
299// case Array_Program: return ((JArray)obj).Select(x => fromJSON (Type.Program, x)).ToList();
300// case Array_RenderTarget: return ((JArray)obj).Select(x => fromJSON (Type.RenderTarget, x)).ToList();
301// case Array_SamplerDescriptor: return ((JArray)obj).Select(x => fromJSON (Type.SamplerDescriptor, x)).ToList();
302// case Array_Slot: return ((JArray)obj).Select(x => fromJSON (Type.Slot, x)).ToList();
303// case Array_StreamData: return ((JArray)obj).Select(x => fromJSON (Type.StreamData, x)).ToList();
304// case Array_TargetItem: return ((JArray)obj).Select(x => fromJSON (Type.TargetItem, x)).ToList();
305// case Array_TextureDescriptor: return ((JArray)obj).Select(x => fromJSON (Type.TextureDescriptor, x)).ToList();
306// case List_FragmentOperation: return ((JArray)obj).Select(x => fromJSON (Type.FragmentOperation, x)).ToList();
307/*
308 case Maybe_Int: {
309 var m = new Maybe<Integer> ();
310 if (obj == null || obj.Type == JTokenType.Null) {
311 m.valid = false;
312 } else {
313 m.valid = true;
314 m.data = (Integer)fromJSON (Type.Int,obj);
315 }
316 return m;
317 }
318*/
319/*
320 case Maybe_Float: {
321 var m = new Maybe<Float> ();
322 if (obj == null || obj.Type == JTokenType.Null) {
323 m.valid = false;
324 } else {
325 m.valid = true;
326 m.data = (Float)fromJSON (Type.Float,obj);
327 }
328 return m;
329 }
330*/
331/*
332 case Maybe_String: {
333 var m = new Maybe<String> ();
334 if (obj == null || obj.Type == JTokenType.Null) {
335 m.valid = false;
336 } else {
337 m.valid = true;
338 m.data = (String)fromJSON (Type.String,obj);
339 }
340 return m;
341 }
342*/
343/*
344 case Maybe_ComparisonFunction: {
345 var m = new Maybe<ComparisonFunction> ();
346 if (obj == null || obj.Type == JTokenType.Null) {
347 m.valid = false;
348 } else {
349 m.valid = true;
350 m.data = (ComparisonFunction)fromJSON (Type.ComparisonFunction,obj);
351 }
352 return m;
353 }
354*/
355/*
356 case Maybe_EdgeMode: {
357 var m = new Maybe<EdgeMode> ();
358 if (obj == null || obj.Type == JTokenType.Null) {
359 m.valid = false;
360 } else {
361 m.valid = true;
362 m.data = (EdgeMode)fromJSON (Type.EdgeMode,obj);
363 }
364 return m;
365 }
366*/
367/*
368 case Maybe_ImageRef: {
369 var m = new Maybe<ImageRef> ();
370 if (obj == null || obj.Type == JTokenType.Null) {
371 m.valid = false;
372 } else {
373 m.valid = true;
374 m.data = (ImageRef)fromJSON (Type.ImageRef,obj);
375 }
376 return m;
377 }
378*/
379/*
380 case Map_String_ArrayValue: {
381 var map = new HashMap<String, ArrayValue> ();
382 foreach(var i in (JSONObject)rawObj) {
383 map.Add( (String)fromJSON(Type.String,i.Key)
384 , (ArrayValue)fromJSON(Type.ArrayValue,i.Value));
385 }
386 return map;
387 }
388*/
389/*
390 case Map_String_InputType: {
391 var map = new HashMap<String, InputType> ();
392 foreach(var i in (JSONObject)rawObj) {
393 map.Add( (String)fromJSON(Type.String,i.Key)
394 , (InputType)fromJSON(Type.InputType,i.Value));
395 }
396 return map;
397 }
398*/
399/*
400 case Map_String_Parameter: {
401 var map = new HashMap<String, Parameter> ();
402 foreach(var i in (JSONObject)rawObj) {
403 map.Add( (String)fromJSON(Type.String,i.Key)
404 , (Parameter)fromJSON(Type.Parameter,i.Value));
405 }
406 return map;
407 }
408*/
409
410 case ArrayValue: {
411 JSONObject obj = (JSONObject)rawObj;
412 String tag = obj.getString("tag");
413 switch (tag) {
414 case "VBoolArray": {
415 ArrayValue.VBoolArray_ tv = new ArrayValue().new VBoolArray_();
416 tv._0 = (ArrayList<Boolean>)fromJSON(Type.Array_Bool,obj.get("arg0"));
417 return tv;
418 }
419 case "VIntArray": {
420 ArrayValue.VIntArray_ tv = new ArrayValue().new VIntArray_();
421 tv._0 = (ArrayList<Integer>)fromJSON(Type.Array_Int32,obj.get("arg0"));
422 return tv;
423 }
424 case "VWordArray": {
425 ArrayValue.VWordArray_ tv = new ArrayValue().new VWordArray_();
426 tv._0 = (ArrayList<Integer>)fromJSON(Type.Array_Word32,obj.get("arg0"));
427 return tv;
428 }
429 case "VFloatArray": {
430 ArrayValue.VFloatArray_ tv = new ArrayValue().new VFloatArray_();
431 tv._0 = (ArrayList<Float>)fromJSON(Type.Array_Float,obj.get("arg0"));
432 return tv;
433 }
434 default: throw new Exception("unknown constructor: " + tag);
435 }
436 }
437 case Value: {
438 JSONObject obj = (JSONObject)rawObj;
439 String tag = obj.getString("tag");
440 switch (tag) {
441 case "VBool": {
442 Value.VBool_ tv = new Value().new VBool_();
443 tv._0 = (Boolean)fromJSON(Type.Bool,obj.get("arg0"));
444 return tv;
445 }
446 case "VV2B": {
447 Value.VV2B_ tv = new Value().new VV2B_();
448 tv._0 = (V2<Boolean>)fromJSON(Type.V2_Bool,obj.get("arg0"));
449 return tv;
450 }
451 case "VV3B": {
452 Value.VV3B_ tv = new Value().new VV3B_();
453 tv._0 = (V3<Boolean>)fromJSON(Type.V3_Bool,obj.get("arg0"));
454 return tv;
455 }
456 case "VV4B": {
457 Value.VV4B_ tv = new Value().new VV4B_();
458 tv._0 = (V4<Boolean>)fromJSON(Type.V4_Bool,obj.get("arg0"));
459 return tv;
460 }
461 case "VWord": {
462 Value.VWord_ tv = new Value().new VWord_();
463 tv._0 = (Integer)fromJSON(Type.Word32,obj.get("arg0"));
464 return tv;
465 }
466 case "VV2U": {
467 Value.VV2U_ tv = new Value().new VV2U_();
468 tv._0 = (V2<Integer>)fromJSON(Type.V2_Word,obj.get("arg0"));
469 return tv;
470 }
471 case "VV3U": {
472 Value.VV3U_ tv = new Value().new VV3U_();
473 tv._0 = (V3<Integer>)fromJSON(Type.V3_Word,obj.get("arg0"));
474 return tv;
475 }
476 case "VV4U": {
477 Value.VV4U_ tv = new Value().new VV4U_();
478 tv._0 = (V4<Integer>)fromJSON(Type.V4_Word,obj.get("arg0"));
479 return tv;
480 }
481 case "VInt": {
482 Value.VInt_ tv = new Value().new VInt_();
483 tv._0 = (Integer)fromJSON(Type.Int32,obj.get("arg0"));
484 return tv;
485 }
486 case "VV2I": {
487 Value.VV2I_ tv = new Value().new VV2I_();
488 tv._0 = (V2<Integer>)fromJSON(Type.V2_Int,obj.get("arg0"));
489 return tv;
490 }
491 case "VV3I": {
492 Value.VV3I_ tv = new Value().new VV3I_();
493 tv._0 = (V3<Integer>)fromJSON(Type.V3_Int,obj.get("arg0"));
494 return tv;
495 }
496 case "VV4I": {
497 Value.VV4I_ tv = new Value().new VV4I_();
498 tv._0 = (V4<Integer>)fromJSON(Type.V4_Int,obj.get("arg0"));
499 return tv;
500 }
501 case "VFloat": {
502 Value.VFloat_ tv = new Value().new VFloat_();
503 tv._0 = (Float)fromJSON(Type.Float,obj.get("arg0"));
504 return tv;
505 }
506 case "VV2F": {
507 Value.VV2F_ tv = new Value().new VV2F_();
508 tv._0 = (V2<Float>)fromJSON(Type.V2_Float,obj.get("arg0"));
509 return tv;
510 }
511 case "VV3F": {
512 Value.VV3F_ tv = new Value().new VV3F_();
513 tv._0 = (V3<Float>)fromJSON(Type.V3_Float,obj.get("arg0"));
514 return tv;
515 }
516 case "VV4F": {
517 Value.VV4F_ tv = new Value().new VV4F_();
518 tv._0 = (V4<Float>)fromJSON(Type.V4_Float,obj.get("arg0"));
519 return tv;
520 }
521 case "VM22F": {
522 Value.VM22F_ tv = new Value().new VM22F_();
523 tv._0 = (V2<V2<Float>>)fromJSON(Type.V2_V2_Float,obj.get("arg0"));
524 return tv;
525 }
526 case "VM23F": {
527 Value.VM23F_ tv = new Value().new VM23F_();
528 tv._0 = (V3<V2<Float>>)fromJSON(Type.V3_V2_Float,obj.get("arg0"));
529 return tv;
530 }
531 case "VM24F": {
532 Value.VM24F_ tv = new Value().new VM24F_();
533 tv._0 = (V4<V2<Float>>)fromJSON(Type.V4_V2_Float,obj.get("arg0"));
534 return tv;
535 }
536 case "VM32F": {
537 Value.VM32F_ tv = new Value().new VM32F_();
538 tv._0 = (V2<V3<Float>>)fromJSON(Type.V2_V3_Float,obj.get("arg0"));
539 return tv;
540 }
541 case "VM33F": {
542 Value.VM33F_ tv = new Value().new VM33F_();
543 tv._0 = (V3<V3<Float>>)fromJSON(Type.V3_V3_Float,obj.get("arg0"));
544 return tv;
545 }
546 case "VM34F": {
547 Value.VM34F_ tv = new Value().new VM34F_();
548 tv._0 = (V4<V3<Float>>)fromJSON(Type.V4_V3_Float,obj.get("arg0"));
549 return tv;
550 }
551 case "VM42F": {
552 Value.VM42F_ tv = new Value().new VM42F_();
553 tv._0 = (V2<V4<Float>>)fromJSON(Type.V2_V4_Float,obj.get("arg0"));
554 return tv;
555 }
556 case "VM43F": {
557 Value.VM43F_ tv = new Value().new VM43F_();
558 tv._0 = (V3<V4<Float>>)fromJSON(Type.V3_V4_Float,obj.get("arg0"));
559 return tv;
560 }
561 case "VM44F": {
562 Value.VM44F_ tv = new Value().new VM44F_();
563 tv._0 = (V4<V4<Float>>)fromJSON(Type.V4_V4_Float,obj.get("arg0"));
564 return tv;
565 }
566 default: throw new Exception("unknown constructor: " + tag);
567 }
568 }
569 case InputType: {
570 JSONObject obj = (JSONObject)rawObj;
571 String tag = obj.getString("tag");
572 InputType.Tag tagType;
573 switch (tag) {
574 case "Bool": tagType = InputType.Tag.Bool; break;
575 case "V2B": tagType = InputType.Tag.V2B; break;
576 case "V3B": tagType = InputType.Tag.V3B; break;
577 case "V4B": tagType = InputType.Tag.V4B; break;
578 case "Word": tagType = InputType.Tag.Word; break;
579 case "V2U": tagType = InputType.Tag.V2U; break;
580 case "V3U": tagType = InputType.Tag.V3U; break;
581 case "V4U": tagType = InputType.Tag.V4U; break;
582 case "Int": tagType = InputType.Tag.Int; break;
583 case "V2I": tagType = InputType.Tag.V2I; break;
584 case "V3I": tagType = InputType.Tag.V3I; break;
585 case "V4I": tagType = InputType.Tag.V4I; break;
586 case "Float": tagType = InputType.Tag.Float; break;
587 case "V2F": tagType = InputType.Tag.V2F; break;
588 case "V3F": tagType = InputType.Tag.V3F; break;
589 case "V4F": tagType = InputType.Tag.V4F; break;
590 case "M22F": tagType = InputType.Tag.M22F; break;
591 case "M23F": tagType = InputType.Tag.M23F; break;
592 case "M24F": tagType = InputType.Tag.M24F; break;
593 case "M32F": tagType = InputType.Tag.M32F; break;
594 case "M33F": tagType = InputType.Tag.M33F; break;
595 case "M34F": tagType = InputType.Tag.M34F; break;
596 case "M42F": tagType = InputType.Tag.M42F; break;
597 case "M43F": tagType = InputType.Tag.M43F; break;
598 case "M44F": tagType = InputType.Tag.M44F; break;
599 case "STexture1D": tagType = InputType.Tag.STexture1D; break;
600 case "STexture2D": tagType = InputType.Tag.STexture2D; break;
601 case "STextureCube": tagType = InputType.Tag.STextureCube; break;
602 case "STexture1DArray": tagType = InputType.Tag.STexture1DArray; break;
603 case "STexture2DArray": tagType = InputType.Tag.STexture2DArray; break;
604 case "STexture2DRect": tagType = InputType.Tag.STexture2DRect; break;
605 case "FTexture1D": tagType = InputType.Tag.FTexture1D; break;
606 case "FTexture2D": tagType = InputType.Tag.FTexture2D; break;
607 case "FTexture3D": tagType = InputType.Tag.FTexture3D; break;
608 case "FTextureCube": tagType = InputType.Tag.FTextureCube; break;
609 case "FTexture1DArray": tagType = InputType.Tag.FTexture1DArray; break;
610 case "FTexture2DArray": tagType = InputType.Tag.FTexture2DArray; break;
611 case "FTexture2DMS": tagType = InputType.Tag.FTexture2DMS; break;
612 case "FTexture2DMSArray": tagType = InputType.Tag.FTexture2DMSArray; break;
613 case "FTextureBuffer": tagType = InputType.Tag.FTextureBuffer; break;
614 case "FTexture2DRect": tagType = InputType.Tag.FTexture2DRect; break;
615 case "ITexture1D": tagType = InputType.Tag.ITexture1D; break;
616 case "ITexture2D": tagType = InputType.Tag.ITexture2D; break;
617 case "ITexture3D": tagType = InputType.Tag.ITexture3D; break;
618 case "ITextureCube": tagType = InputType.Tag.ITextureCube; break;
619 case "ITexture1DArray": tagType = InputType.Tag.ITexture1DArray; break;
620 case "ITexture2DArray": tagType = InputType.Tag.ITexture2DArray; break;
621 case "ITexture2DMS": tagType = InputType.Tag.ITexture2DMS; break;
622 case "ITexture2DMSArray": tagType = InputType.Tag.ITexture2DMSArray; break;
623 case "ITextureBuffer": tagType = InputType.Tag.ITextureBuffer; break;
624 case "ITexture2DRect": tagType = InputType.Tag.ITexture2DRect; break;
625 case "UTexture1D": tagType = InputType.Tag.UTexture1D; break;
626 case "UTexture2D": tagType = InputType.Tag.UTexture2D; break;
627 case "UTexture3D": tagType = InputType.Tag.UTexture3D; break;
628 case "UTextureCube": tagType = InputType.Tag.UTextureCube; break;
629 case "UTexture1DArray": tagType = InputType.Tag.UTexture1DArray; break;
630 case "UTexture2DArray": tagType = InputType.Tag.UTexture2DArray; break;
631 case "UTexture2DMS": tagType = InputType.Tag.UTexture2DMS; break;
632 case "UTexture2DMSArray": tagType = InputType.Tag.UTexture2DMSArray; break;
633 case "UTextureBuffer": tagType = InputType.Tag.UTextureBuffer; break;
634 case "UTexture2DRect": tagType = InputType.Tag.UTexture2DRect; break;
635 default: throw new Exception("unknown constructor: " + tag);
636 }
637 InputType o = new InputType();
638 o.tag = tagType;
639 return o;
640 }
641 case PointSpriteCoordOrigin: {
642 JSONObject obj = (JSONObject)rawObj;
643 String tag = obj.getString("tag");
644 PointSpriteCoordOrigin.Tag tagType;
645 switch (tag) {
646 case "LowerLeft": tagType = PointSpriteCoordOrigin.Tag.LowerLeft; break;
647 case "UpperLeft": tagType = PointSpriteCoordOrigin.Tag.UpperLeft; break;
648 default: throw new Exception("unknown constructor: " + tag);
649 }
650 PointSpriteCoordOrigin o = new PointSpriteCoordOrigin();
651 o.tag = tagType;
652 return o;
653 }
654 case PointSize: {
655 JSONObject obj = (JSONObject)rawObj;
656 String tag = obj.getString("tag");
657 PointSize.Tag tagType;
658 switch (tag) {
659 case "PointSize": {
660 PointSize.PointSize_ tv = new PointSize().new PointSize_();
661 tv._0 = (Float)fromJSON(Type.Float,obj.get("arg0"));
662 return tv;
663 }
664 case "ProgramPointSize": tagType = PointSize.Tag.ProgramPointSize; break;
665 default: throw new Exception("unknown constructor: " + tag);
666 }
667 PointSize o = new PointSize();
668 o.tag = tagType;
669 return o;
670 }
671 case PolygonOffset: {
672 JSONObject obj = (JSONObject)rawObj;
673 String tag = obj.getString("tag");
674 PolygonOffset.Tag tagType;
675 switch (tag) {
676 case "NoOffset": tagType = PolygonOffset.Tag.NoOffset; break;
677 case "Offset": {
678 PolygonOffset.Offset_ tv = new PolygonOffset().new Offset_();
679 tv._0 = (Float)fromJSON(Type.Float,obj.get("arg0"));
680 tv._1 = (Float)fromJSON(Type.Float,obj.get("arg1"));
681 return tv;
682 }
683 default: throw new Exception("unknown constructor: " + tag);
684 }
685 PolygonOffset o = new PolygonOffset();
686 o.tag = tagType;
687 return o;
688 }
689 case FrontFace: {
690 JSONObject obj = (JSONObject)rawObj;
691 String tag = obj.getString("tag");
692 FrontFace.Tag tagType;
693 switch (tag) {
694 case "CCW": tagType = FrontFace.Tag.CCW; break;
695 case "CW": tagType = FrontFace.Tag.CW; break;
696 default: throw new Exception("unknown constructor: " + tag);
697 }
698 FrontFace o = new FrontFace();
699 o.tag = tagType;
700 return o;
701 }
702 case PolygonMode: {
703 JSONObject obj = (JSONObject)rawObj;
704 String tag = obj.getString("tag");
705 PolygonMode.Tag tagType;
706 switch (tag) {
707 case "PolygonPoint": {
708 PolygonMode.PolygonPoint_ tv = new PolygonMode().new PolygonPoint_();
709 tv._0 = (PointSize)fromJSON(Type.PointSize,obj.get("arg0"));
710 return tv;
711 }
712 case "PolygonLine": {
713 PolygonMode.PolygonLine_ tv = new PolygonMode().new PolygonLine_();
714 tv._0 = (Float)fromJSON(Type.Float,obj.get("arg0"));
715 return tv;
716 }
717 case "PolygonFill": tagType = PolygonMode.Tag.PolygonFill; break;
718 default: throw new Exception("unknown constructor: " + tag);
719 }
720 PolygonMode o = new PolygonMode();
721 o.tag = tagType;
722 return o;
723 }
724 case ProvokingVertex: {
725 JSONObject obj = (JSONObject)rawObj;
726 String tag = obj.getString("tag");
727 ProvokingVertex.Tag tagType;
728 switch (tag) {
729 case "FirstVertex": tagType = ProvokingVertex.Tag.FirstVertex; break;
730 case "LastVertex": tagType = ProvokingVertex.Tag.LastVertex; break;
731 default: throw new Exception("unknown constructor: " + tag);
732 }
733 ProvokingVertex o = new ProvokingVertex();
734 o.tag = tagType;
735 return o;
736 }
737 case CullMode: {
738 JSONObject obj = (JSONObject)rawObj;
739 String tag = obj.getString("tag");
740 CullMode.Tag tagType;
741 switch (tag) {
742 case "CullNone": tagType = CullMode.Tag.CullNone; break;
743 case "CullFront": {
744 CullMode.CullFront_ tv = new CullMode().new CullFront_();
745 tv._0 = (FrontFace)fromJSON(Type.FrontFace,obj.get("arg0"));
746 return tv;
747 }
748 case "CullBack": {
749 CullMode.CullBack_ tv = new CullMode().new CullBack_();
750 tv._0 = (FrontFace)fromJSON(Type.FrontFace,obj.get("arg0"));
751 return tv;
752 }
753 default: throw new Exception("unknown constructor: " + tag);
754 }
755 CullMode o = new CullMode();
756 o.tag = tagType;
757 return o;
758 }
759 case ComparisonFunction: {
760 JSONObject obj = (JSONObject)rawObj;
761 String tag = obj.getString("tag");
762 ComparisonFunction.Tag tagType;
763 switch (tag) {
764 case "Never": tagType = ComparisonFunction.Tag.Never; break;
765 case "Less": tagType = ComparisonFunction.Tag.Less; break;
766 case "Equal": tagType = ComparisonFunction.Tag.Equal; break;
767 case "Lequal": tagType = ComparisonFunction.Tag.Lequal; break;
768 case "Greater": tagType = ComparisonFunction.Tag.Greater; break;
769 case "Notequal": tagType = ComparisonFunction.Tag.Notequal; break;
770 case "Gequal": tagType = ComparisonFunction.Tag.Gequal; break;
771 case "Always": tagType = ComparisonFunction.Tag.Always; break;
772 default: throw new Exception("unknown constructor: " + tag);
773 }
774 ComparisonFunction o = new ComparisonFunction();
775 o.tag = tagType;
776 return o;
777 }
778 case StencilOperation: {
779 JSONObject obj = (JSONObject)rawObj;
780 String tag = obj.getString("tag");
781 StencilOperation.Tag tagType;
782 switch (tag) {
783 case "OpZero": tagType = StencilOperation.Tag.OpZero; break;
784 case "OpKeep": tagType = StencilOperation.Tag.OpKeep; break;
785 case "OpReplace": tagType = StencilOperation.Tag.OpReplace; break;
786 case "OpIncr": tagType = StencilOperation.Tag.OpIncr; break;
787 case "OpIncrWrap": tagType = StencilOperation.Tag.OpIncrWrap; break;
788 case "OpDecr": tagType = StencilOperation.Tag.OpDecr; break;
789 case "OpDecrWrap": tagType = StencilOperation.Tag.OpDecrWrap; break;
790 case "OpInvert": tagType = StencilOperation.Tag.OpInvert; break;
791 default: throw new Exception("unknown constructor: " + tag);
792 }
793 StencilOperation o = new StencilOperation();
794 o.tag = tagType;
795 return o;
796 }
797 case BlendEquation: {
798 JSONObject obj = (JSONObject)rawObj;
799 String tag = obj.getString("tag");
800 BlendEquation.Tag tagType;
801 switch (tag) {
802 case "FuncAdd": tagType = BlendEquation.Tag.FuncAdd; break;
803 case "FuncSubtract": tagType = BlendEquation.Tag.FuncSubtract; break;
804 case "FuncReverseSubtract": tagType = BlendEquation.Tag.FuncReverseSubtract; break;
805 case "Min": tagType = BlendEquation.Tag.Min; break;
806 case "Max": tagType = BlendEquation.Tag.Max; break;
807 default: throw new Exception("unknown constructor: " + tag);
808 }
809 BlendEquation o = new BlendEquation();
810 o.tag = tagType;
811 return o;
812 }
813 case BlendingFactor: {
814 JSONObject obj = (JSONObject)rawObj;
815 String tag = obj.getString("tag");
816 BlendingFactor.Tag tagType;
817 switch (tag) {
818 case "Zero": tagType = BlendingFactor.Tag.Zero; break;
819 case "One": tagType = BlendingFactor.Tag.One; break;
820 case "SrcColor": tagType = BlendingFactor.Tag.SrcColor; break;
821 case "OneMinusSrcColor": tagType = BlendingFactor.Tag.OneMinusSrcColor; break;
822 case "DstColor": tagType = BlendingFactor.Tag.DstColor; break;
823 case "OneMinusDstColor": tagType = BlendingFactor.Tag.OneMinusDstColor; break;
824 case "SrcAlpha": tagType = BlendingFactor.Tag.SrcAlpha; break;
825 case "OneMinusSrcAlpha": tagType = BlendingFactor.Tag.OneMinusSrcAlpha; break;
826 case "DstAlpha": tagType = BlendingFactor.Tag.DstAlpha; break;
827 case "OneMinusDstAlpha": tagType = BlendingFactor.Tag.OneMinusDstAlpha; break;
828 case "ConstantColor": tagType = BlendingFactor.Tag.ConstantColor; break;
829 case "OneMinusConstantColor": tagType = BlendingFactor.Tag.OneMinusConstantColor; break;
830 case "ConstantAlpha": tagType = BlendingFactor.Tag.ConstantAlpha; break;
831 case "OneMinusConstantAlpha": tagType = BlendingFactor.Tag.OneMinusConstantAlpha; break;
832 case "SrcAlphaSaturate": tagType = BlendingFactor.Tag.SrcAlphaSaturate; break;
833 default: throw new Exception("unknown constructor: " + tag);
834 }
835 BlendingFactor o = new BlendingFactor();
836 o.tag = tagType;
837 return o;
838 }
839 case LogicOperation: {
840 JSONObject obj = (JSONObject)rawObj;
841 String tag = obj.getString("tag");
842 LogicOperation.Tag tagType;
843 switch (tag) {
844 case "Clear": tagType = LogicOperation.Tag.Clear; break;
845 case "And": tagType = LogicOperation.Tag.And; break;
846 case "AndReverse": tagType = LogicOperation.Tag.AndReverse; break;
847 case "Copy": tagType = LogicOperation.Tag.Copy; break;
848 case "AndInverted": tagType = LogicOperation.Tag.AndInverted; break;
849 case "Noop": tagType = LogicOperation.Tag.Noop; break;
850 case "Xor": tagType = LogicOperation.Tag.Xor; break;
851 case "Or": tagType = LogicOperation.Tag.Or; break;
852 case "Nor": tagType = LogicOperation.Tag.Nor; break;
853 case "Equiv": tagType = LogicOperation.Tag.Equiv; break;
854 case "Invert": tagType = LogicOperation.Tag.Invert; break;
855 case "OrReverse": tagType = LogicOperation.Tag.OrReverse; break;
856 case "CopyInverted": tagType = LogicOperation.Tag.CopyInverted; break;
857 case "OrInverted": tagType = LogicOperation.Tag.OrInverted; break;
858 case "Nand": tagType = LogicOperation.Tag.Nand; break;
859 case "Set": tagType = LogicOperation.Tag.Set; break;
860 default: throw new Exception("unknown constructor: " + tag);
861 }
862 LogicOperation o = new LogicOperation();
863 o.tag = tagType;
864 return o;
865 }
866 case StencilOps: {
867 JSONObject obj = (JSONObject)rawObj;
868 String tag = obj.getString("tag");
869 switch (tag) {
870 case "StencilOps": {
871 StencilOps.StencilOps_ tv = new StencilOps().new StencilOps_();
872 tv.frontStencilOp = (StencilOperation)fromJSON(Type.StencilOperation,obj.get("frontStencilOp"));
873 tv.backStencilOp = (StencilOperation)fromJSON(Type.StencilOperation,obj.get("backStencilOp"));
874 return tv;
875 }
876 default: throw new Exception("unknown constructor: " + tag);
877 }
878 }
879 case StencilTest: {
880 JSONObject obj = (JSONObject)rawObj;
881 String tag = obj.getString("tag");
882 switch (tag) {
883 case "StencilTest": {
884 StencilTest.StencilTest_ tv = new StencilTest().new StencilTest_();
885 tv.stencilComparision = (ComparisonFunction)fromJSON(Type.ComparisonFunction,obj.get("stencilComparision"));
886 tv.stencilReference = (Integer)fromJSON(Type.Int32,obj.get("stencilReference"));
887 tv.stencilMask = (Integer)fromJSON(Type.Word32,obj.get("stencilMask"));
888 return tv;
889 }
890 default: throw new Exception("unknown constructor: " + tag);
891 }
892 }
893 case StencilTests: {
894 JSONObject obj = (JSONObject)rawObj;
895 String tag = obj.getString("tag");
896 switch (tag) {
897 case "StencilTests": {
898 StencilTests.StencilTests_ tv = new StencilTests().new StencilTests_();
899 tv._0 = (StencilTest)fromJSON(Type.StencilTest,obj.get("arg0"));
900 tv._1 = (StencilTest)fromJSON(Type.StencilTest,obj.get("arg1"));
901 return tv;
902 }
903 default: throw new Exception("unknown constructor: " + tag);
904 }
905 }
906 case FetchPrimitive: {
907 JSONObject obj = (JSONObject)rawObj;
908 String tag = obj.getString("tag");
909 FetchPrimitive.Tag tagType;
910 switch (tag) {
911 case "Points": tagType = FetchPrimitive.Tag.Points; break;
912 case "Lines": tagType = FetchPrimitive.Tag.Lines; break;
913 case "Triangles": tagType = FetchPrimitive.Tag.Triangles; break;
914 case "LinesAdjacency": tagType = FetchPrimitive.Tag.LinesAdjacency; break;
915 case "TrianglesAdjacency": tagType = FetchPrimitive.Tag.TrianglesAdjacency; break;
916 default: throw new Exception("unknown constructor: " + tag);
917 }
918 FetchPrimitive o = new FetchPrimitive();
919 o.tag = tagType;
920 return o;
921 }
922 case OutputPrimitive: {
923 JSONObject obj = (JSONObject)rawObj;
924 String tag = obj.getString("tag");
925 OutputPrimitive.Tag tagType;
926 switch (tag) {
927 case "TrianglesOutput": tagType = OutputPrimitive.Tag.TrianglesOutput; break;
928 case "LinesOutput": tagType = OutputPrimitive.Tag.LinesOutput; break;
929 case "PointsOutput": tagType = OutputPrimitive.Tag.PointsOutput; break;
930 default: throw new Exception("unknown constructor: " + tag);
931 }
932 OutputPrimitive o = new OutputPrimitive();
933 o.tag = tagType;
934 return o;
935 }
936 case ColorArity: {
937 JSONObject obj = (JSONObject)rawObj;
938 String tag = obj.getString("tag");
939 ColorArity.Tag tagType;
940 switch (tag) {
941 case "Red": tagType = ColorArity.Tag.Red; break;
942 case "RG": tagType = ColorArity.Tag.RG; break;
943 case "RGB": tagType = ColorArity.Tag.RGB; break;
944 case "RGBA": tagType = ColorArity.Tag.RGBA; break;
945 default: throw new Exception("unknown constructor: " + tag);
946 }
947 ColorArity o = new ColorArity();
948 o.tag = tagType;
949 return o;
950 }
951 case Blending: {
952 JSONObject obj = (JSONObject)rawObj;
953 String tag = obj.getString("tag");
954 Blending.Tag tagType;
955 switch (tag) {
956 case "NoBlending": tagType = Blending.Tag.NoBlending; break;
957 case "BlendLogicOp": {
958 Blending.BlendLogicOp_ tv = new Blending().new BlendLogicOp_();
959 tv._0 = (LogicOperation)fromJSON(Type.LogicOperation,obj.get("arg0"));
960 return tv;
961 }
962 case "Blend": {
963 Blending.Blend_ tv = new Blending().new Blend_();
964 tv.colorEqSrc = (BlendEquation)fromJSON(Type.BlendEquation,obj.get("colorEqSrc"));
965 tv.alphaEqSrc = (BlendEquation)fromJSON(Type.BlendEquation,obj.get("alphaEqSrc"));
966 tv.colorFSrc = (BlendingFactor)fromJSON(Type.BlendingFactor,obj.get("colorFSrc"));
967 tv.colorFDst = (BlendingFactor)fromJSON(Type.BlendingFactor,obj.get("colorFDst"));
968 tv.alphaFSrc = (BlendingFactor)fromJSON(Type.BlendingFactor,obj.get("alphaFSrc"));
969 tv.alphaFDst = (BlendingFactor)fromJSON(Type.BlendingFactor,obj.get("alphaFDst"));
970 tv.color = (V4<Float>)fromJSON(Type.V4_Float,obj.get("color"));
971 return tv;
972 }
973 default: throw new Exception("unknown constructor: " + tag);
974 }
975 Blending o = new Blending();
976 o.tag = tagType;
977 return o;
978 }
979 case RasterContext: {
980 JSONObject obj = (JSONObject)rawObj;
981 String tag = obj.getString("tag");
982 switch (tag) {
983 case "PointCtx": {
984 RasterContext.PointCtx_ tv = new RasterContext().new PointCtx_();
985 tv._0 = (PointSize)fromJSON(Type.PointSize,obj.get("arg0"));
986 tv._1 = (Float)fromJSON(Type.Float,obj.get("arg1"));
987 tv._2 = (PointSpriteCoordOrigin)fromJSON(Type.PointSpriteCoordOrigin,obj.get("arg2"));
988 return tv;
989 }
990 case "LineCtx": {
991 RasterContext.LineCtx_ tv = new RasterContext().new LineCtx_();
992 tv._0 = (Float)fromJSON(Type.Float,obj.get("arg0"));
993 tv._1 = (ProvokingVertex)fromJSON(Type.ProvokingVertex,obj.get("arg1"));
994 return tv;
995 }
996 case "TriangleCtx": {
997 RasterContext.TriangleCtx_ tv = new RasterContext().new TriangleCtx_();
998 tv._0 = (CullMode)fromJSON(Type.CullMode,obj.get("arg0"));
999 tv._1 = (PolygonMode)fromJSON(Type.PolygonMode,obj.get("arg1"));
1000 tv._2 = (PolygonOffset)fromJSON(Type.PolygonOffset,obj.get("arg2"));
1001 tv._3 = (ProvokingVertex)fromJSON(Type.ProvokingVertex,obj.get("arg3"));
1002 return tv;
1003 }
1004 default: throw new Exception("unknown constructor: " + tag);
1005 }
1006 }
1007 case FragmentOperation: {
1008 JSONObject obj = (JSONObject)rawObj;
1009 String tag = obj.getString("tag");
1010 switch (tag) {
1011 case "DepthOp": {
1012 FragmentOperation.DepthOp_ tv = new FragmentOperation().new DepthOp_();
1013 tv._0 = (ComparisonFunction)fromJSON(Type.ComparisonFunction,obj.get("arg0"));
1014 tv._1 = (Boolean)fromJSON(Type.Bool,obj.get("arg1"));
1015 return tv;
1016 }
1017 case "StencilOp": {
1018 FragmentOperation.StencilOp_ tv = new FragmentOperation().new StencilOp_();
1019 tv._0 = (StencilTests)fromJSON(Type.StencilTests,obj.get("arg0"));
1020 tv._1 = (StencilOps)fromJSON(Type.StencilOps,obj.get("arg1"));
1021 tv._2 = (StencilOps)fromJSON(Type.StencilOps,obj.get("arg2"));
1022 return tv;
1023 }
1024 case "ColorOp": {
1025 FragmentOperation.ColorOp_ tv = new FragmentOperation().new ColorOp_();
1026 tv._0 = (Blending)fromJSON(Type.Blending,obj.get("arg0"));
1027 tv._1 = (Value)fromJSON(Type.Value,obj.get("arg1"));
1028 return tv;
1029 }
1030 default: throw new Exception("unknown constructor: " + tag);
1031 }
1032 }
1033 case AccumulationContext: {
1034 JSONObject obj = (JSONObject)rawObj;
1035 String tag = obj.getString("tag");
1036 switch (tag) {
1037 case "AccumulationContext": {
1038 AccumulationContext.AccumulationContext_ tv = new AccumulationContext().new AccumulationContext_();
1039 tv.accViewportName = (Maybe<String>)fromJSON(Type.Maybe_String,obj.get("accViewportName"));
1040 tv.accOperations = (ArrayList<FragmentOperation>)fromJSON(Type.List_FragmentOperation,obj.get("accOperations"));
1041 return tv;
1042 }
1043 default: throw new Exception("unknown constructor: " + tag);
1044 }
1045 }
1046 case TextureDataType: {
1047 JSONObject obj = (JSONObject)rawObj;
1048 String tag = obj.getString("tag");
1049 TextureDataType.Tag tagType;
1050 switch (tag) {
1051 case "FloatT": {
1052 TextureDataType.FloatT_ tv = new TextureDataType().new FloatT_();
1053 tv._0 = (ColorArity)fromJSON(Type.ColorArity,obj.get("arg0"));
1054 return tv;
1055 }
1056 case "IntT": {
1057 TextureDataType.IntT_ tv = new TextureDataType().new IntT_();
1058 tv._0 = (ColorArity)fromJSON(Type.ColorArity,obj.get("arg0"));
1059 return tv;
1060 }
1061 case "WordT": {
1062 TextureDataType.WordT_ tv = new TextureDataType().new WordT_();
1063 tv._0 = (ColorArity)fromJSON(Type.ColorArity,obj.get("arg0"));
1064 return tv;
1065 }
1066 case "ShadowT": tagType = TextureDataType.Tag.ShadowT; break;
1067 default: throw new Exception("unknown constructor: " + tag);
1068 }
1069 TextureDataType o = new TextureDataType();
1070 o.tag = tagType;
1071 return o;
1072 }
1073 case TextureType: {
1074 JSONObject obj = (JSONObject)rawObj;
1075 String tag = obj.getString("tag");
1076 switch (tag) {
1077 case "Texture1D": {
1078 TextureType.Texture1D_ tv = new TextureType().new Texture1D_();
1079 tv._0 = (TextureDataType)fromJSON(Type.TextureDataType,obj.get("arg0"));
1080 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1081 return tv;
1082 }
1083 case "Texture2D": {
1084 TextureType.Texture2D_ tv = new TextureType().new Texture2D_();
1085 tv._0 = (TextureDataType)fromJSON(Type.TextureDataType,obj.get("arg0"));
1086 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1087 return tv;
1088 }
1089 case "Texture3D": {
1090 TextureType.Texture3D_ tv = new TextureType().new Texture3D_();
1091 tv._0 = (TextureDataType)fromJSON(Type.TextureDataType,obj.get("arg0"));
1092 return tv;
1093 }
1094 case "TextureCube": {
1095 TextureType.TextureCube_ tv = new TextureType().new TextureCube_();
1096 tv._0 = (TextureDataType)fromJSON(Type.TextureDataType,obj.get("arg0"));
1097 return tv;
1098 }
1099 case "TextureRect": {
1100 TextureType.TextureRect_ tv = new TextureType().new TextureRect_();
1101 tv._0 = (TextureDataType)fromJSON(Type.TextureDataType,obj.get("arg0"));
1102 return tv;
1103 }
1104 case "Texture2DMS": {
1105 TextureType.Texture2DMS_ tv = new TextureType().new Texture2DMS_();
1106 tv._0 = (TextureDataType)fromJSON(Type.TextureDataType,obj.get("arg0"));
1107 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1108 tv._2 = (Integer)fromJSON(Type.Int,obj.get("arg2"));
1109 tv._3 = (Boolean)fromJSON(Type.Bool,obj.get("arg3"));
1110 return tv;
1111 }
1112 case "TextureBuffer": {
1113 TextureType.TextureBuffer_ tv = new TextureType().new TextureBuffer_();
1114 tv._0 = (TextureDataType)fromJSON(Type.TextureDataType,obj.get("arg0"));
1115 return tv;
1116 }
1117 default: throw new Exception("unknown constructor: " + tag);
1118 }
1119 }
1120 case MipMap: {
1121 JSONObject obj = (JSONObject)rawObj;
1122 String tag = obj.getString("tag");
1123 MipMap.Tag tagType;
1124 switch (tag) {
1125 case "Mip": {
1126 MipMap.Mip_ tv = new MipMap().new Mip_();
1127 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1128 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1129 return tv;
1130 }
1131 case "NoMip": tagType = MipMap.Tag.NoMip; break;
1132 case "AutoMip": {
1133 MipMap.AutoMip_ tv = new MipMap().new AutoMip_();
1134 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1135 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1136 return tv;
1137 }
1138 default: throw new Exception("unknown constructor: " + tag);
1139 }
1140 MipMap o = new MipMap();
1141 o.tag = tagType;
1142 return o;
1143 }
1144 case Filter: {
1145 JSONObject obj = (JSONObject)rawObj;
1146 String tag = obj.getString("tag");
1147 Filter.Tag tagType;
1148 switch (tag) {
1149 case "Nearest": tagType = Filter.Tag.Nearest; break;
1150 case "Linear": tagType = Filter.Tag.Linear; break;
1151 case "NearestMipmapNearest": tagType = Filter.Tag.NearestMipmapNearest; break;
1152 case "NearestMipmapLinear": tagType = Filter.Tag.NearestMipmapLinear; break;
1153 case "LinearMipmapNearest": tagType = Filter.Tag.LinearMipmapNearest; break;
1154 case "LinearMipmapLinear": tagType = Filter.Tag.LinearMipmapLinear; break;
1155 default: throw new Exception("unknown constructor: " + tag);
1156 }
1157 Filter o = new Filter();
1158 o.tag = tagType;
1159 return o;
1160 }
1161 case EdgeMode: {
1162 JSONObject obj = (JSONObject)rawObj;
1163 String tag = obj.getString("tag");
1164 EdgeMode.Tag tagType;
1165 switch (tag) {
1166 case "Repeat": tagType = EdgeMode.Tag.Repeat; break;
1167 case "MirroredRepeat": tagType = EdgeMode.Tag.MirroredRepeat; break;
1168 case "ClampToEdge": tagType = EdgeMode.Tag.ClampToEdge; break;
1169 case "ClampToBorder": tagType = EdgeMode.Tag.ClampToBorder; break;
1170 default: throw new Exception("unknown constructor: " + tag);
1171 }
1172 EdgeMode o = new EdgeMode();
1173 o.tag = tagType;
1174 return o;
1175 }
1176 case ImageSemantic: {
1177 JSONObject obj = (JSONObject)rawObj;
1178 String tag = obj.getString("tag");
1179 ImageSemantic.Tag tagType;
1180 switch (tag) {
1181 case "Depth": tagType = ImageSemantic.Tag.Depth; break;
1182 case "Stencil": tagType = ImageSemantic.Tag.Stencil; break;
1183 case "Color": tagType = ImageSemantic.Tag.Color; break;
1184 default: throw new Exception("unknown constructor: " + tag);
1185 }
1186 ImageSemantic o = new ImageSemantic();
1187 o.tag = tagType;
1188 return o;
1189 }
1190 case ImageRef: {
1191 JSONObject obj = (JSONObject)rawObj;
1192 String tag = obj.getString("tag");
1193 switch (tag) {
1194 case "TextureImage": {
1195 ImageRef.TextureImage_ tv = new ImageRef().new TextureImage_();
1196 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1197 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1198 tv._2 = (Maybe<Integer>)fromJSON(Type.Maybe_Int,obj.get("arg2"));
1199 return tv;
1200 }
1201 case "Framebuffer": {
1202 ImageRef.Framebuffer_ tv = new ImageRef().new Framebuffer_();
1203 tv._0 = (ImageSemantic)fromJSON(Type.ImageSemantic,obj.get("arg0"));
1204 return tv;
1205 }
1206 default: throw new Exception("unknown constructor: " + tag);
1207 }
1208 }
1209 case ClearImage: {
1210 JSONObject obj = (JSONObject)rawObj;
1211 String tag = obj.getString("tag");
1212 switch (tag) {
1213 case "ClearImage": {
1214 ClearImage.ClearImage_ tv = new ClearImage().new ClearImage_();
1215 tv.imageSemantic = (ImageSemantic)fromJSON(Type.ImageSemantic,obj.get("imageSemantic"));
1216 tv.clearValue = (Value)fromJSON(Type.Value,obj.get("clearValue"));
1217 return tv;
1218 }
1219 default: throw new Exception("unknown constructor: " + tag);
1220 }
1221 }
1222 case Command: {
1223 JSONObject obj = (JSONObject)rawObj;
1224 String tag = obj.getString("tag");
1225 switch (tag) {
1226 case "SetRasterContext": {
1227 Command.SetRasterContext_ tv = new Command().new SetRasterContext_();
1228 tv._0 = (RasterContext)fromJSON(Type.RasterContext,obj.get("arg0"));
1229 return tv;
1230 }
1231 case "SetAccumulationContext": {
1232 Command.SetAccumulationContext_ tv = new Command().new SetAccumulationContext_();
1233 tv._0 = (AccumulationContext)fromJSON(Type.AccumulationContext,obj.get("arg0"));
1234 return tv;
1235 }
1236 case "SetRenderTarget": {
1237 Command.SetRenderTarget_ tv = new Command().new SetRenderTarget_();
1238 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1239 return tv;
1240 }
1241 case "SetProgram": {
1242 Command.SetProgram_ tv = new Command().new SetProgram_();
1243 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1244 return tv;
1245 }
1246 case "SetSamplerUniform": {
1247 Command.SetSamplerUniform_ tv = new Command().new SetSamplerUniform_();
1248 tv._0 = (String)fromJSON(Type.String,obj.get("arg0"));
1249 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1250 return tv;
1251 }
1252 case "SetTexture": {
1253 Command.SetTexture_ tv = new Command().new SetTexture_();
1254 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1255 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1256 return tv;
1257 }
1258 case "SetSampler": {
1259 Command.SetSampler_ tv = new Command().new SetSampler_();
1260 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1261 tv._1 = (Maybe<Integer>)fromJSON(Type.Maybe_Int,obj.get("arg1"));
1262 return tv;
1263 }
1264 case "RenderSlot": {
1265 Command.RenderSlot_ tv = new Command().new RenderSlot_();
1266 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1267 return tv;
1268 }
1269 case "RenderStream": {
1270 Command.RenderStream_ tv = new Command().new RenderStream_();
1271 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1272 return tv;
1273 }
1274 case "ClearRenderTarget": {
1275 Command.ClearRenderTarget_ tv = new Command().new ClearRenderTarget_();
1276 tv._0 = (ArrayList<ClearImage>)fromJSON(Type.Array_ClearImage,obj.get("arg0"));
1277 return tv;
1278 }
1279 case "GenerateMipMap": {
1280 Command.GenerateMipMap_ tv = new Command().new GenerateMipMap_();
1281 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1282 return tv;
1283 }
1284 case "SaveImage": {
1285 Command.SaveImage_ tv = new Command().new SaveImage_();
1286 tv._0 = (Integer)fromJSON(Type.Int,obj.get("arg0"));
1287 tv._1 = (ImageRef)fromJSON(Type.ImageRef,obj.get("arg1"));
1288 return tv;
1289 }
1290 case "LoadImage": {
1291 Command.LoadImage_ tv = new Command().new LoadImage_();
1292 tv._0 = (ImageRef)fromJSON(Type.ImageRef,obj.get("arg0"));
1293 tv._1 = (Integer)fromJSON(Type.Int,obj.get("arg1"));
1294 return tv;
1295 }
1296 default: throw new Exception("unknown constructor: " + tag);
1297 }
1298 }
1299 case SamplerDescriptor: {
1300 JSONObject obj = (JSONObject)rawObj;
1301 String tag = obj.getString("tag");
1302 switch (tag) {
1303 case "SamplerDescriptor": {
1304 SamplerDescriptor.SamplerDescriptor_ tv = new SamplerDescriptor().new SamplerDescriptor_();
1305 tv.samplerWrapS = (EdgeMode)fromJSON(Type.EdgeMode,obj.get("samplerWrapS"));
1306 tv.samplerWrapT = (Maybe<EdgeMode>)fromJSON(Type.Maybe_EdgeMode,obj.get("samplerWrapT"));
1307 tv.samplerWrapR = (Maybe<EdgeMode>)fromJSON(Type.Maybe_EdgeMode,obj.get("samplerWrapR"));
1308 tv.samplerMinFilter = (Filter)fromJSON(Type.Filter,obj.get("samplerMinFilter"));
1309 tv.samplerMagFilter = (Filter)fromJSON(Type.Filter,obj.get("samplerMagFilter"));
1310 tv.samplerBorderColor = (Value)fromJSON(Type.Value,obj.get("samplerBorderColor"));
1311 tv.samplerMinLod = (Maybe<Float>)fromJSON(Type.Maybe_Float,obj.get("samplerMinLod"));
1312 tv.samplerMaxLod = (Maybe<Float>)fromJSON(Type.Maybe_Float,obj.get("samplerMaxLod"));
1313 tv.samplerLodBias = (Float)fromJSON(Type.Float,obj.get("samplerLodBias"));
1314 tv.samplerCompareFunc = (Maybe<ComparisonFunction>)fromJSON(Type.Maybe_ComparisonFunction,obj.get("samplerCompareFunc"));
1315 return tv;
1316 }
1317 default: throw new Exception("unknown constructor: " + tag);
1318 }
1319 }
1320 case TextureDescriptor: {
1321 JSONObject obj = (JSONObject)rawObj;
1322 String tag = obj.getString("tag");
1323 switch (tag) {
1324 case "TextureDescriptor": {
1325 TextureDescriptor.TextureDescriptor_ tv = new TextureDescriptor().new TextureDescriptor_();
1326 tv.textureType = (TextureType)fromJSON(Type.TextureType,obj.get("textureType"));
1327 tv.textureSize = (Value)fromJSON(Type.Value,obj.get("textureSize"));
1328 tv.textureSemantic = (ImageSemantic)fromJSON(Type.ImageSemantic,obj.get("textureSemantic"));
1329 tv.textureSampler = (SamplerDescriptor)fromJSON(Type.SamplerDescriptor,obj.get("textureSampler"));
1330 tv.textureBaseLevel = (Integer)fromJSON(Type.Int,obj.get("textureBaseLevel"));
1331 tv.textureMaxLevel = (Integer)fromJSON(Type.Int,obj.get("textureMaxLevel"));
1332 return tv;
1333 }
1334 default: throw new Exception("unknown constructor: " + tag);
1335 }
1336 }
1337 case Parameter: {
1338 JSONObject obj = (JSONObject)rawObj;
1339 String tag = obj.getString("tag");
1340 switch (tag) {
1341 case "Parameter": {
1342 Parameter.Parameter_ tv = new Parameter().new Parameter_();
1343 tv.name = (String)fromJSON(Type.String,obj.get("name"));
1344 tv.ty = (InputType)fromJSON(Type.InputType,obj.get("ty"));
1345 return tv;
1346 }
1347 default: throw new Exception("unknown constructor: " + tag);
1348 }
1349 }
1350 case Program: {
1351 JSONObject obj = (JSONObject)rawObj;
1352 String tag = obj.getString("tag");
1353 switch (tag) {
1354 case "Program": {
1355 Program.Program_ tv = new Program().new Program_();
1356 tv.programUniforms = (HashMap<String, InputType>)fromJSON(Type.Map_String_InputType,obj.get("programUniforms"));
1357 tv.programStreams = (HashMap<String, Parameter>)fromJSON(Type.Map_String_Parameter,obj.get("programStreams"));
1358 tv.programInTextures = (HashMap<String, InputType>)fromJSON(Type.Map_String_InputType,obj.get("programInTextures"));
1359 tv.programOutput = (ArrayList<Parameter>)fromJSON(Type.Array_Parameter,obj.get("programOutput"));
1360 tv.vertexShader = (String)fromJSON(Type.String,obj.get("vertexShader"));
1361 tv.geometryShader = (Maybe<String>)fromJSON(Type.Maybe_String,obj.get("geometryShader"));
1362 tv.fragmentShader = (String)fromJSON(Type.String,obj.get("fragmentShader"));
1363 return tv;
1364 }
1365 default: throw new Exception("unknown constructor: " + tag);
1366 }
1367 }
1368 case Slot: {
1369 JSONObject obj = (JSONObject)rawObj;
1370 String tag = obj.getString("tag");
1371 switch (tag) {
1372 case "Slot": {
1373 Slot.Slot_ tv = new Slot().new Slot_();
1374 tv.slotName = (String)fromJSON(Type.String,obj.get("slotName"));
1375 tv.slotStreams = (HashMap<String, InputType>)fromJSON(Type.Map_String_InputType,obj.get("slotStreams"));
1376 tv.slotUniforms = (HashMap<String, InputType>)fromJSON(Type.Map_String_InputType,obj.get("slotUniforms"));
1377 tv.slotPrimitive = (FetchPrimitive)fromJSON(Type.FetchPrimitive,obj.get("slotPrimitive"));
1378 tv.slotPrograms = (ArrayList<Integer>)fromJSON(Type.Array_Int,obj.get("slotPrograms"));
1379 return tv;
1380 }
1381 default: throw new Exception("unknown constructor: " + tag);
1382 }
1383 }
1384 case StreamData: {
1385 JSONObject obj = (JSONObject)rawObj;
1386 String tag = obj.getString("tag");
1387 switch (tag) {
1388 case "StreamData": {
1389 StreamData.StreamData_ tv = new StreamData().new StreamData_();
1390 tv.streamData = (HashMap<String, ArrayValue>)fromJSON(Type.Map_String_ArrayValue,obj.get("streamData"));
1391 tv.streamType = (HashMap<String, InputType>)fromJSON(Type.Map_String_InputType,obj.get("streamType"));
1392 tv.streamPrimitive = (FetchPrimitive)fromJSON(Type.FetchPrimitive,obj.get("streamPrimitive"));
1393 tv.streamPrograms = (ArrayList<Integer>)fromJSON(Type.Array_Int,obj.get("streamPrograms"));
1394 return tv;
1395 }
1396 default: throw new Exception("unknown constructor: " + tag);
1397 }
1398 }
1399 case TargetItem: {
1400 JSONObject obj = (JSONObject)rawObj;
1401 String tag = obj.getString("tag");
1402 switch (tag) {
1403 case "TargetItem": {
1404 TargetItem.TargetItem_ tv = new TargetItem().new TargetItem_();
1405 tv.targetSemantic = (ImageSemantic)fromJSON(Type.ImageSemantic,obj.get("targetSemantic"));
1406 tv.targetRef = (Maybe<ImageRef>)fromJSON(Type.Maybe_ImageRef,obj.get("targetRef"));
1407 return tv;
1408 }
1409 default: throw new Exception("unknown constructor: " + tag);
1410 }
1411 }
1412 case RenderTarget: {
1413 JSONObject obj = (JSONObject)rawObj;
1414 String tag = obj.getString("tag");
1415 switch (tag) {
1416 case "RenderTarget": {
1417 RenderTarget.RenderTarget_ tv = new RenderTarget().new RenderTarget_();
1418 tv.renderTargets = (ArrayList<TargetItem>)fromJSON(Type.Array_TargetItem,obj.get("renderTargets"));
1419 return tv;
1420 }
1421 default: throw new Exception("unknown constructor: " + tag);
1422 }
1423 }
1424 case Backend: {
1425 JSONObject obj = (JSONObject)rawObj;
1426 String tag = obj.getString("tag");
1427 Backend.Tag tagType;
1428 switch (tag) {
1429 case "WebGL1": tagType = Backend.Tag.WebGL1; break;
1430 case "OpenGL33": tagType = Backend.Tag.OpenGL33; break;
1431 default: throw new Exception("unknown constructor: " + tag);
1432 }
1433 Backend o = new Backend();
1434 o.tag = tagType;
1435 return o;
1436 }
1437 case Pipeline: {
1438 JSONObject obj = (JSONObject)rawObj;
1439 String tag = obj.getString("tag");
1440 switch (tag) {
1441 case "Pipeline": {
1442 Pipeline.Pipeline_ tv = new Pipeline().new Pipeline_();
1443 tv.info = (String)fromJSON(Type.String,obj.get("info"));
1444 tv.backend = (Backend)fromJSON(Type.Backend,obj.get("backend"));
1445 tv.textures = (ArrayList<TextureDescriptor>)fromJSON(Type.Array_TextureDescriptor,obj.get("textures"));
1446 tv.samplers = (ArrayList<SamplerDescriptor>)fromJSON(Type.Array_SamplerDescriptor,obj.get("samplers"));
1447 tv.targets = (ArrayList<RenderTarget>)fromJSON(Type.Array_RenderTarget,obj.get("targets"));
1448 tv.programs = (ArrayList<Program>)fromJSON(Type.Array_Program,obj.get("programs"));
1449 tv.slots = (ArrayList<Slot>)fromJSON(Type.Array_Slot,obj.get("slots"));
1450 tv.streams = (ArrayList<StreamData>)fromJSON(Type.Array_StreamData,obj.get("streams"));
1451 tv.commands = (ArrayList<Command>)fromJSON(Type.Array_Command,obj.get("commands"));
1452 return tv;
1453 }
1454 default: throw new Exception("unknown constructor: " + tag);
1455 }
1456 }
1457 }
1458 throw new Exception("unknown type");
1459 }
1460} \ No newline at end of file
diff --git a/ddl/out/java/LambdaCube/IR/LogicOperation.java b/ddl/out/java/LambdaCube/IR/LogicOperation.java
new file mode 100644
index 0000000..351bfe5
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/LogicOperation.java
@@ -0,0 +1,33 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class LogicOperation {
12 public enum Tag {
13 Clear,
14 And,
15 AndReverse,
16 Copy,
17 AndInverted,
18 Noop,
19 Xor,
20 Or,
21 Nor,
22 Equiv,
23 Invert,
24 OrReverse,
25 CopyInverted,
26 OrInverted,
27 Nand,
28 Set
29 }
30 public Tag tag;
31
32}
33
diff --git a/ddl/out/java/LambdaCube/IR/MipMap.java b/ddl/out/java/LambdaCube/IR/MipMap.java
new file mode 100644
index 0000000..69c7fb4
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/MipMap.java
@@ -0,0 +1,30 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class MipMap {
12 public enum Tag {
13 Mip,
14 NoMip,
15 AutoMip
16 }
17 public Tag tag;
18
19 public class Mip_ extends MipMap {
20 public Integer _0;
21 public Integer _1;
22 public Mip_() { tag = MipMap.Tag.Mip; }
23 }
24 public class AutoMip_ extends MipMap {
25 public Integer _0;
26 public Integer _1;
27 public AutoMip_() { tag = MipMap.Tag.AutoMip; }
28 }
29}
30
diff --git a/ddl/out/java/LambdaCube/IR/OutputPrimitive.java b/ddl/out/java/LambdaCube/IR/OutputPrimitive.java
new file mode 100644
index 0000000..cda4e7a
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/OutputPrimitive.java
@@ -0,0 +1,20 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class OutputPrimitive {
12 public enum Tag {
13 TrianglesOutput,
14 LinesOutput,
15 PointsOutput
16 }
17 public Tag tag;
18
19}
20
diff --git a/ddl/out/java/LambdaCube/IR/Parameter.java b/ddl/out/java/LambdaCube/IR/Parameter.java
new file mode 100644
index 0000000..11f6778
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Parameter.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Parameter {
12 public enum Tag {
13 Parameter
14 }
15 public Tag tag;
16
17 public class Parameter_ extends Parameter {
18 public String name;
19 public InputType ty;
20 public Parameter_() { tag = Parameter.Tag.Parameter; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/Pipeline.java b/ddl/out/java/LambdaCube/IR/Pipeline.java
new file mode 100644
index 0000000..5a98897
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Pipeline.java
@@ -0,0 +1,30 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Pipeline {
12 public enum Tag {
13 Pipeline
14 }
15 public Tag tag;
16
17 public class Pipeline_ extends Pipeline {
18 public String info;
19 public Backend backend;
20 public ArrayList<TextureDescriptor> textures;
21 public ArrayList<SamplerDescriptor> samplers;
22 public ArrayList<RenderTarget> targets;
23 public ArrayList<Program> programs;
24 public ArrayList<Slot> slots;
25 public ArrayList<StreamData> streams;
26 public ArrayList<Command> commands;
27 public Pipeline_() { tag = Pipeline.Tag.Pipeline; }
28 }
29}
30
diff --git a/ddl/out/java/LambdaCube/IR/PointSize.java b/ddl/out/java/LambdaCube/IR/PointSize.java
new file mode 100644
index 0000000..195cd89
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/PointSize.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class PointSize {
12 public enum Tag {
13 PointSize,
14 ProgramPointSize
15 }
16 public Tag tag;
17
18 public class PointSize_ extends PointSize {
19 public Float _0;
20 public PointSize_() { tag = PointSize.Tag.PointSize; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/PointSpriteCoordOrigin.java b/ddl/out/java/LambdaCube/IR/PointSpriteCoordOrigin.java
new file mode 100644
index 0000000..6b705bb
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/PointSpriteCoordOrigin.java
@@ -0,0 +1,19 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class PointSpriteCoordOrigin {
12 public enum Tag {
13 LowerLeft,
14 UpperLeft
15 }
16 public Tag tag;
17
18}
19
diff --git a/ddl/out/java/LambdaCube/IR/PolygonMode.java b/ddl/out/java/LambdaCube/IR/PolygonMode.java
new file mode 100644
index 0000000..a1beedc
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/PolygonMode.java
@@ -0,0 +1,28 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class PolygonMode {
12 public enum Tag {
13 PolygonPoint,
14 PolygonLine,
15 PolygonFill
16 }
17 public Tag tag;
18
19 public class PolygonPoint_ extends PolygonMode {
20 public PointSize _0;
21 public PolygonPoint_() { tag = PolygonMode.Tag.PolygonPoint; }
22 }
23 public class PolygonLine_ extends PolygonMode {
24 public Float _0;
25 public PolygonLine_() { tag = PolygonMode.Tag.PolygonLine; }
26 }
27}
28
diff --git a/ddl/out/java/LambdaCube/IR/PolygonOffset.java b/ddl/out/java/LambdaCube/IR/PolygonOffset.java
new file mode 100644
index 0000000..dea6684
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/PolygonOffset.java
@@ -0,0 +1,24 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class PolygonOffset {
12 public enum Tag {
13 NoOffset,
14 Offset
15 }
16 public Tag tag;
17
18 public class Offset_ extends PolygonOffset {
19 public Float _0;
20 public Float _1;
21 public Offset_() { tag = PolygonOffset.Tag.Offset; }
22 }
23}
24
diff --git a/ddl/out/java/LambdaCube/IR/Program.java b/ddl/out/java/LambdaCube/IR/Program.java
new file mode 100644
index 0000000..4f0e999
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Program.java
@@ -0,0 +1,28 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Program {
12 public enum Tag {
13 Program
14 }
15 public Tag tag;
16
17 public class Program_ extends Program {
18 public HashMap<String, InputType> programUniforms;
19 public HashMap<String, Parameter> programStreams;
20 public HashMap<String, InputType> programInTextures;
21 public ArrayList<Parameter> programOutput;
22 public String vertexShader;
23 public Maybe<String> geometryShader;
24 public String fragmentShader;
25 public Program_() { tag = Program.Tag.Program; }
26 }
27}
28
diff --git a/ddl/out/java/LambdaCube/IR/ProvokingVertex.java b/ddl/out/java/LambdaCube/IR/ProvokingVertex.java
new file mode 100644
index 0000000..30ee0fc
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/ProvokingVertex.java
@@ -0,0 +1,19 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class ProvokingVertex {
12 public enum Tag {
13 FirstVertex,
14 LastVertex
15 }
16 public Tag tag;
17
18}
19
diff --git a/ddl/out/java/LambdaCube/IR/RasterContext.java b/ddl/out/java/LambdaCube/IR/RasterContext.java
new file mode 100644
index 0000000..c246a8a
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/RasterContext.java
@@ -0,0 +1,38 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class RasterContext {
12 public enum Tag {
13 PointCtx,
14 LineCtx,
15 TriangleCtx
16 }
17 public Tag tag;
18
19 public class PointCtx_ extends RasterContext {
20 public PointSize _0;
21 public Float _1;
22 public PointSpriteCoordOrigin _2;
23 public PointCtx_() { tag = RasterContext.Tag.PointCtx; }
24 }
25 public class LineCtx_ extends RasterContext {
26 public Float _0;
27 public ProvokingVertex _1;
28 public LineCtx_() { tag = RasterContext.Tag.LineCtx; }
29 }
30 public class TriangleCtx_ extends RasterContext {
31 public CullMode _0;
32 public PolygonMode _1;
33 public PolygonOffset _2;
34 public ProvokingVertex _3;
35 public TriangleCtx_() { tag = RasterContext.Tag.TriangleCtx; }
36 }
37}
38
diff --git a/ddl/out/java/LambdaCube/IR/RenderTarget.java b/ddl/out/java/LambdaCube/IR/RenderTarget.java
new file mode 100644
index 0000000..816dbc6
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/RenderTarget.java
@@ -0,0 +1,22 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class RenderTarget {
12 public enum Tag {
13 RenderTarget
14 }
15 public Tag tag;
16
17 public class RenderTarget_ extends RenderTarget {
18 public ArrayList<TargetItem> renderTargets;
19 public RenderTarget_() { tag = RenderTarget.Tag.RenderTarget; }
20 }
21}
22
diff --git a/ddl/out/java/LambdaCube/IR/SamplerDescriptor.java b/ddl/out/java/LambdaCube/IR/SamplerDescriptor.java
new file mode 100644
index 0000000..1149bf3
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/SamplerDescriptor.java
@@ -0,0 +1,31 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class SamplerDescriptor {
12 public enum Tag {
13 SamplerDescriptor
14 }
15 public Tag tag;
16
17 public class SamplerDescriptor_ extends SamplerDescriptor {
18 public EdgeMode samplerWrapS;
19 public Maybe<EdgeMode> samplerWrapT;
20 public Maybe<EdgeMode> samplerWrapR;
21 public Filter samplerMinFilter;
22 public Filter samplerMagFilter;
23 public Value samplerBorderColor;
24 public Maybe<Float> samplerMinLod;
25 public Maybe<Float> samplerMaxLod;
26 public Float samplerLodBias;
27 public Maybe<ComparisonFunction> samplerCompareFunc;
28 public SamplerDescriptor_() { tag = SamplerDescriptor.Tag.SamplerDescriptor; }
29 }
30}
31
diff --git a/ddl/out/java/LambdaCube/IR/Slot.java b/ddl/out/java/LambdaCube/IR/Slot.java
new file mode 100644
index 0000000..bd6fac3
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Slot.java
@@ -0,0 +1,26 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Slot {
12 public enum Tag {
13 Slot
14 }
15 public Tag tag;
16
17 public class Slot_ extends Slot {
18 public String slotName;
19 public HashMap<String, InputType> slotStreams;
20 public HashMap<String, InputType> slotUniforms;
21 public FetchPrimitive slotPrimitive;
22 public ArrayList<Integer> slotPrograms;
23 public Slot_() { tag = Slot.Tag.Slot; }
24 }
25}
26
diff --git a/ddl/out/java/LambdaCube/IR/StencilOperation.java b/ddl/out/java/LambdaCube/IR/StencilOperation.java
new file mode 100644
index 0000000..ef3a62f
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/StencilOperation.java
@@ -0,0 +1,25 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class StencilOperation {
12 public enum Tag {
13 OpZero,
14 OpKeep,
15 OpReplace,
16 OpIncr,
17 OpIncrWrap,
18 OpDecr,
19 OpDecrWrap,
20 OpInvert
21 }
22 public Tag tag;
23
24}
25
diff --git a/ddl/out/java/LambdaCube/IR/StencilOps.java b/ddl/out/java/LambdaCube/IR/StencilOps.java
new file mode 100644
index 0000000..54f6d95
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/StencilOps.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class StencilOps {
12 public enum Tag {
13 StencilOps
14 }
15 public Tag tag;
16
17 public class StencilOps_ extends StencilOps {
18 public StencilOperation frontStencilOp;
19 public StencilOperation backStencilOp;
20 public StencilOps_() { tag = StencilOps.Tag.StencilOps; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/StencilTest.java b/ddl/out/java/LambdaCube/IR/StencilTest.java
new file mode 100644
index 0000000..ef16647
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/StencilTest.java
@@ -0,0 +1,24 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class StencilTest {
12 public enum Tag {
13 StencilTest
14 }
15 public Tag tag;
16
17 public class StencilTest_ extends StencilTest {
18 public ComparisonFunction stencilComparision;
19 public Integer stencilReference;
20 public Integer stencilMask;
21 public StencilTest_() { tag = StencilTest.Tag.StencilTest; }
22 }
23}
24
diff --git a/ddl/out/java/LambdaCube/IR/StencilTests.java b/ddl/out/java/LambdaCube/IR/StencilTests.java
new file mode 100644
index 0000000..d350f5f
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/StencilTests.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class StencilTests {
12 public enum Tag {
13 StencilTests
14 }
15 public Tag tag;
16
17 public class StencilTests_ extends StencilTests {
18 public StencilTest _0;
19 public StencilTest _1;
20 public StencilTests_() { tag = StencilTests.Tag.StencilTests; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/StreamData.java b/ddl/out/java/LambdaCube/IR/StreamData.java
new file mode 100644
index 0000000..81c9d0b
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/StreamData.java
@@ -0,0 +1,25 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class StreamData {
12 public enum Tag {
13 StreamData
14 }
15 public Tag tag;
16
17 public class StreamData_ extends StreamData {
18 public HashMap<String, ArrayValue> streamData;
19 public HashMap<String, InputType> streamType;
20 public FetchPrimitive streamPrimitive;
21 public ArrayList<Integer> streamPrograms;
22 public StreamData_() { tag = StreamData.Tag.StreamData; }
23 }
24}
25
diff --git a/ddl/out/java/LambdaCube/IR/TargetItem.java b/ddl/out/java/LambdaCube/IR/TargetItem.java
new file mode 100644
index 0000000..f6315fc
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/TargetItem.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class TargetItem {
12 public enum Tag {
13 TargetItem
14 }
15 public Tag tag;
16
17 public class TargetItem_ extends TargetItem {
18 public ImageSemantic targetSemantic;
19 public Maybe<ImageRef> targetRef;
20 public TargetItem_() { tag = TargetItem.Tag.TargetItem; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/IR/TextureDataType.java b/ddl/out/java/LambdaCube/IR/TextureDataType.java
new file mode 100644
index 0000000..4725a3f
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/TextureDataType.java
@@ -0,0 +1,33 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class TextureDataType {
12 public enum Tag {
13 FloatT,
14 IntT,
15 WordT,
16 ShadowT
17 }
18 public Tag tag;
19
20 public class FloatT_ extends TextureDataType {
21 public ColorArity _0;
22 public FloatT_() { tag = TextureDataType.Tag.FloatT; }
23 }
24 public class IntT_ extends TextureDataType {
25 public ColorArity _0;
26 public IntT_() { tag = TextureDataType.Tag.IntT; }
27 }
28 public class WordT_ extends TextureDataType {
29 public ColorArity _0;
30 public WordT_() { tag = TextureDataType.Tag.WordT; }
31 }
32}
33
diff --git a/ddl/out/java/LambdaCube/IR/TextureDescriptor.java b/ddl/out/java/LambdaCube/IR/TextureDescriptor.java
new file mode 100644
index 0000000..d4d3cdd
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/TextureDescriptor.java
@@ -0,0 +1,27 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class TextureDescriptor {
12 public enum Tag {
13 TextureDescriptor
14 }
15 public Tag tag;
16
17 public class TextureDescriptor_ extends TextureDescriptor {
18 public TextureType textureType;
19 public Value textureSize;
20 public ImageSemantic textureSemantic;
21 public SamplerDescriptor textureSampler;
22 public Integer textureBaseLevel;
23 public Integer textureMaxLevel;
24 public TextureDescriptor_() { tag = TextureDescriptor.Tag.TextureDescriptor; }
25 }
26}
27
diff --git a/ddl/out/java/LambdaCube/IR/TextureType.java b/ddl/out/java/LambdaCube/IR/TextureType.java
new file mode 100644
index 0000000..2425c1f
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/TextureType.java
@@ -0,0 +1,57 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class TextureType {
12 public enum Tag {
13 Texture1D,
14 Texture2D,
15 Texture3D,
16 TextureCube,
17 TextureRect,
18 Texture2DMS,
19 TextureBuffer
20 }
21 public Tag tag;
22
23 public class Texture1D_ extends TextureType {
24 public TextureDataType _0;
25 public Integer _1;
26 public Texture1D_() { tag = TextureType.Tag.Texture1D; }
27 }
28 public class Texture2D_ extends TextureType {
29 public TextureDataType _0;
30 public Integer _1;
31 public Texture2D_() { tag = TextureType.Tag.Texture2D; }
32 }
33 public class Texture3D_ extends TextureType {
34 public TextureDataType _0;
35 public Texture3D_() { tag = TextureType.Tag.Texture3D; }
36 }
37 public class TextureCube_ extends TextureType {
38 public TextureDataType _0;
39 public TextureCube_() { tag = TextureType.Tag.TextureCube; }
40 }
41 public class TextureRect_ extends TextureType {
42 public TextureDataType _0;
43 public TextureRect_() { tag = TextureType.Tag.TextureRect; }
44 }
45 public class Texture2DMS_ extends TextureType {
46 public TextureDataType _0;
47 public Integer _1;
48 public Integer _2;
49 public Boolean _3;
50 public Texture2DMS_() { tag = TextureType.Tag.Texture2DMS; }
51 }
52 public class TextureBuffer_ extends TextureType {
53 public TextureDataType _0;
54 public TextureBuffer_() { tag = TextureType.Tag.TextureBuffer; }
55 }
56}
57
diff --git a/ddl/out/java/LambdaCube/IR/Value.java b/ddl/out/java/LambdaCube/IR/Value.java
new file mode 100644
index 0000000..75de175
--- /dev/null
+++ b/ddl/out/java/LambdaCube/IR/Value.java
@@ -0,0 +1,142 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:51.714241000000Z
3
4package LambdaCube.IR;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Value {
12 public enum Tag {
13 VBool,
14 VV2B,
15 VV3B,
16 VV4B,
17 VWord,
18 VV2U,
19 VV3U,
20 VV4U,
21 VInt,
22 VV2I,
23 VV3I,
24 VV4I,
25 VFloat,
26 VV2F,
27 VV3F,
28 VV4F,
29 VM22F,
30 VM23F,
31 VM24F,
32 VM32F,
33 VM33F,
34 VM34F,
35 VM42F,
36 VM43F,
37 VM44F
38 }
39 public Tag tag;
40
41 public class VBool_ extends Value {
42 public Boolean _0;
43 public VBool_() { tag = Value.Tag.VBool; }
44 }
45 public class VV2B_ extends Value {
46 public V2<Boolean> _0;
47 public VV2B_() { tag = Value.Tag.VV2B; }
48 }
49 public class VV3B_ extends Value {
50 public V3<Boolean> _0;
51 public VV3B_() { tag = Value.Tag.VV3B; }
52 }
53 public class VV4B_ extends Value {
54 public V4<Boolean> _0;
55 public VV4B_() { tag = Value.Tag.VV4B; }
56 }
57 public class VWord_ extends Value {
58 public Integer _0;
59 public VWord_() { tag = Value.Tag.VWord; }
60 }
61 public class VV2U_ extends Value {
62 public V2<Integer> _0;
63 public VV2U_() { tag = Value.Tag.VV2U; }
64 }
65 public class VV3U_ extends Value {
66 public V3<Integer> _0;
67 public VV3U_() { tag = Value.Tag.VV3U; }
68 }
69 public class VV4U_ extends Value {
70 public V4<Integer> _0;
71 public VV4U_() { tag = Value.Tag.VV4U; }
72 }
73 public class VInt_ extends Value {
74 public Integer _0;
75 public VInt_() { tag = Value.Tag.VInt; }
76 }
77 public class VV2I_ extends Value {
78 public V2<Integer> _0;
79 public VV2I_() { tag = Value.Tag.VV2I; }
80 }
81 public class VV3I_ extends Value {
82 public V3<Integer> _0;
83 public VV3I_() { tag = Value.Tag.VV3I; }
84 }
85 public class VV4I_ extends Value {
86 public V4<Integer> _0;
87 public VV4I_() { tag = Value.Tag.VV4I; }
88 }
89 public class VFloat_ extends Value {
90 public Float _0;
91 public VFloat_() { tag = Value.Tag.VFloat; }
92 }
93 public class VV2F_ extends Value {
94 public V2<Float> _0;
95 public VV2F_() { tag = Value.Tag.VV2F; }
96 }
97 public class VV3F_ extends Value {
98 public V3<Float> _0;
99 public VV3F_() { tag = Value.Tag.VV3F; }
100 }
101 public class VV4F_ extends Value {
102 public V4<Float> _0;
103 public VV4F_() { tag = Value.Tag.VV4F; }
104 }
105 public class VM22F_ extends Value {
106 public V2<V2<Float>> _0;
107 public VM22F_() { tag = Value.Tag.VM22F; }
108 }
109 public class VM23F_ extends Value {
110 public V3<V2<Float>> _0;
111 public VM23F_() { tag = Value.Tag.VM23F; }
112 }
113 public class VM24F_ extends Value {
114 public V4<V2<Float>> _0;
115 public VM24F_() { tag = Value.Tag.VM24F; }
116 }
117 public class VM32F_ extends Value {
118 public V2<V3<Float>> _0;
119 public VM32F_() { tag = Value.Tag.VM32F; }
120 }
121 public class VM33F_ extends Value {
122 public V3<V3<Float>> _0;
123 public VM33F_() { tag = Value.Tag.VM33F; }
124 }
125 public class VM34F_ extends Value {
126 public V4<V3<Float>> _0;
127 public VM34F_() { tag = Value.Tag.VM34F; }
128 }
129 public class VM42F_ extends Value {
130 public V2<V4<Float>> _0;
131 public VM42F_() { tag = Value.Tag.VM42F; }
132 }
133 public class VM43F_ extends Value {
134 public V3<V4<Float>> _0;
135 public VM43F_() { tag = Value.Tag.VM43F; }
136 }
137 public class VM44F_ extends Value {
138 public V4<V4<Float>> _0;
139 public VM44F_() { tag = Value.Tag.VM44F; }
140 }
141}
142
diff --git a/ddl/out/java/LambdaCube/Mesh/JSON.java b/ddl/out/java/LambdaCube/Mesh/JSON.java
new file mode 100644
index 0000000..db0641e
--- /dev/null
+++ b/ddl/out/java/LambdaCube/Mesh/JSON.java
@@ -0,0 +1,206 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.391032000000Z
3
4package LambdaCube.Mesh;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import org.json.*;
9import RT.*;
10
11
12public class JSON {
13 // JSON deserializer
14 public enum Type {
15 Int32,
16 Word32,
17 Float,
18 String,
19 V2_Float,
20 V2_V2_Float,
21 V3_Float,
22 V3_V3_Float,
23 V4_Float,
24 V4_V4_Float,
25 Array_Int32,
26 Array_Word32,
27 Array_Float,
28 Array_V2_Float,
29 Array_V2_V2_Float,
30 Array_V3_Float,
31 Array_V3_V3_Float,
32 Array_V4_Float,
33 Array_V4_V4_Float,
34 Map_String_MeshAttribute,
35 Mesh,
36 MeshAttribute,
37 MeshPrimitive
38 }
39
40 public static Object fromJSON(Type type, Object rawObj) throws JSONException, Exception {
41 switch (type) {
42 case Int32: return (Integer)rawObj;
43 case Word32: return (Integer)rawObj;
44 case Float: return (Float)rawObj;
45 case String: return (String)rawObj;
46 case V2_Float: {
47 JSONObject obj = (JSONObject)rawObj;
48 return new V2<Float>
49 ( (Float)fromJSON(Type.Float,obj.get("x"))
50 , (Float)fromJSON(Type.Float,obj.get("y"))
51 );
52 }
53 case V2_V2_Float: {
54 JSONObject obj = (JSONObject)rawObj;
55 return new V2<V2<Float>>
56 ( (V2<Float>)fromJSON(Type.V2_Float,obj.get("x"))
57 , (V2<Float>)fromJSON(Type.V2_Float,obj.get("y"))
58 );
59 }
60 case V3_Float: {
61 JSONObject obj = (JSONObject)rawObj;
62 return new V3<Float>
63 ( (Float)fromJSON(Type.Float,obj.get("x"))
64 , (Float)fromJSON(Type.Float,obj.get("y"))
65 , (Float)fromJSON(Type.Float,obj.get("z"))
66 );
67 }
68 case V3_V3_Float: {
69 JSONObject obj = (JSONObject)rawObj;
70 return new V3<V3<Float>>
71 ( (V3<Float>)fromJSON(Type.V3_Float,obj.get("x"))
72 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("y"))
73 , (V3<Float>)fromJSON(Type.V3_Float,obj.get("z"))
74 );
75 }
76 case V4_Float: {
77 JSONObject obj = (JSONObject)rawObj;
78 return new V4<Float>
79 ( (Float)fromJSON(Type.Float,obj.get("x"))
80 , (Float)fromJSON(Type.Float,obj.get("y"))
81 , (Float)fromJSON(Type.Float,obj.get("z"))
82 , (Float)fromJSON(Type.Float,obj.get("w"))
83 );
84 }
85 case V4_V4_Float: {
86 JSONObject obj = (JSONObject)rawObj;
87 return new V4<V4<Float>>
88 ( (V4<Float>)fromJSON(Type.V4_Float,obj.get("x"))
89 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("y"))
90 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("z"))
91 , (V4<Float>)fromJSON(Type.V4_Float,obj.get("w"))
92 );
93 }
94// case Array_Int32: return ((JArray)obj).Select(x => fromJSON (Type.Int32, x)).ToList();
95// case Array_Word32: return ((JArray)obj).Select(x => fromJSON (Type.Word32, x)).ToList();
96// case Array_Float: return ((JArray)obj).Select(x => fromJSON (Type.Float, x)).ToList();
97// case Array_V2_Float: return ((JArray)obj).Select(x => fromJSON (Type.V2_Float, x)).ToList();
98// case Array_V2_V2_Float: return ((JArray)obj).Select(x => fromJSON (Type.V2_V2_Float, x)).ToList();
99// case Array_V3_Float: return ((JArray)obj).Select(x => fromJSON (Type.V3_Float, x)).ToList();
100// case Array_V3_V3_Float: return ((JArray)obj).Select(x => fromJSON (Type.V3_V3_Float, x)).ToList();
101// case Array_V4_Float: return ((JArray)obj).Select(x => fromJSON (Type.V4_Float, x)).ToList();
102// case Array_V4_V4_Float: return ((JArray)obj).Select(x => fromJSON (Type.V4_V4_Float, x)).ToList();
103/*
104 case Map_String_MeshAttribute: {
105 var map = new HashMap<String, MeshAttribute> ();
106 foreach(var i in (JSONObject)rawObj) {
107 map.Add( (String)fromJSON(Type.String,i.Key)
108 , (MeshAttribute)fromJSON(Type.MeshAttribute,i.Value));
109 }
110 return map;
111 }
112*/
113
114 case MeshAttribute: {
115 JSONObject obj = (JSONObject)rawObj;
116 String tag = obj.getString("tag");
117 switch (tag) {
118 case "A_Float": {
119 MeshAttribute.A_Float_ tv = new MeshAttribute().new A_Float_();
120 tv._0 = (ArrayList<Float>)fromJSON(Type.Array_Float,obj.get("arg0"));
121 return tv;
122 }
123 case "A_V2F": {
124 MeshAttribute.A_V2F_ tv = new MeshAttribute().new A_V2F_();
125 tv._0 = (ArrayList<V2<Float>>)fromJSON(Type.Array_V2_Float,obj.get("arg0"));
126 return tv;
127 }
128 case "A_V3F": {
129 MeshAttribute.A_V3F_ tv = new MeshAttribute().new A_V3F_();
130 tv._0 = (ArrayList<V3<Float>>)fromJSON(Type.Array_V3_Float,obj.get("arg0"));
131 return tv;
132 }
133 case "A_V4F": {
134 MeshAttribute.A_V4F_ tv = new MeshAttribute().new A_V4F_();
135 tv._0 = (ArrayList<V4<Float>>)fromJSON(Type.Array_V4_Float,obj.get("arg0"));
136 return tv;
137 }
138 case "A_M22F": {
139 MeshAttribute.A_M22F_ tv = new MeshAttribute().new A_M22F_();
140 tv._0 = (ArrayList<V2<V2<Float>>>)fromJSON(Type.Array_V2_V2_Float,obj.get("arg0"));
141 return tv;
142 }
143 case "A_M33F": {
144 MeshAttribute.A_M33F_ tv = new MeshAttribute().new A_M33F_();
145 tv._0 = (ArrayList<V3<V3<Float>>>)fromJSON(Type.Array_V3_V3_Float,obj.get("arg0"));
146 return tv;
147 }
148 case "A_M44F": {
149 MeshAttribute.A_M44F_ tv = new MeshAttribute().new A_M44F_();
150 tv._0 = (ArrayList<V4<V4<Float>>>)fromJSON(Type.Array_V4_V4_Float,obj.get("arg0"));
151 return tv;
152 }
153 case "A_Int": {
154 MeshAttribute.A_Int_ tv = new MeshAttribute().new A_Int_();
155 tv._0 = (ArrayList<Integer>)fromJSON(Type.Array_Int32,obj.get("arg0"));
156 return tv;
157 }
158 case "A_Word": {
159 MeshAttribute.A_Word_ tv = new MeshAttribute().new A_Word_();
160 tv._0 = (ArrayList<Integer>)fromJSON(Type.Array_Word32,obj.get("arg0"));
161 return tv;
162 }
163 default: throw new Exception("unknown constructor: " + tag);
164 }
165 }
166 case MeshPrimitive: {
167 JSONObject obj = (JSONObject)rawObj;
168 String tag = obj.getString("tag");
169 MeshPrimitive.Tag tagType;
170 switch (tag) {
171 case "P_Points": tagType = MeshPrimitive.Tag.P_Points; break;
172 case "P_TriangleStrip": tagType = MeshPrimitive.Tag.P_TriangleStrip; break;
173 case "P_Triangles": tagType = MeshPrimitive.Tag.P_Triangles; break;
174 case "P_TriangleStripI": {
175 MeshPrimitive.P_TriangleStripI_ tv = new MeshPrimitive().new P_TriangleStripI_();
176 tv._0 = (ArrayList<Integer>)fromJSON(Type.Array_Int32,obj.get("arg0"));
177 return tv;
178 }
179 case "P_TrianglesI": {
180 MeshPrimitive.P_TrianglesI_ tv = new MeshPrimitive().new P_TrianglesI_();
181 tv._0 = (ArrayList<Integer>)fromJSON(Type.Array_Int32,obj.get("arg0"));
182 return tv;
183 }
184 default: throw new Exception("unknown constructor: " + tag);
185 }
186 MeshPrimitive o = new MeshPrimitive();
187 o.tag = tagType;
188 return o;
189 }
190 case Mesh: {
191 JSONObject obj = (JSONObject)rawObj;
192 String tag = obj.getString("tag");
193 switch (tag) {
194 case "Mesh": {
195 Mesh.Mesh_ tv = new Mesh().new Mesh_();
196 tv.mAttributes = (HashMap<String, MeshAttribute>)fromJSON(Type.Map_String_MeshAttribute,obj.get("mAttributes"));
197 tv.mPrimitive = (MeshPrimitive)fromJSON(Type.MeshPrimitive,obj.get("mPrimitive"));
198 return tv;
199 }
200 default: throw new Exception("unknown constructor: " + tag);
201 }
202 }
203 }
204 throw new Exception("unknown type");
205 }
206} \ No newline at end of file
diff --git a/ddl/out/java/LambdaCube/Mesh/Mesh.java b/ddl/out/java/LambdaCube/Mesh/Mesh.java
new file mode 100644
index 0000000..b708db9
--- /dev/null
+++ b/ddl/out/java/LambdaCube/Mesh/Mesh.java
@@ -0,0 +1,23 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.391032000000Z
3
4package LambdaCube.Mesh;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class Mesh {
12 public enum Tag {
13 Mesh
14 }
15 public Tag tag;
16
17 public class Mesh_ extends Mesh {
18 public HashMap<String, MeshAttribute> mAttributes;
19 public MeshPrimitive mPrimitive;
20 public Mesh_() { tag = Mesh.Tag.Mesh; }
21 }
22}
23
diff --git a/ddl/out/java/LambdaCube/Mesh/MeshAttribute.java b/ddl/out/java/LambdaCube/Mesh/MeshAttribute.java
new file mode 100644
index 0000000..585138c
--- /dev/null
+++ b/ddl/out/java/LambdaCube/Mesh/MeshAttribute.java
@@ -0,0 +1,62 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.391032000000Z
3
4package LambdaCube.Mesh;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class MeshAttribute {
12 public enum Tag {
13 A_Float,
14 A_V2F,
15 A_V3F,
16 A_V4F,
17 A_M22F,
18 A_M33F,
19 A_M44F,
20 A_Int,
21 A_Word
22 }
23 public Tag tag;
24
25 public class A_Float_ extends MeshAttribute {
26 public ArrayList<Float> _0;
27 public A_Float_() { tag = MeshAttribute.Tag.A_Float; }
28 }
29 public class A_V2F_ extends MeshAttribute {
30 public ArrayList<V2<Float>> _0;
31 public A_V2F_() { tag = MeshAttribute.Tag.A_V2F; }
32 }
33 public class A_V3F_ extends MeshAttribute {
34 public ArrayList<V3<Float>> _0;
35 public A_V3F_() { tag = MeshAttribute.Tag.A_V3F; }
36 }
37 public class A_V4F_ extends MeshAttribute {
38 public ArrayList<V4<Float>> _0;
39 public A_V4F_() { tag = MeshAttribute.Tag.A_V4F; }
40 }
41 public class A_M22F_ extends MeshAttribute {
42 public ArrayList<V2<V2<Float>>> _0;
43 public A_M22F_() { tag = MeshAttribute.Tag.A_M22F; }
44 }
45 public class A_M33F_ extends MeshAttribute {
46 public ArrayList<V3<V3<Float>>> _0;
47 public A_M33F_() { tag = MeshAttribute.Tag.A_M33F; }
48 }
49 public class A_M44F_ extends MeshAttribute {
50 public ArrayList<V4<V4<Float>>> _0;
51 public A_M44F_() { tag = MeshAttribute.Tag.A_M44F; }
52 }
53 public class A_Int_ extends MeshAttribute {
54 public ArrayList<Integer> _0;
55 public A_Int_() { tag = MeshAttribute.Tag.A_Int; }
56 }
57 public class A_Word_ extends MeshAttribute {
58 public ArrayList<Integer> _0;
59 public A_Word_() { tag = MeshAttribute.Tag.A_Word; }
60 }
61}
62
diff --git a/ddl/out/java/LambdaCube/Mesh/MeshPrimitive.java b/ddl/out/java/LambdaCube/Mesh/MeshPrimitive.java
new file mode 100644
index 0000000..8fd3b52
--- /dev/null
+++ b/ddl/out/java/LambdaCube/Mesh/MeshPrimitive.java
@@ -0,0 +1,30 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.391032000000Z
3
4package LambdaCube.Mesh;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10
11public class MeshPrimitive {
12 public enum Tag {
13 P_Points,
14 P_TriangleStrip,
15 P_Triangles,
16 P_TriangleStripI,
17 P_TrianglesI
18 }
19 public Tag tag;
20
21 public class P_TriangleStripI_ extends MeshPrimitive {
22 public ArrayList<Integer> _0;
23 public P_TriangleStripI_() { tag = MeshPrimitive.Tag.P_TriangleStripI; }
24 }
25 public class P_TrianglesI_ extends MeshPrimitive {
26 public ArrayList<Integer> _0;
27 public P_TrianglesI_() { tag = MeshPrimitive.Tag.P_TrianglesI; }
28 }
29}
30
diff --git a/ddl/out/java/LambdaCube/PipelineSchema/JSON.java b/ddl/out/java/LambdaCube/PipelineSchema/JSON.java
new file mode 100644
index 0000000..4303a7f
--- /dev/null
+++ b/ddl/out/java/LambdaCube/PipelineSchema/JSON.java
@@ -0,0 +1,122 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.343859000000Z
3
4package LambdaCube.PipelineSchema;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import org.json.*;
9import RT.*;
10
11import LambdaCube.IR.*;
12
13public class JSON {
14 // JSON deserializer
15 public enum Type {
16 String,
17 Map_String_InputType,
18 Map_String_ObjectArraySchema,
19 Map_String_StreamType,
20 FetchPrimitive,
21 InputType,
22 ObjectArraySchema,
23 PipelineSchema,
24 StreamType
25 }
26
27 public static Object fromJSON(Type type, Object rawObj) throws JSONException, Exception {
28 switch (type) {
29 case String: return (String)rawObj;
30/*
31 case Map_String_InputType: {
32 var map = new HashMap<String, InputType> ();
33 foreach(var i in (JSONObject)rawObj) {
34 map.Add( (String)fromJSON(Type.String,i.Key)
35 , (InputType)fromJSON(Type.InputType,i.Value));
36 }
37 return map;
38 }
39*/
40/*
41 case Map_String_ObjectArraySchema: {
42 var map = new HashMap<String, ObjectArraySchema> ();
43 foreach(var i in (JSONObject)rawObj) {
44 map.Add( (String)fromJSON(Type.String,i.Key)
45 , (ObjectArraySchema)fromJSON(Type.ObjectArraySchema,i.Value));
46 }
47 return map;
48 }
49*/
50/*
51 case Map_String_StreamType: {
52 var map = new HashMap<String, StreamType> ();
53 foreach(var i in (JSONObject)rawObj) {
54 map.Add( (String)fromJSON(Type.String,i.Key)
55 , (StreamType)fromJSON(Type.StreamType,i.Value));
56 }
57 return map;
58 }
59*/
60
61 case StreamType: {
62 JSONObject obj = (JSONObject)rawObj;
63 String tag = obj.getString("tag");
64 StreamType.Tag tagType;
65 switch (tag) {
66 case "Attribute_Word": tagType = StreamType.Tag.Attribute_Word; break;
67 case "Attribute_V2U": tagType = StreamType.Tag.Attribute_V2U; break;
68 case "Attribute_V3U": tagType = StreamType.Tag.Attribute_V3U; break;
69 case "Attribute_V4U": tagType = StreamType.Tag.Attribute_V4U; break;
70 case "Attribute_Int": tagType = StreamType.Tag.Attribute_Int; break;
71 case "Attribute_V2I": tagType = StreamType.Tag.Attribute_V2I; break;
72 case "Attribute_V3I": tagType = StreamType.Tag.Attribute_V3I; break;
73 case "Attribute_V4I": tagType = StreamType.Tag.Attribute_V4I; break;
74 case "Attribute_Float": tagType = StreamType.Tag.Attribute_Float; break;
75 case "Attribute_V2F": tagType = StreamType.Tag.Attribute_V2F; break;
76 case "Attribute_V3F": tagType = StreamType.Tag.Attribute_V3F; break;
77 case "Attribute_V4F": tagType = StreamType.Tag.Attribute_V4F; break;
78 case "Attribute_M22F": tagType = StreamType.Tag.Attribute_M22F; break;
79 case "Attribute_M23F": tagType = StreamType.Tag.Attribute_M23F; break;
80 case "Attribute_M24F": tagType = StreamType.Tag.Attribute_M24F; break;
81 case "Attribute_M32F": tagType = StreamType.Tag.Attribute_M32F; break;
82 case "Attribute_M33F": tagType = StreamType.Tag.Attribute_M33F; break;
83 case "Attribute_M34F": tagType = StreamType.Tag.Attribute_M34F; break;
84 case "Attribute_M42F": tagType = StreamType.Tag.Attribute_M42F; break;
85 case "Attribute_M43F": tagType = StreamType.Tag.Attribute_M43F; break;
86 case "Attribute_M44F": tagType = StreamType.Tag.Attribute_M44F; break;
87 default: throw new Exception("unknown constructor: " + tag);
88 }
89 StreamType o = new StreamType();
90 o.tag = tagType;
91 return o;
92 }
93 case ObjectArraySchema: {
94 JSONObject obj = (JSONObject)rawObj;
95 String tag = obj.getString("tag");
96 switch (tag) {
97 case "ObjectArraySchema": {
98 ObjectArraySchema.ObjectArraySchema_ tv = new ObjectArraySchema().new ObjectArraySchema_();
99 tv.primitive = (FetchPrimitive)fromJSON(Type.FetchPrimitive,obj.get("primitive"));
100 tv.attributes = (HashMap<String, StreamType>)fromJSON(Type.Map_String_StreamType,obj.get("attributes"));
101 return tv;
102 }
103 default: throw new Exception("unknown constructor: " + tag);
104 }
105 }
106 case PipelineSchema: {
107 JSONObject obj = (JSONObject)rawObj;
108 String tag = obj.getString("tag");
109 switch (tag) {
110 case "PipelineSchema": {
111 PipelineSchema.PipelineSchema_ tv = new PipelineSchema().new PipelineSchema_();
112 tv.objectArrays = (HashMap<String, ObjectArraySchema>)fromJSON(Type.Map_String_ObjectArraySchema,obj.get("objectArrays"));
113 tv.uniforms = (HashMap<String, InputType>)fromJSON(Type.Map_String_InputType,obj.get("uniforms"));
114 return tv;
115 }
116 default: throw new Exception("unknown constructor: " + tag);
117 }
118 }
119 }
120 throw new Exception("unknown type");
121 }
122} \ No newline at end of file
diff --git a/ddl/out/java/LambdaCube/PipelineSchema/ObjectArraySchema.java b/ddl/out/java/LambdaCube/PipelineSchema/ObjectArraySchema.java
new file mode 100644
index 0000000..ffbcf56
--- /dev/null
+++ b/ddl/out/java/LambdaCube/PipelineSchema/ObjectArraySchema.java
@@ -0,0 +1,24 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.343859000000Z
3
4package LambdaCube.PipelineSchema;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11
12public class ObjectArraySchema {
13 public enum Tag {
14 ObjectArraySchema
15 }
16 public Tag tag;
17
18 public class ObjectArraySchema_ extends ObjectArraySchema {
19 public FetchPrimitive primitive;
20 public HashMap<String, StreamType> attributes;
21 public ObjectArraySchema_() { tag = ObjectArraySchema.Tag.ObjectArraySchema; }
22 }
23}
24
diff --git a/ddl/out/java/LambdaCube/PipelineSchema/PipelineSchema.java b/ddl/out/java/LambdaCube/PipelineSchema/PipelineSchema.java
new file mode 100644
index 0000000..a2f22ac
--- /dev/null
+++ b/ddl/out/java/LambdaCube/PipelineSchema/PipelineSchema.java
@@ -0,0 +1,24 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.343859000000Z
3
4package LambdaCube.PipelineSchema;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11
12public class PipelineSchema {
13 public enum Tag {
14 PipelineSchema
15 }
16 public Tag tag;
17
18 public class PipelineSchema_ extends PipelineSchema {
19 public HashMap<String, ObjectArraySchema> objectArrays;
20 public HashMap<String, InputType> uniforms;
21 public PipelineSchema_() { tag = PipelineSchema.Tag.PipelineSchema; }
22 }
23}
24
diff --git a/ddl/out/java/LambdaCube/PipelineSchema/StreamType.java b/ddl/out/java/LambdaCube/PipelineSchema/StreamType.java
new file mode 100644
index 0000000..75af8d5
--- /dev/null
+++ b/ddl/out/java/LambdaCube/PipelineSchema/StreamType.java
@@ -0,0 +1,39 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.343859000000Z
3
4package LambdaCube.PipelineSchema;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11
12public class StreamType {
13 public enum Tag {
14 Attribute_Word,
15 Attribute_V2U,
16 Attribute_V3U,
17 Attribute_V4U,
18 Attribute_Int,
19 Attribute_V2I,
20 Attribute_V3I,
21 Attribute_V4I,
22 Attribute_Float,
23 Attribute_V2F,
24 Attribute_V3F,
25 Attribute_V4F,
26 Attribute_M22F,
27 Attribute_M23F,
28 Attribute_M24F,
29 Attribute_M32F,
30 Attribute_M33F,
31 Attribute_M34F,
32 Attribute_M42F,
33 Attribute_M43F,
34 Attribute_M44F
35 }
36 public Tag tag;
37
38}
39
diff --git a/ddl/out/java/LambdaCube/TypeInfo/CompileResult.java b/ddl/out/java/LambdaCube/TypeInfo/CompileResult.java
new file mode 100644
index 0000000..340d92e
--- /dev/null
+++ b/ddl/out/java/LambdaCube/TypeInfo/CompileResult.java
@@ -0,0 +1,32 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.460562000000Z
3
4package LambdaCube.TypeInfo;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11
12public class CompileResult {
13 public enum Tag {
14 CompileError,
15 Compiled
16 }
17 public Tag tag;
18
19 public class CompileError_ extends CompileResult {
20 public ArrayList<Range> _0;
21 public String _1;
22 public ArrayList<TypeInfo> _2;
23 public CompileError_() { tag = CompileResult.Tag.CompileError; }
24 }
25 public class Compiled_ extends CompileResult {
26 public String _0;
27 public Pipeline _1;
28 public ArrayList<TypeInfo> _2;
29 public Compiled_() { tag = CompileResult.Tag.Compiled; }
30 }
31}
32
diff --git a/ddl/out/java/LambdaCube/TypeInfo/JSON.java b/ddl/out/java/LambdaCube/TypeInfo/JSON.java
new file mode 100644
index 0000000..410ce3f
--- /dev/null
+++ b/ddl/out/java/LambdaCube/TypeInfo/JSON.java
@@ -0,0 +1,85 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.460562000000Z
3
4package LambdaCube.TypeInfo;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import org.json.*;
9import RT.*;
10
11import LambdaCube.IR.*;
12
13public class JSON {
14 // JSON deserializer
15 public enum Type {
16 Int,
17 String,
18 Array_Range,
19 Array_TypeInfo,
20 CompileResult,
21 Pipeline,
22 Range,
23 TypeInfo
24 }
25
26 public static Object fromJSON(Type type, Object rawObj) throws JSONException, Exception {
27 switch (type) {
28 case Int: return (Integer)rawObj;
29 case String: return (String)rawObj;
30// case Array_Range: return ((JArray)obj).Select(x => fromJSON (Type.Range, x)).ToList();
31// case Array_TypeInfo: return ((JArray)obj).Select(x => fromJSON (Type.TypeInfo, x)).ToList();
32
33 case Range: {
34 JSONObject obj = (JSONObject)rawObj;
35 String tag = obj.getString("tag");
36 switch (tag) {
37 case "Range": {
38 Range.Range_ tv = new Range().new Range_();
39 tv.startLine = (Integer)fromJSON(Type.Int,obj.get("startLine"));
40 tv.startColumn = (Integer)fromJSON(Type.Int,obj.get("startColumn"));
41 tv.endLine = (Integer)fromJSON(Type.Int,obj.get("endLine"));
42 tv.endColumn = (Integer)fromJSON(Type.Int,obj.get("endColumn"));
43 return tv;
44 }
45 default: throw new Exception("unknown constructor: " + tag);
46 }
47 }
48 case TypeInfo: {
49 JSONObject obj = (JSONObject)rawObj;
50 String tag = obj.getString("tag");
51 switch (tag) {
52 case "TypeInfo": {
53 TypeInfo.TypeInfo_ tv = new TypeInfo().new TypeInfo_();
54 tv.range = (Range)fromJSON(Type.Range,obj.get("range"));
55 tv.text = (String)fromJSON(Type.String,obj.get("text"));
56 return tv;
57 }
58 default: throw new Exception("unknown constructor: " + tag);
59 }
60 }
61 case CompileResult: {
62 JSONObject obj = (JSONObject)rawObj;
63 String tag = obj.getString("tag");
64 switch (tag) {
65 case "CompileError": {
66 CompileResult.CompileError_ tv = new CompileResult().new CompileError_();
67 tv._0 = (ArrayList<Range>)fromJSON(Type.Array_Range,obj.get("arg0"));
68 tv._1 = (String)fromJSON(Type.String,obj.get("arg1"));
69 tv._2 = (ArrayList<TypeInfo>)fromJSON(Type.Array_TypeInfo,obj.get("arg2"));
70 return tv;
71 }
72 case "Compiled": {
73 CompileResult.Compiled_ tv = new CompileResult().new Compiled_();
74 tv._0 = (String)fromJSON(Type.String,obj.get("arg0"));
75 tv._1 = (Pipeline)fromJSON(Type.Pipeline,obj.get("arg1"));
76 tv._2 = (ArrayList<TypeInfo>)fromJSON(Type.Array_TypeInfo,obj.get("arg2"));
77 return tv;
78 }
79 default: throw new Exception("unknown constructor: " + tag);
80 }
81 }
82 }
83 throw new Exception("unknown type");
84 }
85} \ No newline at end of file
diff --git a/ddl/out/java/LambdaCube/TypeInfo/Range.java b/ddl/out/java/LambdaCube/TypeInfo/Range.java
new file mode 100644
index 0000000..8bb89d4
--- /dev/null
+++ b/ddl/out/java/LambdaCube/TypeInfo/Range.java
@@ -0,0 +1,26 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.460562000000Z
3
4package LambdaCube.TypeInfo;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11
12public class Range {
13 public enum Tag {
14 Range
15 }
16 public Tag tag;
17
18 public class Range_ extends Range {
19 public Integer startLine;
20 public Integer startColumn;
21 public Integer endLine;
22 public Integer endColumn;
23 public Range_() { tag = Range.Tag.Range; }
24 }
25}
26
diff --git a/ddl/out/java/LambdaCube/TypeInfo/TypeInfo.java b/ddl/out/java/LambdaCube/TypeInfo/TypeInfo.java
new file mode 100644
index 0000000..a134fdb
--- /dev/null
+++ b/ddl/out/java/LambdaCube/TypeInfo/TypeInfo.java
@@ -0,0 +1,24 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.460562000000Z
3
4package LambdaCube.TypeInfo;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11
12public class TypeInfo {
13 public enum Tag {
14 TypeInfo
15 }
16 public Tag tag;
17
18 public class TypeInfo_ extends TypeInfo {
19 public Range range;
20 public String text;
21 public TypeInfo_() { tag = TypeInfo.Tag.TypeInfo; }
22 }
23}
24
diff --git a/ddl/out/java/TestData/ClientInfo.java b/ddl/out/java/TestData/ClientInfo.java
new file mode 100644
index 0000000..667c957
--- /dev/null
+++ b/ddl/out/java/TestData/ClientInfo.java
@@ -0,0 +1,26 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11import LambdaCube.Mesh.*;
12import LambdaCube.PipelineSchema.*;
13
14public class ClientInfo {
15 public enum Tag {
16 ClientInfo
17 }
18 public Tag tag;
19
20 public class ClientInfo_ extends ClientInfo {
21 public String clientName;
22 public Backend clientBackend;
23 public ClientInfo_() { tag = ClientInfo.Tag.ClientInfo; }
24 }
25}
26
diff --git a/ddl/out/java/TestData/Frame.java b/ddl/out/java/TestData/Frame.java
new file mode 100644
index 0000000..39db4a4
--- /dev/null
+++ b/ddl/out/java/TestData/Frame.java
@@ -0,0 +1,27 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11import LambdaCube.Mesh.*;
12import LambdaCube.PipelineSchema.*;
13
14public class Frame {
15 public enum Tag {
16 Frame
17 }
18 public Tag tag;
19
20 public class Frame_ extends Frame {
21 public Integer renderCount;
22 public HashMap<String, Value> frameUniforms;
23 public HashMap<String, Integer> frameTextures;
24 public Frame_() { tag = Frame.Tag.Frame; }
25 }
26}
27
diff --git a/ddl/out/java/TestData/FrameResult.java b/ddl/out/java/TestData/FrameResult.java
new file mode 100644
index 0000000..e1e51db
--- /dev/null
+++ b/ddl/out/java/TestData/FrameResult.java
@@ -0,0 +1,27 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11import LambdaCube.Mesh.*;
12import LambdaCube.PipelineSchema.*;
13
14public class FrameResult {
15 public enum Tag {
16 FrameResult
17 }
18 public Tag tag;
19
20 public class FrameResult_ extends FrameResult {
21 public ArrayList<Float> frRenderTimes;
22 public Integer frImageWidth;
23 public Integer frImageHeight;
24 public FrameResult_() { tag = FrameResult.Tag.FrameResult; }
25 }
26}
27
diff --git a/ddl/out/java/TestData/JSON.java b/ddl/out/java/TestData/JSON.java
new file mode 100644
index 0000000..4fbe47e
--- /dev/null
+++ b/ddl/out/java/TestData/JSON.java
@@ -0,0 +1,193 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import org.json.*;
9import RT.*;
10
11import LambdaCube.IR.*;
12import LambdaCube.Mesh.*;
13import LambdaCube.PipelineSchema.*;
14
15public class JSON {
16 // JSON deserializer
17 public enum Type {
18 Int,
19 Float,
20 String,
21 Array_Int,
22 Array_Float,
23 Array_String,
24 Array_Frame,
25 Array_Mesh,
26 Array_PipelineInfo,
27 Array_Scene,
28 Map_String_Int,
29 Map_String_Array_Int,
30 Map_String_Value,
31 Backend,
32 ClientInfo,
33 Frame,
34 FrameResult,
35 Mesh,
36 Pipeline,
37 PipelineInfo,
38 PipelineSchema,
39 RenderJob,
40 RenderJobResult,
41 Scene,
42 Value
43 }
44
45 public static Object fromJSON(Type type, Object rawObj) throws JSONException, Exception {
46 switch (type) {
47 case Int: return (Integer)rawObj;
48 case Float: return (Float)rawObj;
49 case String: return (String)rawObj;
50// case Array_Int: return ((JArray)obj).Select(x => fromJSON (Type.Int, x)).ToList();
51// case Array_Float: return ((JArray)obj).Select(x => fromJSON (Type.Float, x)).ToList();
52// case Array_String: return ((JArray)obj).Select(x => fromJSON (Type.String, x)).ToList();
53// case Array_Frame: return ((JArray)obj).Select(x => fromJSON (Type.Frame, x)).ToList();
54// case Array_Mesh: return ((JArray)obj).Select(x => fromJSON (Type.Mesh, x)).ToList();
55// case Array_PipelineInfo: return ((JArray)obj).Select(x => fromJSON (Type.PipelineInfo, x)).ToList();
56// case Array_Scene: return ((JArray)obj).Select(x => fromJSON (Type.Scene, x)).ToList();
57/*
58 case Map_String_Int: {
59 var map = new HashMap<String, Integer> ();
60 foreach(var i in (JSONObject)rawObj) {
61 map.Add( (String)fromJSON(Type.String,i.Key)
62 , (Integer)fromJSON(Type.Int,i.Value));
63 }
64 return map;
65 }
66*/
67/*
68 case Map_String_Array_Int: {
69 var map = new HashMap<String, ArrayList<Integer>> ();
70 foreach(var i in (JSONObject)rawObj) {
71 map.Add( (String)fromJSON(Type.String,i.Key)
72 , (ArrayList<Integer>)fromJSON(Type.Array_Int,i.Value));
73 }
74 return map;
75 }
76*/
77/*
78 case Map_String_Value: {
79 var map = new HashMap<String, Value> ();
80 foreach(var i in (JSONObject)rawObj) {
81 map.Add( (String)fromJSON(Type.String,i.Key)
82 , (Value)fromJSON(Type.Value,i.Value));
83 }
84 return map;
85 }
86*/
87
88 case ClientInfo: {
89 JSONObject obj = (JSONObject)rawObj;
90 String tag = obj.getString("tag");
91 switch (tag) {
92 case "ClientInfo": {
93 ClientInfo.ClientInfo_ tv = new ClientInfo().new ClientInfo_();
94 tv.clientName = (String)fromJSON(Type.String,obj.get("clientName"));
95 tv.clientBackend = (Backend)fromJSON(Type.Backend,obj.get("clientBackend"));
96 return tv;
97 }
98 default: throw new Exception("unknown constructor: " + tag);
99 }
100 }
101 case Frame: {
102 JSONObject obj = (JSONObject)rawObj;
103 String tag = obj.getString("tag");
104 switch (tag) {
105 case "Frame": {
106 Frame.Frame_ tv = new Frame().new Frame_();
107 tv.renderCount = (Integer)fromJSON(Type.Int,obj.get("renderCount"));
108 tv.frameUniforms = (HashMap<String, Value>)fromJSON(Type.Map_String_Value,obj.get("frameUniforms"));
109 tv.frameTextures = (HashMap<String, Integer>)fromJSON(Type.Map_String_Int,obj.get("frameTextures"));
110 return tv;
111 }
112 default: throw new Exception("unknown constructor: " + tag);
113 }
114 }
115 case Scene: {
116 JSONObject obj = (JSONObject)rawObj;
117 String tag = obj.getString("tag");
118 switch (tag) {
119 case "Scene": {
120 Scene.Scene_ tv = new Scene().new Scene_();
121 tv.objectArrays = (HashMap<String, ArrayList<Integer>>)fromJSON(Type.Map_String_Array_Int,obj.get("objectArrays"));
122 tv.renderTargetWidth = (Integer)fromJSON(Type.Int,obj.get("renderTargetWidth"));
123 tv.renderTargetHeight = (Integer)fromJSON(Type.Int,obj.get("renderTargetHeight"));
124 tv.frames = (ArrayList<Frame>)fromJSON(Type.Array_Frame,obj.get("frames"));
125 return tv;
126 }
127 default: throw new Exception("unknown constructor: " + tag);
128 }
129 }
130 case PipelineInfo: {
131 JSONObject obj = (JSONObject)rawObj;
132 String tag = obj.getString("tag");
133 switch (tag) {
134 case "PipelineInfo": {
135 PipelineInfo.PipelineInfo_ tv = new PipelineInfo().new PipelineInfo_();
136 tv.pipelineName = (String)fromJSON(Type.String,obj.get("pipelineName"));
137 tv.pipeline = (Pipeline)fromJSON(Type.Pipeline,obj.get("pipeline"));
138 return tv;
139 }
140 default: throw new Exception("unknown constructor: " + tag);
141 }
142 }
143 case RenderJob: {
144 JSONObject obj = (JSONObject)rawObj;
145 String tag = obj.getString("tag");
146 switch (tag) {
147 case "RenderJob": {
148 RenderJob.RenderJob_ tv = new RenderJob().new RenderJob_();
149 tv.meshes = (ArrayList<Mesh>)fromJSON(Type.Array_Mesh,obj.get("meshes"));
150 tv.textures = (ArrayList<String>)fromJSON(Type.Array_String,obj.get("textures"));
151 tv.schema = (PipelineSchema)fromJSON(Type.PipelineSchema,obj.get("schema"));
152 tv.scenes = (ArrayList<Scene>)fromJSON(Type.Array_Scene,obj.get("scenes"));
153 tv.pipelines = (ArrayList<PipelineInfo>)fromJSON(Type.Array_PipelineInfo,obj.get("pipelines"));
154 return tv;
155 }
156 default: throw new Exception("unknown constructor: " + tag);
157 }
158 }
159 case FrameResult: {
160 JSONObject obj = (JSONObject)rawObj;
161 String tag = obj.getString("tag");
162 switch (tag) {
163 case "FrameResult": {
164 FrameResult.FrameResult_ tv = new FrameResult().new FrameResult_();
165 tv.frRenderTimes = (ArrayList<Float>)fromJSON(Type.Array_Float,obj.get("frRenderTimes"));
166 tv.frImageWidth = (Integer)fromJSON(Type.Int,obj.get("frImageWidth"));
167 tv.frImageHeight = (Integer)fromJSON(Type.Int,obj.get("frImageHeight"));
168 return tv;
169 }
170 default: throw new Exception("unknown constructor: " + tag);
171 }
172 }
173 case RenderJobResult: {
174 JSONObject obj = (JSONObject)rawObj;
175 String tag = obj.getString("tag");
176 switch (tag) {
177 case "RenderJobResult": {
178 RenderJobResult.RenderJobResult_ tv = new RenderJobResult().new RenderJobResult_();
179 tv._0 = (FrameResult)fromJSON(Type.FrameResult,obj.get("arg0"));
180 return tv;
181 }
182 case "RenderJobError": {
183 RenderJobResult.RenderJobError_ tv = new RenderJobResult().new RenderJobError_();
184 tv._0 = (String)fromJSON(Type.String,obj.get("arg0"));
185 return tv;
186 }
187 default: throw new Exception("unknown constructor: " + tag);
188 }
189 }
190 }
191 throw new Exception("unknown type");
192 }
193} \ No newline at end of file
diff --git a/ddl/out/java/TestData/PipelineInfo.java b/ddl/out/java/TestData/PipelineInfo.java
new file mode 100644
index 0000000..6171080
--- /dev/null
+++ b/ddl/out/java/TestData/PipelineInfo.java
@@ -0,0 +1,26 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11import LambdaCube.Mesh.*;
12import LambdaCube.PipelineSchema.*;
13
14public class PipelineInfo {
15 public enum Tag {
16 PipelineInfo
17 }
18 public Tag tag;
19
20 public class PipelineInfo_ extends PipelineInfo {
21 public String pipelineName;
22 public Pipeline pipeline;
23 public PipelineInfo_() { tag = PipelineInfo.Tag.PipelineInfo; }
24 }
25}
26
diff --git a/ddl/out/java/TestData/RenderJob.java b/ddl/out/java/TestData/RenderJob.java
new file mode 100644
index 0000000..523cf47
--- /dev/null
+++ b/ddl/out/java/TestData/RenderJob.java
@@ -0,0 +1,29 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11import LambdaCube.Mesh.*;
12import LambdaCube.PipelineSchema.*;
13
14public class RenderJob {
15 public enum Tag {
16 RenderJob
17 }
18 public Tag tag;
19
20 public class RenderJob_ extends RenderJob {
21 public ArrayList<Mesh> meshes;
22 public ArrayList<String> textures;
23 public PipelineSchema schema;
24 public ArrayList<Scene> scenes;
25 public ArrayList<PipelineInfo> pipelines;
26 public RenderJob_() { tag = RenderJob.Tag.RenderJob; }
27 }
28}
29
diff --git a/ddl/out/java/TestData/RenderJobResult.java b/ddl/out/java/TestData/RenderJobResult.java
new file mode 100644
index 0000000..8a55fca
--- /dev/null
+++ b/ddl/out/java/TestData/RenderJobResult.java
@@ -0,0 +1,30 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11import LambdaCube.Mesh.*;
12import LambdaCube.PipelineSchema.*;
13
14public class RenderJobResult {
15 public enum Tag {
16 RenderJobResult,
17 RenderJobError
18 }
19 public Tag tag;
20
21 public class RenderJobResult_ extends RenderJobResult {
22 public FrameResult _0;
23 public RenderJobResult_() { tag = RenderJobResult.Tag.RenderJobResult; }
24 }
25 public class RenderJobError_ extends RenderJobResult {
26 public String _0;
27 public RenderJobError_() { tag = RenderJobResult.Tag.RenderJobError; }
28 }
29}
30
diff --git a/ddl/out/java/TestData/Scene.java b/ddl/out/java/TestData/Scene.java
new file mode 100644
index 0000000..ef60dde
--- /dev/null
+++ b/ddl/out/java/TestData/Scene.java
@@ -0,0 +1,28 @@
1// generated file, do not modify!
2// 2016-03-21T11:41:52.508392000000Z
3
4package TestData;
5
6import java.util.ArrayList;
7import java.util.HashMap;
8import RT.*;
9
10import LambdaCube.IR.*;
11import LambdaCube.Mesh.*;
12import LambdaCube.PipelineSchema.*;
13
14public class Scene {
15 public enum Tag {
16 Scene
17 }
18 public Tag tag;
19
20 public class Scene_ extends Scene {
21 public HashMap<String, ArrayList<Integer>> objectArrays;
22 public Integer renderTargetWidth;
23 public Integer renderTargetHeight;
24 public ArrayList<Frame> frames;
25 public Scene_() { tag = Scene.Tag.Scene; }
26 }
27}
28