@@ -15,38 +15,37 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
15 //var Utils = Elm.Native.Utils.make(elm);
15 //var Utils = Elm.Native.Utils.make(elm);
16 //var Tuple2 = Utils.Tuple2;
16 //var Tuple2 = Utils.Tuple2;
18+ function drawGL(ctx,model) {
19+ var scene = model.scene;
23+ function render(model) {
24+ var canvas = newNode('canvas');
25+ gl = canvas.getContext("webgl");
30+ function update(canvasNode, _oldModel, newModel) {
31+ gl = canvasNode.getContext("webgl");
18 function glContext(w,h,scene) {
35 function glContext(w,h,scene) {
20− function drawGL(ctx,model) {
21− throw "Not implemented"
24− function render(model) {
25− var canvas = newNode('canvas');
26− gl = canvas.getContext("webgl");
31− function update(canvasNode, _oldModel, newModel) {
32− gl = canvasNode.getContext("webgl");
36− return function (scene) {
37− return A3(newElement, 100, 40, {
37+ return A3(newElement, w, h, {
38− ctor: 'Custom',
38+ ctor: 'Custom',
39− type: 'WebGL',
39+ type: 'WebGL',
40− render: render,
40+ render: render,
41− update: update,
41+ update: update,
42− model: scene,
42+ model: {scene:scene},
48− return elm.Native.Graphics.Input.values = {
47+ return elm.Native.Graphics.WebGL.values = {
49− glContext:glContext,
48+ glContext:F3(glContext),