- Home /
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.
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.
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.
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.
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
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
Follow this Question
Related Questions
ios: continue running in background 0 Answers
general question regarding flexibility of unity3d rendering 0 Answers
OpenGL ES 3 VR 1 Answer
GL not working on Mac OS 1 Answer
External terrain renderer 0 Answers