이 페이지에서

QOpenGLVersionProfile Class

QOpenGLVersionProfile 클래스는 OpenGL 컨텍스트의 버전과, 해당되는 경우 프로필을 나타냅니다. 더 보기...

헤더: #include <QOpenGLVersionProfile>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpenGL)
target_link_libraries(mytarget PRIVATE Qt6::OpenGL)
qmake: QT += opengl

공개 함수

QOpenGLVersionProfile()
QOpenGLVersionProfile(const QSurfaceFormat &format)
QOpenGLVersionProfile(const QOpenGLVersionProfile &other)
~QOpenGLVersionProfile()
bool hasProfiles() const
bool isLegacyVersion() const
bool isValid() const
QSurfaceFormat::OpenGLContextProfile profile() const
void setProfile(QSurfaceFormat::OpenGLContextProfile profile)
void setVersion(int majorVersion, int minorVersion)
std::pair<int, int> version() const
QOpenGLVersionProfile &operator=(const QOpenGLVersionProfile &rhs)

상세 설명

이 클래스의 객체를 QOpenGLContext::versionFunctions()에 전달하여 특정 버전의 OpenGL 및 프로필에 대한 함수 객체를 요청할 수 있습니다.

또한 특정 버전이 프로파일을 지원하는지, 혹은 레거시 버전인지 확인하는 데 도움이 되는 몇 가지 보조 함수도 포함되어 있습니다.

멤버 함수 문서

QOpenGLVersionProfile::QOpenGLVersionProfile()

기본값으로 유효하지 않은 QOpenGLVersionProfile 객체를 생성합니다.

[explicit] QOpenGLVersionProfile::QOpenGLVersionProfile(const QSurfaceFormat &format)

format 에서 가져온 버전 및 프로필로 초기화된 QOpenGLVersionProfile 객체를 생성합니다.

QOpenGLVersionProfile::QOpenGLVersionProfile(const QOpenGLVersionProfile &other)

other 의 복사본을 생성합니다.

[noexcept] QOpenGLVersionProfile::~QOpenGLVersionProfile()

QOpenGLVersionProfile 객체를 삭제합니다.

bool QOpenGLVersionProfile::hasProfiles() const

version() 함수가 반환한 OpenGL 버전에서 프로파일이 지원되는 경우 true 를 반환합니다. OpenGL 버전 3.2 이상에서만 프로파일이 지원됩니다.

profile() 및 version()도 참조하십시오 .

bool QOpenGLVersionProfile::isLegacyVersion() const

true 를 반환합니다. 이는 version() 함수가 반환하는 OpenGL 버전으로, 사용 중단된 함수를 포함하고 있으며 프로필을 지원하지 않습니다. 즉, OpenGL 버전이 3.1 이하인 경우입니다.

bool QOpenGLVersionProfile::isValid() const

버전 번호가 유효한 경우 true 를 반환합니다. 기본 생성된 QOpenGLVersionProfile 객체의 경우, 이 함수는 false 를 반환한다는 점에 유의하십시오.

setVersion() 및 version()도 참조하십시오 .

QSurfaceFormat::OpenGLContextProfile QOpenGLVersionProfile::profile() const

OpenGL 프로필을 반환합니다. 이 버전에서 프로필이 지원되는 경우에만 의미가 있습니다.

setProfile()도 참조하십시오 .

void QOpenGLVersionProfile::setProfile(QSurfaceFormat::OpenGLContextProfile profile)

OpenGL 프로필 profile 을 설정합니다. 이 버전에서 프로필이 지원되는 경우에만 의미가 있습니다.

profile()도 참조하십시오 .

void QOpenGLVersionProfile::setVersion(int majorVersion, int minorVersion)

메이저 및 마이너 버전 번호를 각각 majorVersion 및 minorVersion 로 설정합니다.

version()도 참조하십시오 .

std::pair<int, int> QOpenGLVersionProfile::version() const

OpenGL의 메이저 버전 번호와 마이너 버전 번호를 각각 나타내는 std::pair<int,int>를 반환합니다.

setVersion()도 참조하십시오 .

QOpenGLVersionProfile &QOpenGLVersionProfile::operator=(const QOpenGLVersionProfile &rhs)

이 QOpenGLVersionProfile 객체에 rhs 의 버전과 프로필을 할당합니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.