=begin
/****************************************************************************
** $Id: qt/examples/box/main.cpp   2.2.2   edited 2000-08-31 $
**
** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
**
** This file is part of an example program for Qt.  This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
=end
#//
#// Qt OpenGL example: Box
#//
#// A small example showing how a GLWidget can be used just as any Qt widget
#// 
#// File: main.cpp
#//
#// The main() function 
#// 

#include "globjwin.h"
#include <qapplication.h>
#include <qgl.h>

require "qt2"
include Qt2
require "glbox.rb"
require "globjwin.rb"

#/*
#  The main program is here.
#*/


    QApplication::setColorSpec( QApplication::CustomColor )
    a = QApplication.new([$0]+ARGV)

    if ( !QGLFormat::hasOpenGL() ) 
	print( "This system has no OpenGL support. Exiting." )
	exit( -1 )
    end

    w = GLObjectWindow.new
    w.resize( 400, 350 )
    a.setMainWidget( w )
    w.show()
    a.exec()

