Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by DuFFOwNz · Oct 12, 2015 at 06:47 PM · renderingpluginopenglunity 5.2

Native rendering plugin OpenGL device type not being set.

The example project at http://docs.unity3d.com/Manual/NativePluginInterface.html doesn't work for me with the OpenGL Core profile selected, using Unity 5.2.1f1. The texture does not get updated from the plugin. Is OpenGL Core supported in the new native plugin interface?

Further, I've noticed in my own RenderingPlugin that the device type is not being set when using OpenGL.

 s_DeviceType = s_Graphics->GetRenderer();

returns '4', which corresponds with 'kUnityGfxRendererNull', not 'kUnityGfxRendererOpenGL'.

Everything working as expected in D3D11. Has anyone else had similar issues?

Thanks

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AndreasScholl · Oct 16, 2015 at 02:46 PM 1
Share

I am experiencing the exact same behaviour when testing on android devices.

I tested to set the s_DeviceType manually, as i know my testing hardware device is opengles2.0 and the texture gets updated but the triangles won't show up.

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by TomasJ · Oct 19, 2015 at 10:41 AM

Error in Unity code base. Will fix asap. Bug reference 737451.

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DuFFOwNz · Oct 19, 2015 at 08:32 PM 0
Share

Thanks for the reply and confir$$anonymous$$g this bug. I will wait for 5.3.

avatar image AndreasScholl DuFFOwNz · Oct 20, 2015 at 09:13 AM 0
Share

You can nevertheless use and do something in the plugin if you know which platform you are on, as the "device" is just an enumerator variable for OpenGl and OpenGlES. You could even pass the plattform from your unity code via a custom function to the plugin.

avatar image another_unity_user · Dec 09, 2015 at 11:35 AM 0
Share

Still the same on Unity 5.3. Android rendering doesn't work. The example doesn't work on $$anonymous$$ac anymore either (though it did with 5.2.1p3). I need a way to render to unity texture using android 's mediaplayer video stream as a source and the example actually gives the approach to accomplish this. Except it's not working. Any chances to make it work?

avatar image groovounet another_unity_user · Dec 09, 2015 at 12:04 PM 0
Share

The native plug in example as been updated. There is a bug with the current manual pages which point to the example for 5.2. It's being fix.

I have updated the native plug in example with OpenGL core support here: https://oc.unity3d.com/index.php/s/z3IlBy4A7v4tgQ4

avatar image another_unity_user groovounet · Dec 09, 2015 at 06:08 PM 0
Share

Thanks a lot for your quick response and for the link. The project from the link works fine for mac however it still doesn't render a "plasma" effect nor drawing a triangle for android build (running on Nexus 5.1 Lollipop). Do you think there are any working examples for android on how to perform rendering from native plugin? Thanks again

Show more comments
Show more comments
avatar image
1

Answer by groovounet · Oct 19, 2015 at 10:41 AM

OpenGL core in 5.2 doesn't support the RenderingPlugin. It's being fixed for 5.3.

Thanks, Christophe

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image groovounet · Dec 09, 2015 at 01:26 PM 0
Share

The updated native plug-in example for Unity 5.3 is available here: https://oc.unity3d.com/index.php/s/z3IlBy4A7v4tgQ4

avatar image another_unity_user groovounet · Dec 23, 2015 at 04:10 AM 0
Share

Though the above attached example still returns kUnityGfxRendererNull for s_Graphics->GetRenderer() call on Unity 5.3 for android devises, I was able to make it render the triangle by setting s_DeviceType to kUnityGfxRendererOpenGLES20 manually AND setting 'Graphics APIs' to OpenGLES2 only (removed OpenGLES3) under Unity 'Player Settings' The next issue however is that the triangle disappears again once 'Virtual Reality supported' tick is checked to run the build for GearVR. Any chances to make it work for android in VR (I'm using Samsung Galaxy S6 in case it makes any difference)

$$anonymous$$y final goal is to render 2D movie to GearVR using external texture to render video to and a unity side texture which is bound to FBO to copy the external texture to display frames further. To make it work it's essential to be able to perform glDrawArrays/Elements. Probably there is another way to accomplish it though. If anyone has an idea or is able to share a working example, it would help greatly (it should be open source without any kind of precompiled so/jars/etc though)

avatar image another_unity_user groovounet · Dec 23, 2015 at 04:10 AM 0
Share

Though s_Graphics->GetRenderer() still returns kUnityGfxRendererNull on Unity 5.3 using the attached example above for andorid, I was able to make it render the triangle on Samsung Galaxy S6 by manually setting s_DeviceType = kUnityGfxRendererOpenGLES20 AND setting Graphics APIs to OpenGLES2 only (removed OpenGLES3) in Unity 'Player Settings' The next issue however is that the triangle disappears once 'Virtual Reality supported' tick is checked to use the build with GearVR. Any chances to render the triangle in VR?

$$anonymous$$y final goal is to be able to render a 2D video from android plugin to GearVR using external texture with a movie frame and destination texture bounded to a FBO - to make it work it's essential to be able to perform glDrawArrays/Elements which is not working according to the sample app. Probably there is a better way to do this? If anybody has a link to a working example which is open source (without any kind of precompiled so/jars/etc) that would be really helpful!

avatar image another_unity_user · Dec 23, 2015 at 04:31 PM 0
Share

Though the attached example still returns kUnityGfxRendererNull for s_Graphics->GetRenderer() call on Unity 5.3 for android devises, I was able to make it render the triangle by setting s_DeviceType to kUnityGfxRendererOpenGLES20 manually AND setting 'Graphics APIs' to OpenGLES2 only (removed OpenGLES3) under Unity 'Player Settings'

The next issue however is that the triangle disappears again once 'Virtual Reality supported' tick is checked to run the build for GearVR. Any chances to make it work for android in VR (I'm using Samsung Galaxy S6 in case it makes any difference)

$$anonymous$$y final goal is to render 2D movie to GearVR using external texture to render video to and a unity side texture which is bound to FBO to copy the external texture to display frames further. To make it work it's essential to be able to perform glDrawArrays/Elements. Probably there is another way to accomplish it though. If anyone has an idea or is able to share a working example, it would help greatly (it should be open source without any kind of precompiled so/jars/etc though)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

OpenGL Context from Plugin 1 Answer

External terrain renderer 0 Answers

Native Rendering Plugin with Oculus Rift 0 Answers

Render to RenderTexture in android/gles (plugin) 0 Answers

Rendering Unity output on OpenTK Windows? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges