Setting Icons in 0.8.0


I managed to get a custom icon working under Linux in 0.8.0

First I have to make the setWindowIcon() function public. Then I did the following (after putting an icon.png in my data folder). It would be good if there was an easier way to do this in future…icons are rad!

#include "ofAppGLFWWindow.h"  
ofSetup() {	  
ofAppGLFWWindow* win;  
win = dynamic_cast<ofAppGLFWWindow *> (ofGetWindowPtr());  


yes i made this private because there was some problems with having it as public, don’t remember exactly what but the idea is to have them as public at some point


There’s something weird that happens to the colour palette of the icon when it’s loaded though. Maybe the colours are downscaled from 24bit to 16bit or something like that. I haven’t had a chance to investigate yet. Black and white is of course fine.

Also not all .png’s seemed to work, even at the same size. Didn’t figure out this either.


Hi @arturo,

any chance you will make it public in the next releases?