mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-12 18:47:24 +02:00
15 lines
506 B
C++
15 lines
506 B
C++
#include "GLHelpers.h"
|
|
|
|
|
|
QSurfaceFormat getDefaultOpenGlSurfaceFormat() {
|
|
QSurfaceFormat format;
|
|
// Qt Quick may need a depth and stencil buffer. Always make sure these are available.
|
|
format.setDepthBufferSize(DEFAULT_GL_DEPTH_BUFFER_BITS);
|
|
format.setStencilBufferSize(DEFAULT_GL_STENCIL_BUFFER_BITS);
|
|
format.setVersion(4, 1);
|
|
#ifdef DEBUG
|
|
format.setOption(QSurfaceFormat::DebugContext);
|
|
#endif
|
|
format.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
|
|
return format;
|
|
}
|