fix bug in cube rendering, optimization + clean code of geometry shader