Rendering your own graphics with gtk

I want to write my own graphics engine and use a gtk 3.
I can’t figure out how to render frame by frame using double buffering and vertical sync. In addition, I would like to calculate the FPS.
I also noticed that all widgets adjust to their own sizes. I’m thinking of making my own resolution and enlarging the image to place it in the buffer.

Which widget should I use? Or is it better to write my own widget?

I would recommend at the very least using OpenGL if possible. If you use GtkGLArea, that should be double buffer vsynced automatically. To measure FPS, you can increase a counter every time the render method/signal is called.

For fast scaling you may want to render to your own GL framebuffer and then scale that in a final “post process” step. That way you can control the filtering and aspect ratio yourself.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.