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
1
Question by yamaken · Feb 19, 2012 at 06:00 PM · texture2dunity3.5direct3d

Can I get Direct3D pointer of Texture2D in Unity3.5?

In OpenGL mode , I can get OpenGL texture name(ID) with Texture2D GetNativeTextureID().

From Unity3.5 , I can get Direct3D device pointer(IDirect3DDevice9) , but I can't find to get Direct3D Texture Pointer(LPDIRECT3DTEXTURE9).

Is there any method to get Direct3D texture pointer of Texture2D?

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 Graham-Dunnett ♦♦ · Feb 19, 2012 at 06:22 PM 0
Share

I don't know of a way for you to get this. Sorry.

8 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by GeeEll · Mar 08, 2012 at 12:13 AM

Hi!

I have the same problem, getting the texture. How do you get the IDirect3DDevice pointer out of Unity? Have you succeeded in doing so?

Let me know.

Thanks,

Comment
Add comment · 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
0

Answer by yamaken · Mar 08, 2012 at 04:30 AM

Hi!

I gave up to use Direct3D. Now ,I'm using OpenGL in Windows Standalone & Windows Unity Editor.

Unity.exe -force-opengl <<< for Unity Editor preview

Standalone.exe -force-opengl <<< for Standalone

In standalone build process , [Build&Run] and cancel to run , and I execute it with .bat file .

And using OpenGL 2.x in Windows is very tiresome , but now it works well . ( If you use opengl , search 'glext.h' and 'wglGetProcAddress()' etc)

Thanks

Comment
Add comment · 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
0

Answer by yamaken · Mar 08, 2012 at 04:30 AM

On Unity 3.5 release , the plugin help was changed , and official example explains to get IDirect3DDevice pointer.

c.f. http://unity3d.com/support/documentation/Manual/NativePluginInterface.html

Thanks

Comment
Add comment · 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
0

Answer by GeeEll · Mar 08, 2012 at 04:43 PM

Hi!

Thank you so much! We'll definitely look into that, and should we not be able to grab the LPDIRECT3DTEXTURE9 pointer, we'll revert to OpenGL like you did.

Could you not access the texture by using IDirect3dDevice9->GetTexture(stage, ppTexture)? You could make a "fake" texture stage assignation, then pass the stage value to your plugin and get the texture pointer immediately thereafter?

Let me know what you think.

Thanks

,Alright! Thanks!

Comment
Add comment · 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
0

Answer by yamaken · Mar 08, 2012 at 07:17 PM

Sorry , I'm not sure. I didn't try IDirect3dDevice9->GetTexture(stage, ppTexture).

Comment
Add comment · 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
  • 1
  • 2
  • ›

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

10 People are following this question.

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

Related Questions

Unity 3.5 New texture2D not transparent 2 Answers

Non power of 2 question with pixel painting 1 Answer

Texture2d.LoadImage too slow for use (iOS) 1 Answer

Object Texture Showing Blur In Game 1 Answer

Can I create a sprite at runtime? 3 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