Commit 05e0fa1e authored by amandaghassaei's avatar amandaghassaei

mobile warning

parent e615ccc3
......@@ -1330,5 +1330,14 @@
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="noSupportModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
This app uses GPU functions which are not supported by this device, please try again on desktop.<br/><br/>
\ No newline at end of file
......@@ -11,13 +11,20 @@ function initGPUMath(){
var gl = canvas.getContext("webgl", {antialias:false}) || canvas.getContext("experimental-webgl", {antialias:false});
var floatTextures = gl.getExtension('OES_texture_float');
if (!floatTextures) {
console.warn('no floating point texture support');
var maxTexturesInFragmentShader = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);
console.log(maxTexturesInFragmentShader + " textures max");
function notSupported(){
//todo get gif
console.warn("floating point textures are not supported on your system");
function GPUMath(){
......@@ -66,6 +73,12 @@ function initGPUMath(){
framebuffer = gl.createFramebuffer();
gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
var check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
this.frameBuffers[textureName] = framebuffer;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment