Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between OpenGL and XRender in KDE Desktop Effects? [closed]

Tags:

linux

opengl

kde

In KDE environment when you go to Desktop Effects and in the Advanced tab there is an option named "Compositing type" which can be set to OpenGL or XRender.

  1. What is the difference between these two options?

  2. What's the use case of each option?

like image 633
Nejat Avatar asked Mar 11 '14 06:03

Nejat


People also ask

Does KDE use OpenGL?

For ages now, KDE has had the option to choose between three compositors rendering backends -- Xrender, OpenGL 2.0 and OpenGL 3.1.


2 Answers

OpenGL and XRender are both drawing APIs that allow for applications of certain geometrical transformations while doing so.

OpenGL is targeted at drawing operations to be executed by a dedicated graphics processing unit (GPU) and provides many features that make generating a 3D-looking image very easy (depth buffer, depth testing, 4×4 homogenous transformation matrices). But you can do 2D looking graphics as well with OpenGL.

XRender is an extension to the X11, to support methods of rendering (antialiasing, alpha blending) that are not possible to do with the core X11 drawing functions. The XRender-API is optimized for 2D looking graphics, though (no depth buffer/test, 3×3 transformation matrices).

Note that XRender is not perfectly orthogonal to OpenGL. Epecially if you need antialiasing in OpenGL you have to use a few functions from XRender to enable it.

What's the use case of each option?

The option of XRender is there to support systems for which there is no proper OpenGL support (lack of stable drivers), but acceptable support for XRender operations. Also XRender is a bit easier to setup (from a programmers point of view) than OpenGL.

In general OpenGL is more flexible than XRender from a programmers perspective. If you're asking which of each you should choose: Start with OpenGL and if everything works acceptable stick with it. The XRender option is a fallback if OpenGL doesn't work properly (however since nowadays in the drivers XRender shares a large part with OpenGL, or is actually implemented using OpenGL it makes no practical difference any more).

like image 112
datenwolf Avatar answered Oct 05 '22 01:10

datenwolf


I use XRender because KWin with OpenGL likes to spin the CPU for no good reason.

It also has some weird issues with OBS and games running in wine/Proton.

Can highly recommend to switch to XRender on nVidia cards!

like image 21
Sjoer van der Ploeg Avatar answered Oct 05 '22 00:10

Sjoer van der Ploeg