Issues with certain gl3 features
Hey there! Thanks so much for the current updates, I'm extremely stoked about gl3!
Just a simple bug report, getting the notice "GL_FRAMEBUFFER_UNSUPPORTED" when trying to run the 3D Texture patches from the gl3 examples. Attached a screenshot for specs, GPU should be new enough to run this. Other examples seems to be running just fine.
It's however a bit unnerving that my computer really struggles with a couple of the patchers, and I have to really kill the dim and numbers to make FPS run smoothly (in particular flocking, strange attractors and oil and water). Is my macbook pro finally caving in?

Best,
Jonas
hi Jonas, I've seen those errors on that patch before, but have been unable to track them down. do they go away if you enable the jit.grab output?
I have the exact same machine and GPU as you (late 2013, 750M) but OS is 10.13.6, and all the gl3 patches run fine on that machine. but yes you will probably have to bring the vertex count down for some of them to get good performance. This GPU is 6 years old, and simply doesn't have the juice (mainly cache size) to kick out the heavy patches like more modern gpus.
Hi Rob, trying to check it out again. The first thing that now happens when I try to load up the first 3D texture example is that Max crashes. On second attempt, when I close down the other open patch I had, it opened up fine.
Enabling jit.grab does not make the errors stop popping up each frame. Disconnecting the jit.gl.texture from jit.grab however, makes it stop. Hope that helps narrowing it down somewhat.
Trying to open the second 3D texture patch immediately after closing the first one also makes Max crash. Second attempt, after not having other patches open at all, is ok. Identical error messages.
Thank you, will keep the GPU stuff in mind, and consider upgrading my gear at some point. Considering either a Razer Blade laptop or external GPUs with a thunderbolt interface.
Hi Rob, I also get the GL_FRAMEBUFFER_UNSUPPORTED message with the 3D Texture patches using a Win 10 machine with a quiet new NVIDIA GeForce RTX 2080.
All sorts of broken here too and can't track down the cause. Feels a bit unreliable so far - sometimes it works sometimes it doesn't.
please try editing the patch to make the 3rd dimension of the jit.gl.texture smaller (try with 64 for starters). you will have to adjust the counter and divide object appropriately as well:
please let us know if that works better. if so then it's simply a case of GPU limitations. I will adjust this patch in the package to better support underpowered GPUs.
Thank you, will try it out
Hi Rob,
can you explain in more detail what is limiting this patch?
I use a quiet new RTX 2080 with 8GB of GPU RAM on a WIN 10 Machine.
The following behaviour is observed.
[jit.gl.texture @rectangle 0 @wrap repeat repeat repeat @dim 1024 1024 Z @adapt 0 @name cube]
gives the following errors in Max' console in dependence of value Z
Z = 63 - no error message
Z = 64 - "could not allocate matrix"
Z= 241 - "could not allocate matrix" & "jit_gl_geometry_draw_buffers: GL Error: Out of memory"
Z= 512 - "could not allocate matrix" & "jit_gl_geometry_draw_buffers: GL Error: Out of memory"
The patch seems to work (shows a scaline effect and no "GL_FRAMEBUFFER_UNSUPPORTED" error) until Z = 240.
my guess is some 3d texture limitation, however I can't imagine that your card is limited more than the 1070 on my windows laptop (which works as expected even at a Z dim of 512). maybe there's something else going on here. I just realized the opengl support info posted by the gl3 engine is lacking the gl max info, so maybe you want to launch gl2 and post your gl support info here.
actually scratch that, I'm getting exactly the same results as you on my 1070. Interesting that in this case Macs seem to be more permissive than Windows. Apparently the gl limits do not guarantee successful creation, they only guarantee failure if the limits are exceeded (relevant GPU limit is GL_MAX_3D_TEXTURE_SIZE)
In any case, in the next package update this example will be modified for better compatibility, and I'll work on better detection and handling of 3d texture creation failures in the object.
I have the same issue, but the patches were working fine and very fast with the original release of GL3. The update killed them. MBP 15" 2017, 2.9 GHz, Radeon Pro 560.
whoa, I can reproduce. something definitely broke somewhere along the way. thanks for the report!
I am still having intermittent issues with GL3 mode as in the first version - package installed and selected, certain examples work but sometimes throw errors, but the shadertoy example seems to act as before - randomly works.
the errors i see now arejit_xml_document: error reading file at byte offset 2832 / not well-formed (invalid token)
and in the JXS includes raymarching example, the GLSL shader fails to compile with a ton of errorsjit.gl.slab: error connecting outlet 1 to jit.gl.node inlet 1
jit.gl.slab: GLSL shader error in program fp of file C:/Users/xxxx/Documents/Max 8/Packages/gl3/patchers/jxs-include/raymarching-SDF/sdf_advanced.gl3.jxs:
0(89) : error C1503: undefined variable "opTx"
0(89) : error C1104: too many parameters in function call
0(91) : error C1503: undefined variable "opTx"
0(91) : error C1104: too many parameters in function call
0(92) : error C1503: undefined variable "opTx"
0(92) : error C1104: too many parameters in function call
0(93) : error C1503: undefined variable "opTx"
0(93) : error C1104: too many parameters in function call
0(97) : error C1503: undefined variable "sdfBox"
0(99) : error C1503: undefined variable "sdfSphere"
0(101) : error C1503: undefined variable "sdfOctahedron"
0(103) : error C1503: undefined variable "sdfTorus"
0(108) : error C1503: undefined variable "opTx"
0(108) : error C1104: too many parameters in function call
0(110) : error C1503: undefined variable "opTx"
0(110) : error C1104: too many parameters in function call
0(111) : error C1503: undefined variable "opTx"
0(111) : error C1104: too many parameters in function call
0(112) : error C1503: undefined variable "opTx"
0(112) : error C1104: too many parameters in function call
0(116) : error C1503: undefined variable "sdfBox"
0(118) : error C1503: undefined variable "sdfSphere"
0(120) : error C1503: undefined variable "sdfOctahedron"
0(122) : error C1503: undefined variable "sdfTorus"
0(125) : error C1503: undefined variable "opTx"
0(125) : error C1104: too many parameters in function call
0(127) : error C1503: undefined variable "opTx"
0(127) : error C1104: too many parameters in function call
0(128) : error C1503: undefined variable "opTx"
0(128) : error C1104: too many parameters in function call
0(129) : error C1503: undefined variable "opTx"
0(129) : error C1104: too many parameters in function call
0(133) : error C1503: undefined variable "sdfBox"
0(135) : error C1503: undefined variable "sdfSphere"
0(137) : error C1503: undefined variable "sdfOctahedron"
0(139) : error C1503: undefined variable "sdfTo
jit.gl.slab: jit.gl.shader: GLSL program failed to compile.
its working again after uninstalling the GL3 package, deleting GL3 from the MAX8 package folder (not sure why it was still there), rebooting windows, running MAX and making sure GL2 is selected, installing the GL3 package, selecting GL3 as the renderer and restarting Max (it didn't auto-prompt to restart Max).
Now, again, not having errors with the shadertoy and raymarch (!) examples.
Will update you if it breaks again - perhaps after switching to GL2 and then back to GL3.