• 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
Question by AIResearcher · Nov 03, 2010 at 01:24 PM · renderingbackgroundopengl

OpenGL Rendering Modes / Using a Color Mask

I would like to set Unity3D to draw in an overlay mode where it draws over other non-unity windows. This is for using unity output behind other text / images created by another application.

I am sorry I do not know the proper vocabulary. But this is like setting VLC Media Player and/or Media Player Classic to render in an overlay draw mode (which disables screen capture) but allows setting the background color of another app to 0x00F / 0x001 respectively so that the rendering from VLC or MPC will draw over the 0x00F/0x001 mask while leaving the other text alone, thus blending video with anything else very quickly.

Comment
God-at-play
tcgmail

People who like this

2 Show 2
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 AIResearcher · Nov 03, 2010 at 07:47 PM 0
Share

There should be a way in a script to set the GL. modes so that it renders in such a way as to draw on screen but only in a specific color-mask. I will try to research the GL command necessary (settings / modes) to accomplish this.

avatar image AIResearcher · Nov 03, 2010 at 11:26 PM 0
Share

In order to clarify what I'm trying to accomplish. I want to render OpenGL behind other windows, but in such a way that I can set a color in the foreground window that will allow the OpenGL behind it to be passed through. This can be done if the OpenGL is rendered in hardware with a color-coded graphics context that hints to the OpenGL where to draw on screen.

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by AIResearcher · Nov 09, 2010 at 05:28 PM

The mode you seek is called, "Hardware Overlay" Wikipedia. And although not officially supported by OpenGL (too much hardware abstraction) on MacOSX it may be supported in later versions by QuartzGL, OSX's on flavour of OpenGL. Most Windows applications use hardware overlay through a DirectDraw layer.

Enable QuartzGL for the application using the application's plist file, then set the mode to hardware overlay. In OSX the color is typically a shade of green.

Comment

People who like this

0 Show 0 · 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

Answer by IJM · Nov 03, 2010 at 04:39 PM

The word you seek is embedding (imbedding)

This will help you:

http://answers.unity3d.com/questions/3649/unity-embedded-into-another-application

Comment

People who like this

0 Show 1 · 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 AIResearcher · Nov 03, 2010 at 07:45 PM 0
Share

I should mention that I don't have the source for the other application(s) and it has no plugin framework what-so-ever.

I was hoping to use hardware level color masking / overdraw as described in the question.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Why does GL not render a line when I attach all my vertices in one go? 1 Answer

Sprite Background Lags with Camera Script 0 Answers

GL.LINES renders in a single quadrant of the screen 0 Answers

OpenGL ES 1/2 Jagged edges issue 1 Answer

Texture lookup in Surface Shader in pixel space 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