Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

1

Found in

5.2.1p3

Issue ID

736058

Regression

Yes

[GLLEGACY] Low-level native plugin example doesn’t work on OS X editor

OpenGL

-

The example of a low-level native plugin, which is available on the manual page, doesn’t run properly on the OS X editor.

http://docs.unity3d.com/Manual/NativePluginInterface.html
http://docs.unity3d.com/uploads/Examples/RenderingPluginExample52.zip

The game view turns into empty during the play mode.

Note that it runs properly when built.

Comments (3)

  1. 2d149483b7978ec8db30d0d947528df0?d=mm

    7gengames

    Nov 16, 2015 04:15

    I'm having this same problem on OS X. Game window is gray but the plugin works in the built application.

    The suggestion to use glPushAttrib didn't work for me; I tried the code in the post and nothing changed. Commenting out the glDisable (GL_BLEND) line also did not fix it.

  2. 1dc6bafdb60b858b8b5628b2cfaeaa47?d=mm

    HMF

    Oct 23, 2015 12:37

    seems to be an issue with the opengl state that is being altered inside the native plugin example code. inside SetDefaultGraphicsState () the call to glDisable (GL_BLEND) causes the editor to stop rendering properly. you can comment the line out or push and pop the attrib state like this:

    glPushAttrib(GL_ALL_ATTRIB_BITS);
    SetDefaultGraphicsState ();
    DoRendering(worldMatrix, identityMatrix, projectionMatrix, verts);
    glPopAttrib();

  3. 1dc6bafdb60b858b8b5628b2cfaeaa47?d=mm

    HMF

    Oct 18, 2015 19:36

    I'm on windows and am also experiencing this problem. d3d9, d3d11, and d3d12 all work fine, but when forcing opengl the plugin causes the editor to display as fully grey. Unlike the original poster, when I tried building there were still problems when forcing opengl.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.