The window pops up, but I am not seeing anything. I did copy the Resources folder (with the teapot file) into Projucer and resaved it. Do you have any suggestions or ideas as to why this may be happening?
To find out where the problem is, you should verify that each part is working, until you find what does not work. But it can be difficult if you don’t know OpenGL, since this will require modifying or adding some code.
I could suggest you to draw a simple model to at least know if the problem is in the shader or in the geometry, and reduce the problem
add this to the end of render(), since this drawing will use the current shader, if you see a rotating orange triangle then the shader seems to be fine, and the problem is with the rendering of the teapot
I have downloaded the project and generated it with projucer for VS2022.
You can try to check if the problem is in the shader, remove the shader activation, this will force to use the fixed pipeline by activating the matrices by the old method.
Thank you very much!
This code draws a white triangle when I add the code GL_TRIANGLES at the end!
Without adding GL_TRIANGLES, it still does not render the teapot.
The problem must be in the shader, and also with the rendering of the teapot.
I really appreciate it, @Marcusonic!
Is the shader active? It’s strange that the shader doesn’t work and you don’t get any warning.
Even working fine, I get several warnings
JUCE v7.0.5
OpenGL DBG message: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
OpenGL DBG message: Buffer detailed info: Buffer object 2 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
OpenGL DBG message: Program/shader state performance warning: Vertex shader in program 2 is being recompiled based on GL state.
OpenGL DBG message: Buffer detailed info: Buffer object 3 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
OpenGL DBG message: Buffer detailed info: Buffer object 4 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Maybe you should go step by step, since an example like that is not going to understand anything. Create the body of your OpenGLAppComponent-derived class with the required override functions and test it with other easier tutorials LearnOpenGL - Hello Triangle
It could well be related to either recent macOS and/or Apple Silicon. To rule out whether it’s recent macOS alone, I’ll try this out today on Intel mac mini running the latest version of macOS.
My mistake, I was checking it in the DemoRunner, not the stand-alone tutorial. Maybe you should try the DemoRunner to see if that works (it’s in the extras folder)?
If your second screenshot is from the OpenGL tutorial, I think that’s supposed to be the result. There is no texture mapping applied to the teapot as there is in the DemoRunner example.
Great, with that info I was able to repro your issue. I am not on latest Monterrey so I will try again with latest, and if I can repro again, we could perhaps then try and spot the issue. I get these errors in my console in 12.6.3:
**2023-05-29 11:25:36.613620-0700 OpenGLAppTutorial[26663:416562] fopen failed for data file: errno = 2 (No such file or directory)**
**2023-05-29 11:25:36.613739-0700 OpenGLAppTutorial[26663:416562] Errors found! Invalidating cache...**
**2023-05-29 11:25:36.674242-0700 OpenGLAppTutorial[26663:416562] fopen failed for data file: errno = 2 (No such file or directory)**
**2023-05-29 11:25:36.674305-0700 OpenGLAppTutorial[26663:416562] Errors found! Invalidating cache...**
**2023-05-29 11:25:46.541221-0700 OpenGLAppTutorial[26663:416561] Persistent UI failed to open file file:///Users/<username>/Library/Saved%20Application%20State/com.JUCE.OpenGLAppTutorial.savedState/window_7.data: No such file or directory (2)**
I also got this warning in Xcode:
This warning appears to be a non-issue according to: UI API called from background thread, however @reuk’s fix does not touch the part of the class where this warning is emitted:
Update: I’m whittling it down, the issue persists on latest Monterrey but I don’t have the issue on Catalina with JUCE 7.0.2 and 7.0.5. I’ll try once more with latest JUCE on Ventura.
@TPeters do you have a mac that cannot update beyond Monterrey like a mid-2015 MacBook Pro or similar?