This is more of a vocabulary question than anything else.
Introduction
I'm using the Point Cloud Library to get face tracking data. Using this data I want to track where a user is facing on the screen. This is not a problem.
Problem
To give user-feedback, I would like to draw the estimation of the user's face-direction as a red circle on the screen, basically as seen here (they just create a tiny window). I would like this circle to be able to go everywhere on the screen and I want it to be always visible. I do not want it to be covered by another active window. If it impedes interaction with the window, I'm fine with that.
My problem is that I do not know where to start.
I could just control the cursor, but that is less then ideal, because I would like to still be able to move the cursor while I'm using face detection.
I think I need to use OpenGL, but all the examples I've seen have been inside X windows. For example, the code I found here after getting a hint here, give me a nice permanent window, but the window still captures all my mouse clicks. How do I draw something on a screen with OpenGL that is X-window independent?
Am I approaching this from the wrong direction completely? If so, what should I be googling?
I will accept any answer that gives me a starting point.
Platform
I am using Ubuntu 12.04 with the Unity desktop.
Create a regular window. Tell the WM to skip decorations ant to keep the window always on top. Use XFixesSetWindowShapeRegion() to separately set a circular output region and an empty input region. You need a compositing window manager XFixes extensions for this to work.
You can also make your window semi-transparent (this needs a compositing window manager).
A modern toolkit such as gtk should have easy to use APIs to do all of the above.
No OpenGL is needed at any stage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With