2013-01-23 19 views

cevap

10

Bunu anlamak için biraz zaman harcadım. OpenGL initialising zaman

setSurfaceType(QWindow::OpenGLSurface); 
QSurfaceFormat format; 
format.setSamples(4); // Set the number of samples used for multisampling 
setFormat(format);  // Note we set the format on the window... 
create();    // Create the window 

context = new QOpenGLContext(this); 
context->setFormat(format); // ...and set the format on the context too 
context->create(); 

Ve daha sonra,:

hüner böylece sevdiği QWindow 'nin yapıcı bir QSurfaceFormat kullanmaktır

glEnable(GL_MULTISAMPLE); // This seems to be the default given the configuration above, but just in case that's not universal... 
+0

gerçekten garip, ayarlama anlamı nedir QWindow sadece kendi işini yaparsa QOpenGLContext üzerinde – paulm

+2

@paulm: Hiçbir fikrim, işe yaramaz kadar şeylerle uğraştım ;-) – Cameron

İlgili konular