I’m trying to figure out this crash. I recently got scorvi’s editor re-integrated into my project, and made several changes after that. Since I’m running under windows, DirectX is the default renderer. When I specify URHO3D_OPENGL in the preprocessor, my initial stuff works. The mainmenu GUI and everything else appears to be fine. However when trying to use scorvi’s editor, it crashes. This occurs with a build before the render-refactor branch, and after. The issue seems to come from the following bit:
Urho3D::RenderSurface* surface = renderTexture_->GetRenderSurface();
surface->SetViewport(0, viewport_);
Under DX, surface is a valid pointer. However under OpenGL, it is null. Under OpenGL, renderTexture_ is valid, and there doesn’t appear to be any other null pointers or invalid data.
Digging into Urho3D, I see that Texture2D::SetSize creates the RenderSurface in DX but not OpenGL. How should this be properly handled for OpenGL?