Open elgar328 opened 1 year ago
Thank you for the feedback! I looked around and it seems to be related to the fact that on retina displays, pixels and screen coordinates are not 1:1. (see https://stackoverflow.com/questions/35715579/opengl-created-window-size-twice-as-large)
I will try to reproduce the behaviour on windows (maybe with resolution supersampling) or find a macbook to test and fix this issue.
Hello again @elgar328,
If you don't mind, could you try adding
obj.java.setSurfaceScale([1 1]);
right after line 43 in the file gl/glCanvas.m
?
Does that fix the display issue?
oh! this works! Thank you very much :)
Let me know if you need another test in mac environment. I will do it :)
Cool!!! Did that also fix glViewer3D? And are the duplicated view in your screenshot normal? It should look like this with the original example: Thank you very much for the tests!
In glExample5 it looks like this at first glance.
However, if I rotate the view slightly with the mouse, a repeating shape appears from then on.
glViewer3D() still doesn't work.
Alright, there seems to be a problem with textures in mac environment (glViewer3D renders on a texture). I will try to find the cause and probably ask you to run some tests eventually! Thanks again :)
There seem to be an issue in mac with using a texture sampler on unit 0 (see https://stackoverflow.com/questions/70338946/gl-texturen1-activated-and-bound-instead-of-gl-texturen-on-apple-silicon-m1-po)
Could you try to change line 13 of gl/+glmu/Texture.m
to obj.unit = unit+1;
Does that change anything in the behaviour of the examples?
glExample5 works properly!
glViewer3D() and bunny does not work.
Ok we're getting closer! It is probably related to the framebuffers, I will continue to look for a solution. And just for my information, does the glMandelbrot example work?
glMandelbrot(100,false) works fine :)
I created the branch macDebug
which implements error checking at almost every gl calls in glViewer3D.
Could you switch to it and copy the matlab error stack when running glViewer3D? It will help me knowing which call returns an error.
Thanks a lot :)
here it is!
I removed the call which was causing this one error as it was optional. If you still get an error, paste it again please
Did you pull the updates on macDebug? I think the error should now happen somewhere else than glViewer3D/InitFcn line 158
Also, if you have discord, add me if you want: fr0nk#2095
I used the 'dbstop if error' statement together.
I downloaded a new zip file from github, but it seems that the same error came out because Matlab was referring to the previous version. I sent a friend request on discord. I'm not familiar with how to use discord, but I have discord turned on.
Thank you for this amazing work. I had a few problems when I tried to use this framework. glExample1~5 are displayed in a quarter size. And glViewer3D and bunny showed only black background. (GL Error 0x0502)
MacBook Pro (2021) Chip : Apple M1 Pro OS : Ventura 13.1 Matlab R2022b