Skip to main content

openGL offscreen software rendering on linux server without x11

· 7 min read

opengl in software mode

Ever tried to render something with openGL on a linux server that has no x11 installed nor has a physical gpu connected? I searched for a long time for a solution that would work almost out of the box and the first solution i could find was actually installing x11, mesa3d and a dummy x-display. Via putty that has x11-forwarding enabled it is possible to run x-applications just fine and even render with openGL thanks to mesa in software mode!

But as soon as you close the ssh connection x11 stops and after that x-applications and openGL won't be able to connect to a display! So after every server restart openGL won't work anymore...

So why do you need a display or x11 if you want to render offscreen?

TileDownloader

· One min read

I made a little tool which allows me to download tiles from bing maps and puts them together.

tiledownloader

The next updates will add a proper thread for the stiching process which currently blocks the Ui till it's done. Anyways grab it from github.

Gamma correction

· 2 min read

Gamma correction in openGL is very easily to achieve, but why do you need gamma correction? Let's keep it simple... First of all your textures you use as input for your openGL renderer are most likely in non linear color space. Your renderer on the other hand is probably calculating light under the assumption of linear color spaced color values in your loaded textures. So you might be working in two different color spaces. After your renderer is done it writes the colors to the screen, which uses non linear color space like your textures do! So what happens is, that your calculation might be visually wrong...

So how can you solve this?

The answer is very easy:

Post processing aa (fxaa)

· 3 min read

Why post processing antialiasing ? Because of two reasons. A good and fast post processing filter like fxaa or cmaa can achieve almost the same visual output like the usual multisampling counter part (msaa) and costs way less on the GPU because you dont need multiple samples per fragment/pixel! Another restriction is the rendering pipeline you might choose. A deferred renderer uses multiple framebuffers to achieve multiple different effects and using multiple samples on each of those framebuffers might have a really big impact on performance. Additionally it is practically impossible to use mxaa in a deferred renderer, because multisampling the position framebuffer results in wrong values around objects!

Let's have a look on the code:

NFAA

· 3 min read

nfaa

Added post processing anti aliaising. Still tweaking it a bit.

The idea behind this shader: NFAA

Switcher, Symbian task manager

· 6 min read

Switcher is a task manager for Symbian S^3 that showed running processes as tiles. The 3D part of the app ran on my OpenGL ES engine. The app went into the Ovi Store in 2012, and Symbian died in 2013. Everything below is history.

University projects: Spectre and Wochenplaner

· 2 min read

These two projects came out of my studies at university. I study media informatics, and the semester projects allowed any object oriented programming language. Neither project became a long running hobby project, so the whole story sits in one post.

Notebook fried and replaced in 2012

· One min read

On 2012-07-25 I destroyed my notebook by mistake. The BIOS got fried during an update and the damage was not repairable. Development stopped for two weeks, because I had no machine that could compile and test my projects. I managed to back up all projects before the loss.