nunuStudio
nunuStudio copied to clipboard
Three.WebGLRenderer: Error creating WebGL context
Hello! I am trying to port the code for this example to NunuStudio. What should I consider when doing this, what are the features of Nunu? http://jsfiddle.net/t2w6bagq/ I ran into this error in the editor when I pressed the Run button. "Three.WebGLRenderer: Error creating WebGL context" Then when I press the Stop button. This is my first time trying to do something with NunuStudio. Below is the code I'm trying to run. What are my mistakes? Tell me please. https://github.com/Algorush/NunuStudioTest/blob/main/Projector.js
Hello
You dont need most of that code, the renderer, cameras and scene is already created for you.
You can create the shader material in the GUI and only need to reuse the geometry code in a script.
Please read the documentation available on the project page.
Cheers
Hello, thanks for help! I'll try to do as you say. But can I create camera manually with 'new' operator? In this script, if I understood correctly, a second camera is created that projects video onto the Mesh.
You can use the new operation without any problem.
In this script, if I understood correctly, a second camera is created that projects video onto the Mesh.
I dont know about that it is your script!. You can create cameras from the GUI or from the script without any problem.
It turned out that the problem only occurs when using the Chrome browser. For some reason nunu writes that WbGLRenderer is not supported. This error does not occur on Firefox.
Do you have GPU acceleration available in chrome?
Check by accessing the chrome://gpu/ URL in the browser
Yes, it seems like: Canvas: Hardware accelerated WebGL: Hardware accelerated WebGL2: Hardware accelerated
Can you please post the actual error that you're getting from the console?
Thanks a lo
I am getting the following errors and warnings in chrome:
THREE.WebGLRenderer: Error creating WebGL context
THREE.WebGLRenderer: Context Lost
THREE.WebGLRenderer: Context Restored
Maybe I do something wrong. But there is no such error in the firefox browser, only warnings with context lost. I am opening NunuStudio on a laptop with AMD Ryzen 5 2500U processor and integrated Radeon Vega graphics. Now also errors in both browsers with shaders:
THREE.WebGLProgram: shader error
...
Must have a compiled vertex shader attached.
But here, most likely, I did something wrong. Although the vertex shader is defined in the code
There must have been some error while compiling the vertex shader.
I will have to take a closer look into your code, if possible provide a nsp file for your project.
- Go to your chrome://settings/
- Click on System, on the left side panel
- Turn on "Use hardware acceleration when available"
- Click "Relaunch"
Good luck!