Repository: godot
Issue: Blank screen when using Godot with GLSurfaceview
Labels: enhancement,discussion,platform:android,topic:rendering,topic:porting

### Godot version

3.5.stable

### System information

Android 12,  Adreno (TM) 650

### Issue description

Recently I tried to integrate Godot into our system on Android. Basically we use GLSurfaceview with a custom renderer which implements `onDrawFrame` callback to finish concrete rendering jobs.  
  I initialize Godot Engine in the `onSurfaceCreated` callback:

    JNIEXPORT void JNICALL
    Java_com_example_godottest_GodotRenderer_setup(JNIEnv *env, jclass clazz, jstring project_dir) {
        auto tmp = env->GetStringUTFChars(project_dir, nullptr);
        char argv0[] = "--path";
        char argv1[512];
        strcpy(argv1, tmp);
        env->ReleaseStringUTFChars(project_dir, tmp);
        char* argvs[] = {argv0, argv1};
        os = new OS_Zeus;
        CHECK(Main::setup("godot", 2, argvs, true));
    
        if(Main::start()){
            auto main_loop = os->get_main_loop();
            main_loop->init();
            auto st = Object::cast_to<SceneTree>(main_loop);
            st->set_viewport_size(Size2(1280, 720));
            VisualServer *vs = VisualServer::get_singleton();
    //        vs->viewport_set_update_mode(st->get_root_rid(), VS::VIEWPORT_UPDATE_ALWAYS);
        }else{
            LOGE("init not finished!");
        }
    }

And do rendering as follows:

    public void onDrawFrame(GL10 gl10) {
    ...
    GodotRenderer.doRender(delta);
    ...
    }
    
    JNIEXPORT void JNICALL
    Java_com_example_godottest_GodotRenderer_doRender(JNIEnv *env, jclass clazz, jfloat delta) {
        Main::iteration();
    }

My application appears blank screen when running, I hooked logs from Godot during `setup`:

    01-29 14:26:56.238 29962 30078 I ZeusGodotEngine: Main: Initialize CORE
    01-29 14:26:56.262 29962 30078 I ZeusGodotEngine: Main: Initialize Globals
    01-29 14:26:56.272 29962 30078 I ZeusGodotEngine: Main: Parse CMDLine
    01-29 14:26:56.277 29962 30078 I ZeusGodotEngine: Godot Engine v3.5.1.stable.custom_build.8f5557f2d - https://godotengine.org
    01-29 14:26:56.287 29962 30078 I ZeusGodotEngine: OpenGL ES 3.0 Renderer: Adreno (TM) 650
    01-29 14:26:56.287 29962 30078 I ZeusGodotEngine: Async. shader compilation: OFF
    01-29 14:26:56.373 29962 30078 I ZeusGodotEngine:
    01-29 14:26:56.375 29962 30078 I ZeusGodotEngine: Main: Setup Logo
    01-29 14:26:56.384 29962 30078 I ZeusGodotEngine: Main: Load Boot Image
    01-29 14:26:56.384 29962 30078 I ZeusGodotEngine: Main: DCC
    01-29 14:26:56.384 29962 30078 I ZeusGodotEngine: Main: Load Translations and Remaps
    01-29 14:26:56.384 29962 30078 I ZeusGodotEngine: Main: Load Scene Types
    01-29 14:26:56.469 29962 30078 I ZeusGodotEngine: Main: Load Modules, Physics, Drivers, Scripts
    01-29 14:26:56.579 29962 30078 I ZeusGodotEngine: Main: Done

It seems `setup` and `initialization` succeed. So are there any other jobs to do for working it out or can anyone provide minimum samples? :)

### Steps to reproduce

Depicted as above

### Minimal reproduction project

[RvMaterial.zip](https://github.com/godotengine/godot/files/10529238/RvMaterial.zip)