- Home /
OpenGL Context from Plugin
I would like to find out how to place OpenGL calls in a Xcode plugin which will allow me to do things outside of Unity3d's SDK. Mainly the following:
1) I would like to listen for glXSwapBuffers so that I can perform a glReadPixel thus grabbing the screen without worrying about marshalling. I have read http://answers.unity3d.com/questions/13537/efficiently-capturing-rendered-images and have tried to find where to get the screen buffer efficiently, but haven't found anything fast enough yet.
2) I would like to make my own full-screen calls, hopefully being able to then full-screen the application on the monitor I choose rather than being forced to always full-screen to the primary window. - And yes, I know that you can move the "configuration dialog" to the monitor and then open, but I would like to be able to switch monitors at run-time without restarting.
3) I would like to place my own rendering on top of Unity3d's rendering.
I believe that at least some of this is possible as I saw several questions about rendering contexts and OpenGL in scripts, but I am unsure about how to go about this.
Did you find out the answer for the possibility of placing our own OpenGL renderings on top of Unity3d's rendering? I am trying to figure out if I have to throw away my OpenGL code and start from scratch in order to switch to Unity.
Answer by bziii · Mar 04, 2011 at 04:22 PM
I'm using glBindTexture with the Texture.GetNativeTextureID() from a native plugin, and that's all I managed to pull off.
That only works for standalone players - you have to be in the forced opengl mode.
Your answer
Follow this Question
Related Questions
External terrain renderer 0 Answers
Native rendering plugin OpenGL device type not being set. 2 Answers
Native Rendering Plugin with Oculus Rift 0 Answers