on master help sign in
fixed!
f349ea8John P Mayer Jr
libraries/Graphics/WebGL.elm−7
@@ -12,9 +12,6 @@ data Program a u = Dummy_Program
12link : Shader a u v -> Shader {} {} v -> Program a u
12link : Shader a u v -> Shader {} {} v -> Program a u
13link = Native.Graphics.WebGL.link
13link = Native.Graphics.WebGL.link
14
14
15−-- Binder really should not need a program
16−-- I need runtime type information from something though...
17−
18type Triangle a = (a,a,a)
15type Triangle a = (a,a,a)
19
16
20triangle : a -> a -> a -> Triangle a
17triangle : a -> a -> a -> Triangle a
@@ -31,10 +28,6 @@ data Buffer a = Dummy_Buffer
31bind : [Triangle a] -> Buffer a
28bind : [Triangle a] -> Buffer a
32bind = Native.Graphics.WebGL.bind
29bind = Native.Graphics.WebGL.bind
33
30
34−-- Now I cheat here because elm lacks existential types or rank-n
35−-- I'm in essense doing the following
36−-- data Model = forall a u. Model (Program a u) (Buffer a) u
37−
38data Model = Dummy_Model
31data Model = Dummy_Model
39
32
40encapsulate : Program a u -> Buffer a -> u -> Model
33encapsulate : Program a u -> Buffer a -> u -> Model
libraries/Native/Graphics/WebGL.js+1−1
@@ -138,7 +138,7 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
138 gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);
138 gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);
139
139
140 var bufferObject = {
140 var bufferObject = {
141− numIndices: List.length(bufferElems),
141+ numIndices: numIndices,
142 indexBuffer: indexBuffer,
142 indexBuffer: indexBuffer,
143 buffers: buffers
143 buffers: buffers
144 };
144 };