Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by JonC · Jul 18, 2012 at 10:03 PM · iospluginvideo

CVOpenGLESTextureCache texture from native plugin (iOS)

I currently have a plugin that takes the camera image and sends it to the gpu in a plugin using glTexImage2D using the common methods described to get the native texture ID from the Texture2D object attached to my object. The only problem is that this is a very inefficient way to send the camera image to the GPU and profiling has shown it is taking up a lot of our cycles.

In iOS 5 CVOpenGLESTextureCache was introduced which is supposed to improve performance by up to 10x over sending the video to the GPU via glTexImage2D. Unfortunately this method doesn't allow you to specify the texture ID like glTextImage2D did, it gives you a texture id for the texture. The Unity texture classes also don't let you specify a native texture ID and overriding it in a subclass doesn't seem to work either.

I was wondering if anyone has any crazy ideas for a hack to get this working. You can check out the Apple sample code called RosyWriter and GLCameraRipple for example implementations.

Comment
Add comment · Show 3
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 Malveka · Oct 01, 2012 at 01:06 AM 0
Share

Jon, I'm trying to understand how something like this could work as well. Did you ever arrive at a solution? Thanks.

avatar image JonC · Oct 01, 2012 at 04:07 PM 0
Share

It doesn't look like this is possible with Unity 3.x and it doesn't seem like support will be added. There seems to be some hope that this will be some way to make it work in Unity 4.x when it is released but haven't seen any confirmation yet.

avatar image Malveka · Oct 03, 2012 at 03:51 AM 0
Share

Jon, thanks for the update. I guess I'll wait for Unity 4.x. In the meantime, if I discover anything, I'll post back here.

0 Replies

· Add your reply
  • Sort: 

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

6 People are following this question.

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

Related Questions

iOS Unity Plugin : Load Video from 'Videos'app and Photo Library on iOS Device 0 Answers

Unity Camera roll on iOS - access information about photos and videos 0 Answers

3D Video within Scene 1 Answer

Trouble getting Google GVRVideoPlayer to Implement in Unity 5.6.2 with Google Cardboard v1.60 0 Answers

Native Alert on iOS (plugin) 1 Answer


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