I\'ve been using OpenGL extensions on Windows the painful way. Is GLEW the easier way to go? How do I get started with it?
Personally I wouldn't use an exit command.
I would throw an exception so you can clear any other initialisation up at the end of the function.
ie:
try
{
// init opengl/directx
// init directaudio
// init directinput
if (GLEW_OK != glewInit())
{
throw std::exception("glewInit failed");
}
}
catch ( const std::exception& ex )
{
// message to screen using ex.what()
// clear up
}
And I agree with OJ - if you want to write tutorials for others, then this is really the wrong place for it. There are already a load of good places for opengl tutorials. Try this one for instance.