So what happened here ( the reason it seg faulted ).

the initialization of sdl/glew/gl all happens in the constructor call for SDLEngine. If you put GroundPlane ground_, say on line 20 before SDLEngine, then GroundPlane's constructor will get called first.

Then GroundPlane will make a GL call when GL is not fully initialized. BOOM! seg fault.

Mostly just put stuff after shaders_. That has the initialization logic for all of the shaders.