I have successfully changed the backend of cairo that GTK uses to GLES(in the X11 window implementation). I am using a eglWIndowSurface for every gdkwindow. The problem I am facing is that because GTK is doing differential rendering I get to see only the current focus region rendered. Is there any way we can make GTK to render complete window all the time?
Related
I am rendering my GL content using EGL on Weston compositor.
the content displayed well.
my requirement is to hide and show the surface with some event.
Can you suggest how to do that?
when i was using glut with x11 , i used glutShowWindow(); and glutHideWindow();
is there way to simply hide the shell surface and then show it again on Weston?
I'm developing a cross-platform photo retouching application based on Gtk-2 (but already able to support Gtk-3 with minor modifications).
In my program, the result of the image retouching is previewed in a scrollable area that is implemented through a Gtk::DrawingArea inserted into a Gtk::ScrolledWindow. The drawing itself is performed using Cairo.
Recently I had the possibility to test the software on a MacBookPro laptop with retina display, and I've immediately realised that the preview image gets magnified by a factor of 2, like all the rest of the GUI elements.
Is there a way to tell Cairo and the DrawingArea to use the native screen resolution, instead of applying a 2x magnification? Is this supported in recent Gtk-3 versions?
Thanks for you help.
I am working on a mac osx control that is OpenGL based. Currently I am using an NSOpenGLView and a CVDisplayLink to coordinate my rendering on a background thread. This works great, but I need to allow Cocoa controls to be displayed over this OpenGL based control.
I realize you can do this with putting your Cocoa controls in borderless windows, however, that doesn't seem like a very good workflow for my users.
Alternatively I can make the view layer-backed and I got that working, however I don't like rendering my OpenGL content on the main thread, sometimes it blocks the main thread when the frame-rate dips.
Are there any samples that show how to achieve the best of both worlds?
The background thread for rendering is completely irrelevant. You just need to enable layer-backing for the views and then the subviews/controls will be composited correctly on top of your OpenGL content. You can also use CAOpenGLLayer for more explicit layering with CALayers.
My application uses OpenCV, OpenGL, and Qt to display a webcam feed. It works perfectly on Ubuntu (clicking buttons works properly), but on OSX there seems to be a UI problem. The window displays, but I can't click and I quickly just get the loading spinning pinwheel and it doesn't stop until I force quit the application. Has anyone come across this problem before?
I solved this by adding a timer to the initialization of my gui widget:
m_timer = new QTimer();
connect(m_timer, SIGNAL(timeout()), this, SLOT(gotNewImage()));
m_timer->start(1);
where gotNewImage() is the function I call to grab a new image.
Is it possible to intercept a control's paint event and make it draw in the opengl context?
I dont know if this is possible, but this tends to writing your own gui.
It whould be simpler to use a complete openGl Gui library.
http://libufo.sourceforge.net/
If you're using Qt there's a fun demo showing (working) Qt widgets rendering 3D in an OpenGL context. How useful that is to you depends how how hooked you are on the native win32 controls specifically.