A Bug with OpenGL ES 3.0 and Native Rendering plugin

I have tested RenderingPlugin sample from here:http://docs.unity3d.com/uploads/Examples/RenderingPluginExample45.zip
It works fine when I set Graphic APIs to OpenGLES2 in PlayerSettings.And when I set to OpenGL ES3, the triangle is missing. It means that all mesh I submitted in native code has been “eatten”, Plz fix it

Screenshoot for opengl es 2.0

Screenshoot for opengl es 3.0

1 Like

Any one here?

I found that bug also in newest Unity 5.2, and in unity 5.2, both fill texture and triangle don’t work

I as far as I’ve tested that RenderingPluginExample52 wont work on Android on OpenGL ES 2.0
API from version 4.5 worked well on 5.1. I’ve posted bug report, because new API seems to be ok on other platforms (editor, standalone - DirectX, OpenGL 2).
Does anyone have similiar issues or know workaround?

On android new API s_Graphics->GetRenderer() returns 4 which is UnityGfxRenderer.kUnityGfxRendererNull but the opengl context is created and demo opengl code works just fine.

Removing currentDeviceType value tests will get RenderingPluginExample52 going on android - at least good for a start.

static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType eventType)
{
    UnityGfxRenderer currentDeviceType = s_DeviceType;

    LOGI( "OnGraphicsDeviceEvent" );

    switch (eventType)
    {
        case kUnityGfxDeviceEventInitialize:
        {
            LOGI("OnGraphicsDeviceEvent(Initialize).\n");
            s_DeviceType = s_Graphics->GetRenderer();
            currentDeviceType = s_DeviceType;
            break;
        }
     ...
    }

    // following line prints deviceType:4 but OpenGL ES 2.0 context is created and is rendering
    LOGI("OnGraphicsDeviceEvent deviceType:%i\n", s_DeviceType );
     ...
}

I will appreciate if somebody checked if it is not a bug.

I also tested the Native rendering plugin with Unity 5.2 and have the same problems. i managed to get at least the rendering of the plasma texture work again.

static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType eventType)
{
......

#if SUPPORT_OPENGLES 
//Hardcoding the DeviceType 
    s_DeviceType = kUnityGfxRendererOpenGLES20;
    //if (currentDeviceType == kUnityGfxRendererOpenGLES20 || currentDeviceType == kUnityGfxRendererOpenGLES30)
        DoEventGraphicsDeviceGLES(eventType);
    #endif

}

But the triangle is not rendered. There seems to be a bug with glDrawArrays. I have another project and i didn’t get it managed to draw a simple triangle with glDrawArrays.
But this is also OpenGL ES 2.0 related

Made another test: You have to turn off the multithreaded rendering option in the player settings. Then a black triangle is drawn into the scene. (From reading the code i see that colorizing is not implemented for OpenGL ES). So it seems that the multithreading rendering on Android has some issues.