on master help sign in
fixed!
commitf349ea8b5cae2f311c388191fb4e42762d26763d authorJohn P Mayer Jr <john.p.mayer.jr@gmail.com> dateTue 10 Dec 2013, 20:49 (13 years ago) parentfec4a41
2 files changed+1−8
libraries/Graphics/WebGL.elm−7 libraries/Native/Graphics/WebGL.js+1−1
libraries/Graphics/WebGL.elm−7
@@ -12,9 +12,6 @@ data Program a u = Dummy_Program
1212link : Shader a u v -> Shader {} {} v -> Program a u
1313link = Native.Graphics.WebGL.link
1414
15−-- Binder really should not need a program
16−-- I need runtime type information from something though...
17−
1815type Triangle a = (a,a,a)
1916
2017triangle : a -> a -> a -> Triangle a
@@ -31,10 +28,6 @@ data Buffer a = Dummy_Buffer
3128bind : [Triangle a] -> Buffer a
3229bind = Native.Graphics.WebGL.bind
3330
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−
3831data Model = Dummy_Model
3932
4033encapsulate : 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) {
138138 gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);
139139
140140 var bufferObject = {
141− numIndices: List.length(bufferElems),
141+ numIndices: numIndices,
142142 indexBuffer: indexBuffer,
143143 buffers: buffers
144144 };