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)
QPair<int, int> version() const
QOpenGLVersionProfile &operator=(const QOpenGLVersionProfile &rhs)

상세 설명

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

또한 버전이 프로파일을 지원하는지 또는 레거시 버전인지 확인하기 위한 몇 가지 헬퍼 함수도 포함되어 있습니다.

멤버 함수 문서

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)

주 버전과 부 버전 번호를 각각 majorVersionminorVersion 으로 설정합니다.

version()도 참조하세요 .

QPair<int, int> QOpenGLVersionProfile::version() const

QPair<int,int>를 반환하며, 여기서 컴포넌트는 각각 메이저 및 마이너 OpenGL 버전 번호를 나타냅니다.

setVersion()도 참조하세요 .

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

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

© 2025 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.