Also make sure you don't forget
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
just before you start drawing stuff (every frame).
Also if you found a tutorial source, I'm sure they offer a basic render loop example which would take care of setting defaults for camera, materials and lighting etc.
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
just before you start drawing stuff (every frame).
Also if you found a tutorial source, I'm sure they offer a basic render loop example which would take care of setting defaults for camera, materials and lighting etc.