Example #1
0
int sample_main ( int argc, const char** argv )
{
	

	static AppWindow appWindow;

	NVPWindow::ContextFlags context (
		4,      //major;
		3,      //minor;
		false,   //core;
		16,      //MSAA;
		24,     //depth bits
		8,      //stencil bits

		true,   //debug;
		false,  //robust;
		false,  //forward;
	    NULL   //share;
    );
	appWindow.sysVisibleConsole();

	if ( !appWindow.create("OpenGL + OptiX Compositing", &context ) )
		return false;

	appWindow.makeContextCurrent();
	appWindow.swapInterval(0);	

	while( AppWindow::sysPollEvents(false) )
    {
		appWindow.postRedisplay ( 1 );		// ask window to refresh (will call display)
    }

	return true;
}