OpenGL 조각 및 버텍스 셰이더 생성하기
Qt는 모든 플랫폼에서 OpenGL 구현과의 통합을 지원하므로 하드웨어 가속 3D 그래픽을 기존 사용자 인터페이스와 함께 표시할 수 있습니다. 자세한 내용은 Qt GUI.
QOpenGLShader 클래스를 사용하여 OpenGL 셰이딩 언어(GLSL)와 OpenGL/ES 셰이딩 언어(GLSL/ES)로 작성된 OpenGL 셰이더를 컴파일할 수 있습니다. QOpenGLShader와 QOpenGLShaderProgram은 버텍스 및 프래그먼트 셰이더 컴파일 및 연결에 대한 세부 사항을 보호합니다.
OpenGL 셰이더를 생성하려면:
- File > New File > GLSL 을 선택합니다.

- 생성할 셰이더 유형을 선택한 다음 Choose 을 선택합니다.
- 마법사의 지시에 따라 셰이더 파일을 생성합니다.
- 코드 편집기에서 셰이더 파일을 열고 셰이더 코드를 GLSL 또는 GLSL/ES로 작성합니다. 코드 편집기는 파일에 구문 강조 표시 및 코드 완성 기능을 제공합니다.
파일 만들기 및 프로젝트 사용 마법사도참조하세요 .
Copyright © The Qt Company Ltd. and other contributors. 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.