I heard you can hook window handle and use this window as OpenGL canvas. I know how to hook windows, but I can’t find how can I draw on this window.
PS. I’m using Qt if it helps.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
OpenGL contexts are only usable in one thread at a time and are bound to processes. So what that required was creating a OpenGL context of a foreign process’ resource.
On Windows using some very quircky hacks this was possible in at least WinXP (I don’t know about Vista or 7); this usually includes making large portions of the process memory shared.
On X11/GLX it’s a lot easier by creating the context as indirect rendering context (unfortunately OpenGL-3 has not complete indirect GLX specification, for some shady excuses of reasons); indirect contexts can be accessed from multiple processes.
In any case both processes must cooperate to make this work.