Antoine.YVAN Posted October 26, 2020 Share Posted October 26, 2020 Hi ! We recently made this post and with the support team's help we managed to create an OpenGL compatible profile. My team and I are now facing another problem regarding OpenGL implementation in Unigine. In the linked zip you can find the data and source folder of a sample project. If you run this project (Unigine 2.10), you will see that every time the render callback is called, the error message "OpenGL error: invalid operation" is printed in the console. The error comes from the line 80: _albedo_test->fromGLTexture2D(_texture_id, _procedural_width, _procedural_height, Texture::FORMAT_RGBA32F, Texture::WRAP_CLAMP | Texture::FILTER_LINEAR); Can you help us resolve this error ? Thanks. sample_sources.zip Link to comment
silent Posted October 27, 2020 Share Posted October 27, 2020 Hi Antoine, Thank you for the test scene. We need some additional time to set the things up. I hope we can give you some hints by the end of this week. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
andrey-kozlov Posted October 27, 2020 Share Posted October 27, 2020 Hello Antoine, You can debug this kind of errors (OpenGL invalid operation) with the command line argument -video_debug 1. In your case it gives "OpenGL error(high): GL_INVALID_OPERATION error generated. Texture is immutable." This is due fromGLTexture2D call every frame. The first time it creates storage for the texture. The second time it attempts to create storage but the storage already exists so it fails. The solution is to move that call to the init stage: _albedo_test = Texture::create(); _albedo_test->fromGLTexture2D(_texture_id, _procedural_width, _procedural_height, Texture::FORMAT_RGBA8, Texture::WRAP_CLAMP | Texture::FILTER_LINEAR); 1 1 Link to comment
Antoine.YVAN Posted October 27, 2020 Author Share Posted October 27, 2020 Hello Andrey, I did not know there was an argument for debugging video. This is good to know. Thank you for your clear answer. Link to comment
Recommended Posts