You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							23 lines
						
					
					
						
							559 B
						
					
					
				
			
		
		
	
	
							23 lines
						
					
					
						
							559 B
						
					
					
				| #include <QApplication>
 | |
| 
 | |
| #include "window.hpp"
 | |
| #include "qt_window.hpp"
 | |
| 
 | |
| int main(int argc, char *argv[]) {
 | |
|   // TODO: should probably be done in gl window
 | |
|   QSurfaceFormat fmt;
 | |
| #ifdef __APPLE__
 | |
|   fmt.setVersion(3, 2);
 | |
|   fmt.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
 | |
|   fmt.setRenderableType(QSurfaceFormat::OpenGL);
 | |
| #else
 | |
|   fmt.setRenderableType(QSurfaceFormat::OpenGLES);
 | |
| #endif
 | |
|   QSurfaceFormat::setDefaultFormat(fmt);
 | |
| 
 | |
|   QApplication a(argc, argv);
 | |
|   MainWindow w;
 | |
|   setMainWindow(&w);
 | |
|   a.installEventFilter(&w);
 | |
|   return a.exec();
 | |
| }
 | |
| 
 |