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.
		
		
		
		
		
			
		
			
				
					
					
						
							39 lines
						
					
					
						
							967 B
						
					
					
				
			
		
		
	
	
							39 lines
						
					
					
						
							967 B
						
					
					
				#include <QApplication>
 | 
						|
 | 
						|
#ifdef QCOM2
 | 
						|
#include <qpa/qplatformnativeinterface.h>
 | 
						|
#include <QPlatformSurfaceEvent>
 | 
						|
#include <wayland-client-protocol.h>
 | 
						|
#endif
 | 
						|
 | 
						|
#include "window.hpp"
 | 
						|
 | 
						|
int main(int argc, char *argv[]) {
 | 
						|
  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;
 | 
						|
  w.setFixedSize(vwp_w, vwp_h);
 | 
						|
  w.show();
 | 
						|
 | 
						|
  a.installEventFilter(&w);
 | 
						|
 | 
						|
#ifdef QCOM2
 | 
						|
  QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
 | 
						|
  wl_surface *s = reinterpret_cast<wl_surface*>(native->nativeResourceForWindow("surface", w.windowHandle()));
 | 
						|
  wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
 | 
						|
  wl_surface_commit(s);
 | 
						|
  w.showFullScreen();
 | 
						|
#endif
 | 
						|
 | 
						|
  return a.exec();
 | 
						|
}
 | 
						|
 |