int main() { CGL *gl = new CGL(SCREEN_WIDTH, SCREEN_HEIGHT); gl->initGL(); int flags= SDL_OPENGL|SDL_RESIZABLE; CSDL *sdl = new CSDL(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP,flags, gl); sdl->setCaption("Basic Shading"); while(true) { sdl->handleEvent(gl); gl->renderGL(); } return 0; }
int main() { CGL *gl = new CGL(SCREEN_WIDTH, SCREEN_HEIGHT); gl->initGL(); int flags= SDL_OPENGL|SDL_RESIZABLE; CSDL *sdl = new CSDL(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP,flags, gl); sdl->setCaption("GLSL-Texturing"); //if(glewInit() != GLEW_OK) exit(EXIT_FAILURE); gl->compileShader(); gl->loadTexture(); gl->setUniform(); while(true) { sdl->handleEvent(gl); gl->renderGL(); } gl->clean(); //cout << "Hello world!" << endl; return 0; }