0

I've searched around and can't find the answer. I'm using this library https://github.com/ekchatzi/temperature-map-gl to create a heat map.

I have posted an issue on github and no response, now trying here. I get these WebGL Errors in Chrome, Firefox throws similar errors. I'm not a WebGL expert, and not sure where to even look.

The Picture to the left should have a full heat map color spectrum covering the entire flooplan, but now it doesn't even draw because of these errors.

WebGL Chrome Error Snippet

I have looked around the web and no luck.

EDIT: Here's my Javascript code.

var temperature_maps = [];
for (var i = 0; i < 1; ++i) {
temperature_maps[i] = new temperature_map_gl(image, {                   
framebuffer_factor: 0,
opacity: 0.6,
p: 4,
show_points: i == 0,
  point_text: function(val) {
    var v;
    if(val < 1)
        v = val.toFixed(2);
    else if(val < 10)
        v = val.toFixed(1);
    else
        v = Math.round(val);
    return v + "°F";
}
}); 
}

function draw(temps) {                                                   
for (var i = 0; i < temperature_maps.length; ++i) {
  var temperature_map = temperature_maps[i];
  var points = [                                                        
    [110, 60, temps.th1_temp],
    [90, 120, temps.th2_temp],
    [90, 250, temps.th3_temp],
    [90, 360, temps.th4_temp],
    [90, 490, temps.t5_temp ],
    [110, 600, temps.t6_temp]
   ];
  var w = 289;
  var h = 676;
  var min_temp = 65; // min = blue
  var max_temp = 75; // what is max = red 
  normal_val = 70; // normal = green
  temperature_map.set_points(points, min_temp, max_temp, normal_val);

  var start = performance.now();

  temperature_map.draw();
  temperature_map.context.finish();
  //console.log( points.length + " points at q=" + q + " took " +  (performance.now() - start) + " ms" ); 
};
 }

And the library link to github

https://github.com/ekchatzi/temperature-map-gl/blob/master/temperature-map-gl.js

I'm not calling glClear or glDrawArrays explicitly, the library i'm sure does.

gman
  • 100,619
  • 31
  • 269
  • 393
Access _ Max
  • 45
  • 1
  • 5
  • Try cheking other questions about the same topic, like https://stackoverflow.com/questions/11089561/opengl-invalid-framebuffer-operation-after-glcleargl-color-buffer-bitI hope this may help you – F.Igor Aug 23 '18 at 01:08
  • You could get better help if you post a code snippet that was generating the error message (call to `glClear` and `glDrawArrays`) – F.Igor Aug 23 '18 at 01:10
  • @F.Igor I tried, I also found that answer, that you referenced in my search. – Access _ Max Aug 23 '18 at 03:52

0 Answers0