Obsolete Members for Qt3DRender
Qt3DRender 클래스의 다음 멤버들은 더 이상 사용되지 않습니다. 이 멤버들은 기존 소스 코드가 계속 작동하도록 하기 위해 제공됩니다. 새로운 코드에서는 이 멤버들을 사용하지 않는 것을 강력히 권장합니다.
네임스페이스
클래스
(deprecated) class | QAbstractLight |
(deprecated) class | QAbstractRayCaster |
(deprecated) class | QAbstractTexture |
(deprecated) class | QAbstractTextureImage |
(deprecated) class | QAlphaCoverage |
(deprecated) class | QAlphaTest |
(deprecated) class | QBlendEquation |
(deprecated) class | QBlendEquationArguments |
(deprecated) class | QBlitFramebuffer |
(deprecated) class | QBufferCapture |
(deprecated) class | QCamera |
(deprecated) class | QCameraLens |
(deprecated) class | QCameraSelector |
(deprecated) class | QClearBuffers |
(deprecated) class | QClipPlane |
(deprecated) class | QColorMask |
(deprecated) class | QComputeCommand |
(deprecated) class | QCullFace |
(deprecated) class | QDebugOverlay |
(deprecated) class | QDepthRange |
(deprecated) class | QDepthTest |
(deprecated) class | QDirectionalLight |
(deprecated) class | QDispatchCompute |
(deprecated) class | QDithering |
(deprecated) class | QEffect |
(deprecated) class | QEnvironmentLight |
(deprecated) class | QFilterKey |
(deprecated) class | QFrameGraphNode |
(deprecated) class | QFrontFace |
(deprecated) class | QFrustumCulling |
(deprecated) class | QGeometryRenderer |
(deprecated) class | QGraphicsApiFilter |
(deprecated) class | QLayer |
(deprecated) class | QLayerFilter |
(deprecated) class | QLevelOfDetail |
(deprecated) class | QLevelOfDetailBoundingSphere |
(deprecated) class | QLevelOfDetailSwitch |
(deprecated) class | QLineWidth |
(deprecated) class | QMaterial |
(deprecated) class | QMemoryBarrier |
(deprecated) class | QMesh |
(deprecated) class | QMultiSampleAntiAliasing |
(deprecated) class | QNoDepthMask |
(deprecated) class | QNoDraw |
(deprecated) class | QNoPicking |
(deprecated) class | QObjectPicker |
(deprecated) class | QPaintedTextureImage |
(deprecated) class | QParameter |
(deprecated) class | QPickEvent |
(deprecated) class | QPickLineEvent |
(deprecated) class | QPickPointEvent |
(deprecated) class | QPickTriangleEvent |
(since 6.0, deprecated) class | QPickingProxy |
(deprecated) class | QPickingSettings |
(deprecated) class | QPointLight |
(deprecated) class | QPointSize |
(deprecated) class | QPolygonOffset |
(deprecated) class | QProximityFilter |
(deprecated) class | QRasterMode |
(deprecated) class | QRayCaster |
(deprecated) class | QRayCasterHit |
(deprecated) class | QRenderAspect |
(deprecated) class | QRenderCapabilities |
(deprecated) class | QRenderCapture |
(deprecated) class | QRenderCaptureReply |
(deprecated) class | QRenderPass |
(deprecated) class | QRenderPassFilter |
(deprecated) class | QRenderSettings |
(deprecated) class | QRenderState |
(deprecated) class | QRenderStateSet |
(deprecated) class | QRenderSurfaceSelector |
(deprecated) class | QRenderTarget |
(deprecated) class | QRenderTargetOutput |
(deprecated) class | QRenderTargetSelector |
(deprecated) class | QSceneLoader |
(deprecated) class | QScissorTest |
(deprecated) class | QScreenRayCaster |
(deprecated) class | QSeamlessCubemap |
(deprecated) class | QSetFence |
(deprecated) class | QShaderData |
(deprecated) class | QShaderImage |
(deprecated) class | QShaderProgram |
(deprecated) class | QShaderProgramBuilder |
(deprecated) class | QSharedGLTexture |
(deprecated) class | QSortPolicy |
(deprecated) class | QSpotLight |
(deprecated) class | QStencilMask |
(deprecated) class | QStencilOperation |
(deprecated) class | QStencilOperationArguments |
(deprecated) class | QStencilTest |
(deprecated) class | QStencilTestArguments |
(deprecated) class | QSubtreeEnabler |
(deprecated) class | QTechnique |
(deprecated) class | QTechniqueFilter |
(deprecated) class | QTexture1D |
(deprecated) class | QTexture1DArray |
(deprecated) class | QTexture2D |
(deprecated) class | QTexture2DArray |
(deprecated) class | QTexture2DMultisample |
(deprecated) class | QTexture2DMultisampleArray |
(deprecated) class | QTexture3D |
(deprecated) class | QTextureBuffer |
(deprecated) class | QTextureCubeMap |
(deprecated) class | QTextureCubeMapArray |
(deprecated) class | QTextureData |
(deprecated) class | QTextureDataUpdate |
(deprecated) class | QTextureImage |
(deprecated) class | QTextureImageData |
(deprecated) class | QTextureImageDataGenerator |
(deprecated) class | QTextureLoader |
(deprecated) class | QTextureRectangle |
(deprecated) class | QTextureWrapMode |
(deprecated) class | QViewport |
(deprecated) class | QWaitFence |
네임스페이스
[deprecated] namespace Qt3DRender::Quick
이 네임스페이스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 네임스페이스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] namespace Qt3DRender::Render
이 네임스페이스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 네임스페이스를 사용하지 말 것을 강력히 권장합니다.
클래스
[deprecated] class Qt3DRender::QAbstractLight
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QAbstractRayCaster
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QAbstractRayCaster Qt3DRender::QAbstractRayCaster 는 3D 씬에 광선을 캐스팅하기 위한 추상 기본 클래스입니다. 는 직접 인스턴스화할 수 없으며, 하위 클래스를 통해 인스턴스화해야 합니다. QAbstractRayCaster는 실행 모드 및 레이어 처리와 같은 모든 레이 캐스터에 공통적인 속성을 지정하는 한편, 실제 레이 캐스팅에 대한 세부 사항은 하위 클래스에 맡깁니다.
레이 캐스팅은 ( Qt3DRender::QObjectPicker 를 사용하는) 피킹과 달리, 트리거하기 위해 마우스 이벤트가 필요하지 않다는 점에서 다릅니다.
기본적으로 Qt3DRender::QAbstractRayCaster 의 인스턴스는 비활성화되어 있습니다. 활성화되면 지정된 레이에 대해 매 프레임마다 교차하는 오브젝트가 있는지 테스트됩니다. 오브젝트가 발견되지 않더라도 QAbstractRayCaster::hits 속성은 레이 캐스팅 결과로 업데이트됩니다.
Qt3DRender::QPickingSettings 를 사용하면 테스트할 프리미티브나 결과 반환 방식 등 레이 캐스팅을 제어할 수 있습니다.
또한, ` Qt3DRender::QLayer ` 컴포넌트를 사용하여 엔티티나 엔티티 하위 그래프가 레이 캐스팅에 어떻게 반응할지 제어할 수 있습니다.
참고: QAbstractRayCaster에서 파생된컴포넌트는 여러 엔티티에서 공유해서는 안 됩니다.
Qt3DRender::QRayCaster, Qt3DRender::QScreenRayCaster, Qt3DRender::QObjectPicker, Qt3DRender::QPickingSettings 및 Qt3DRender::QNoPicking도 참조하십시오 .
[deprecated] class Qt3DRender::QAbstractTexture
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QAbstractTexture 클래스는 직접 사용해서는 안 되며, 대신 그 하위 클래스 중 하나를 통해 사용해야 합니다. 각 하위 클래스는 주어진 텍스처 타깃(2D, 2DArray, 3D, CubeMap 등)을 구현합니다. 각 하위 클래스는 각 레이어, 큐브 맵 면 및 밉맵 레벨에 대한 일련의 펑터를 제공합니다. 백엔드는 이러한 펑크터를 사용하여 해당 OpenGL 텍스처를 데이터로 올바르게 채웁니다. 텍스처 생성 및 업로드 속도가 저하되지 않도록 펑크터는 가능한 한 최소한의 처리만 수행해야 합니다. 텍스처의 내용이 느린 절차적 생성 과정의 결과인 경우, 이를 펑크터 내에서 직접 구현하지 않는 것이 좋습니다.
모든 텍스처는 고유합니다. 동일한 텍스처를 두 번 인스턴스화하면 GPU에 두 개의 동일한 텍스처가 생성되며, 텍스처 간 공유는 이루어지지 않습니다.
[deprecated] class Qt3DRender::QAbstractTextureImage
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QAbstractTexture 에 이미지 데이터를 제공하는 수단으로는 QAbstractTextureImage를 사용해야 합니다. 이 클래스에는 미프맵 레벨, 레이어, 큐브 면 등 OpenGL 텍스처에 데이터를 적절한 위치에 로드하는 데 필요한 정보가 포함되어 있습니다.
실제 데이터는 백엔드에서 Aspect 작업에 의해 실행될 ` QTextureImageDataGenerator `을 통해 제공됩니다. `QAbstractTextureImage`는 펑크터(functor)를 제공하고, 펑크터가 실제 데이터를 로드하는 데 필요한 추가 속성을 제공하기 위해 서브클래스로 상속받아야 합니다.
참고: QAbstractTextureImage는 절대로 공유해서는 안 됩니다. 이 규칙을 준수하지 않을 경우, 최악의 경우 크래시가 발생하거나 정의되지 않은 동작이 나타날 수 있습니다.
[deprecated] class Qt3DRender::QAlphaCoverage
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QAlphaCoverage 클래스는 알파-투-커버리지(alpha-to-coverage) 멀티샘플링 모드를 활성화합니다. 이 모드가 활성화되면, 프래그먼트 알파 값이 샘플의 커버리지로 사용되며 프래그먼트 커버리지 값과 결합됩니다. 멀티샘플링이 비활성화된 경우 Qt3DRender::QAlphaCoverage 은 아무 작업도 수행하지 않습니다. 알파-투-커버리지 기능은 순서 독립적 블렌딩이 필요한 경우, 예를 들어 나뭇잎, 풀, 기타 무성한 식생을 렌더링할 때 가장 유용합니다.
QRenderPass::addRenderState()를 호출하여 QRenderPass 에 이 기능을 추가할 수 있습니다:
QRenderPass *renderPass = new QRenderPass();
// Create a alpha coverage render state
QAlphaCoverage *alphaCoverage = new QAlphaCoverage();
QMultiSampleAntiAliasing *multiSampleAntialiasing = new QMultiSampleAntiAliasing();
// Add the render states to the render pass
renderPass->addRenderState(alphaCoverage);
renderPass->addRenderState(multiSampleAntialiasing);또는 QRenderStateSet::addRenderState()를 호출하여 QRenderStateSet 에 추가할 수 있습니다:
QRenderStateSet *renderStateSet = new QRenderStateSet();
// Create a alpha coverage render state
QAlphaCoverage *alphaCoverage = new QAlphaCoverage();
QMultiSampleAntiAliasing *multiSampleAntialiasing = new QMultiSampleAntiAliasing();
// Add the render states to the render state set
renderStateSet->addRenderState(alphaCoverage);
renderStateSet->addRenderState(multiSampleAntialiasing);Qt3DRender::QMultiSampleAntiAliasing도 참조하십시오 .
[deprecated] class Qt3DRender::QAlphaTest
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
OpenGL 문서에 설명되어 있듯이, 알파 테스트는 입력된 프래그먼트의 알파 값과 상수 참조 값 간의 비교 결과에 따라 해당 프래그먼트를 버립니다.
[deprecated] class Qt3DRender::QBlendEquation
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
블렌드 방정식은 새로운 픽셀이 프레임버퍼에 이미 존재하는 픽셀과 어떻게 결합될지를 결정하는 데 사용됩니다.
[deprecated] class Qt3DRender::QBlendEquationArguments
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
OpenGL 3.0 이전: 모든 드로우 버퍼에 동일한 블렌드 상태를 설정합니다(QBlendEquationArguments 하나). OpenGL 3.0~4.0 이전: 모든 드로우 버퍼에 동일한 블렌드 상태를 설정하되, 특정 버퍼에 대해서는 블렌딩을 비활성화할 수 있습니다(glBlendFunc 설정을 위한 QBlendEquationArguments 1개, 드로우 버퍼 활성화/비활성화를 위한 QBlendEquationArguments n개). OpenGL 4.0 이상: 각 드로우 버퍼에 대해 개별적으로 블렌드 상태를 설정할 수 있습니다.
[deprecated] class Qt3DRender::QBlitFramebuffer
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
이 노드는 명령 스트림에 ` glBlitFrameBuffer ` 또는 이에 상응하는 노드를 삽입합니다. 이는 텍스처가 적용된 사각형을 그리는 것보다, 텍스처 간 또는 ` QRenderTarget `로 래핑된 표면 백버퍼 간에 직사각형을 복사하는 데 더 효율적인 방법을 제공합니다. 또한 지정된 보간 방법을 사용한 크기 조정도 지원합니다.
참고: 실제로 QBlitFramebuffer 노드는 QNoDraw 와 함께 사용되는 경우가 많습니다. 블릿(blit) 작업에는 어떤 엔티티에 대한 드로우 호출도 포함되어서는 안 되기 때문입니다.
[deprecated] class Qt3DRender::QBufferCapture
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QCamera
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QCameraLens
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QCameraSelector
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QCameraSelector 를 사용하여 카메라를 선택할 수 있으며, FrameGraph는 엔티티를 렌더링할 때 이 카메라를 사용합니다.
[deprecated] class Qt3DRender::QClearBuffers
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QClearBuffers 의 FrameGraph 노드를 사용하면 특정 렌더 타겟 버퍼를 특정 값으로 초기화할 수 있습니다.
[deprecated] class Qt3DRender::QClipPlane
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
기본적으로 OpenGL은 최대 8개의 추가 클리핑 평면을 지원합니다. Qt3DCore::QClipPlane을 사용하면 이러한 추가 평면 중 하나를 활성화할 수 있습니다. 그런 다음 셰이더에서 gl_ClipDistance[i]를 사용하여 이 평면들을 조작할 수 있으며, 여기서 i는 0에서 7 사이의 값을 가집니다. 기본 구현에서는 8개 이상의 클리핑 평면을 지원할 수도 있지만, 이는 보장되지 않습니다.
[deprecated] class Qt3DRender::QColorMask
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
기본적으로 각 색상 구성 요소(빨강, 녹색, 파랑, 알파)의 속성은 ` true `로 설정되어 있으며, 이는 해당 구성 요소가 프레임 버퍼에 기록된다는 것을 의미합니다. 색상 구성 요소 중 하나를 ` false `로 설정하면 해당 구성 요소가 프레임 버퍼에 기록되지 않습니다.
[deprecated] class Qt3DRender::QComputeCommand
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QComputeCommand 는 컴퓨트 셰이더에 작업을 전달하는 데 사용됩니다. 컴퓨트 셰이더는 QComputeCommand가 추가된 동일한 엔티티의 QMaterial 컴포넌트에서 지정됩니다. workGroupX, workGroupY 및 workGroupZ 속성은 컴퓨트 셰이더 호출 시의 워크그룹 크기를 지정합니다. 명령을 실제로 실행하려면 FrameGraph에 Qt3DRender::QDispatchCompute 노드가 존재해야 합니다.
참고: 렌더링 정책이 ‘ Qt3DRender::QRenderSettings::OnDemand ’로 설정되어 있고 씬에 변경 사항이 없는경우 , ‘ ComputeCommand ’는 반복적으로 호출되지 않습니다. 씬에 새로운 프레임 렌더링을 유발하는 다른 변경 사항이 없는 상황에서 ‘ ComputeCommand ’를 반복적으로 호출하려면 ‘ Qt3DRender::QRenderSettings::Always ’ 렌더링 정책을 설정해야 합니다.
[deprecated] class Qt3DRender::QCullFace
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QCullFace는 전면 또는 후면 면을 컬링할지 여부를 설정합니다. 면에는 삼각형, 사각형, 다각형 및 직사각형이 포함됩니다.
QRenderPass 의 addRenderState() 메서드를 호출하여 추가할 수 있습니다:
// using namespace Qt3DRender;
QRenderPass *renderPass = new QRenderPass();
// Create a front face culling render state
QCullFace *cullFront = new QCullFace();
cullFront->setMode(QCullFace::Front);
// Add the render state to the render pass
renderPass->addRenderState(cullFront);또는 ` QRenderStateSet` 객체에서 `addRenderState()` 메서드를 호출하여 추가할 수 있습니다:
// using namespace Qt3DRender;
QRenderStateSet *renderStateSet = new QRenderStateSet();
// Create a front face culling render state
QCullFace *cullFront = new QCullFace();
cullFront->setMode(QCullFace::Front);
// Add the render state to the render pass
renderStateSet->addRenderState(cullFront);QFrontFace도 참조하십시오 .
[deprecated] class Qt3DRender::QDebugOverlay
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
사용자 정의 프레임그래프의 한 분기에 QDebugOverlay를 배치하면, 씬과 함께 씬 세부 정보가 포함된 오버레이가 렌더링됩니다.
표준 QForwardRenderer에는 QForwardRenderer::showDebugOverlay 속성을 통해 활성화할 수 있는 QDebugOverlay 노드가 포함되어 있습니다.
[deprecated] class Qt3DRender::QDepthRange
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않을 것을 강력히 권장합니다.
기본적으로 OpenGL은 씬의 깊이 정보를 [0.0, 1.0] 범위로 깊이 버퍼에 기록하며, 0.0은 근거리 클립 평면에, 1.0은 원거리 클립 평면에 해당합니다. QDepthRange를 사용하면 이러한 값을 다른 범위로 매핑하여, 씬의 일부가 항상 다른 부분보다 앞이나 뒤에 렌더링되도록 할 수 있습니다. near 및 far에 대한 유효한 값은 0과 1 사이입니다.
[deprecated] class Qt3DRender::QDepthTest
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QDepthTest 클래스는 주어진 깊이 테스트 함수를 사용하여 깊이 테스트를 활성화하는 데 사용됩니다. 깊이 테스트는 테스트를 통과한 프래그먼트의 색상 값을 기록하고, 테스트에 실패한 프래그먼트는 거부합니다. 깊이 테스트는 깊이 함수를 사용하여 프래그먼트의 깊이 값을 z-버퍼의 값과 비교하여 테스트합니다. 기본 표면에 z-버퍼가 없는 경우, QDepthTest는 아무 작업도 수행하지 않습니다.
QAlphaTest 및 QStencilTest도 참조하십시오 .
[deprecated] class Qt3DRender::QDirectionalLight
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않도록 강력히 권장합니다.
방향성 조명은 햇빛과 유사한 방식으로 작동하는 광원입니다. 방향성 조명에서 나오는 빛은 씬 내의 위치와 상관없이 모든 오브젝트에 동일한 방향과 강도로 비춥니다.
[deprecated] class Qt3DRender::QDispatchCompute
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
Qt3DRender::QDispatchCompute 는 컴퓨트 셰이더가 GPU에서 실행되도록 작업을 발행할 수 있게 해줍니다. workGroupX, workGroupY 및 workGroupZ 속성은 컴퓨트 셰이더 호출에 대한 워크그룹 크기를 지정합니다. QComputeCommand 컴포넌트를 엔티티에 추가해야만 Qt3D가 컴퓨트 호출을 위해 해당 엔티티의 머티리얼과 지오메트리를 선택하도록 지시할 수 있습니다. 셰이더 호출에 사용되는 워크그룹 크기는 QDispatchCompute 및 QComputeCommand 에 지정된 워크그룹 크기 중 최대값이 됩니다.
[deprecated] class Qt3DRender::QDithering
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QDithering 클래스는 디더링을 활성화합니다. 디더링은 색상 값에 노이즈를 추가하여 양자화 오류를 무작위화하고, 이로 인해 최종 이미지에서 밴딩과 같은 대규모 패턴이 발생하는 것을 방지합니다. 디더링은 RGB565나 RGBA4444와 같이 색상 비트 심도가 낮은 표면으로 렌더링할 때 가장 유용합니다.
[deprecated] class Qt3DRender::QEffect
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QEffect 클래스는 머티리얼의 렌더링 효과를 생성하기 위해 사용되는 일련의 기법과 해당 기법에서 사용하는 매개변수들을 통합합니다.
가능한 경우, 하나의 QEffect 인스턴스를 여러 개의 QMaterial 인스턴스에서 공유해야 합니다.
참고: QEffect 노드는 비활성화할 수 없습니다.
QEffect *effect = new QEffect();
// Create technique, render pass and shader
QTechnique *gl3Technique = new QTechnique();
QRenderPass *gl3Pass = new QRenderPass();
QShaderProgram *glShader = new QShaderProgram();
// Set the shader on the render pass
gl3Pass->setShaderProgram(glShader);
// Add the pass to the technique
gl3Technique->addRenderPass(gl3Pass);
// Set the targeted GL version for the technique
gl3Technique->graphicsApiFilter()->setApi(QGraphicsApiFilter::OpenGL);
gl3Technique->graphicsApiFilter()->setMajorVersion(3);
gl3Technique->graphicsApiFilter()->setMinorVersion(1);
gl3Technique->graphicsApiFilter()->setProfile(QGraphicsApiFilter::CoreProfile);
// Add the technique to the effect
effect->addTechnique(gl3Technique);QEffect에 정의된 QParameter 는 QTechnique 및 QRenderPass 에 정의된 (동일한 이름의) 매개변수를 재정의하지만, QRenderPassFilter, QTechniqueFilter 및 QMaterial 에 정의된 매개변수에 의해 재정의됩니다.
QMaterial, QTechnique 및 QParameter도 참조하십시오 .
[deprecated] class Qt3DRender::QEnvironmentLight
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QEnvironmentLight는 큐브맵을 사용하여 이미지 기반 조명(IBL)을 구현하며, 이 기술은 물리 기반 렌더링(PBR)과 함께 자주 사용됩니다. 큐브맵은 일반적으로 고동적 범위(HDR) 이미지를 기반으로 하며, 확장된 값 범위를 처리할 수 있는 적절한 OpenGL 형식(예: RGBA16F)을 사용해야 합니다.
QEnvironmentLight에 필요한 큐브맵을 생성하는 데 사용할 수 있는 다양한 도구가 있습니다. 몇 가지 예는 다음과 같습니다.
HDRI Haven은 위 도구들의 소스 자료로 사용할 수 있는 CC0 라이선스의 HDR 이미지를 다수 제공합니다.
[deprecated] class Qt3DRender::QFilterKey
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
필터 키는 QTechnique 및 QRenderPass 에서 테크닉이나 렌더 패스가 렌더링의 어느 단계에서 사용될지를 지정하는 데 사용됩니다.
참고: QFilterKey 노드는 비활성화할 수 없습니다.
[deprecated] class Qt3DRender::QFrameGraphNode
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
이 클래스는 프레임 그래프에 특화된 동작을 제공하지 않기 때문에 직접 인스턴스화되는 경우는 거의 없지만, 동적 프레임 그래프에서 다른 노드들을 그룹화하는 데는 유용하게 사용할 수 있습니다. 실제 동작은 하위 클래스에서 비롯됩니다.
서브클래스는 다음과 같습니다:
| class | 설명 |
|---|---|
| Qt3DRender::QCameraSelector | 씬에 있는 사용 가능한 모든 카메라 중에서 카메라를 선택합니다 |
| Qt3DRender::QClearBuffers | 지울 버퍼와 해당 버퍼의 초기화 값을 지정합니다 |
| Qt3DRender::QDispatchCompute | 컴퓨트 연산 커널을 지정합니다 |
| Qt3DRender::QFrustumCulling | 프러스텀 컬링 활성화 |
| Qt3DRender::QLayerFilter | 그릴 레이어를 선택합니다 |
| Qt3DRender::QNoDraw | 렌더링 비활성화 |
| Qt3DRender::QRenderPassFilter | 렌더링할 패스를 선택합니다 |
| Qt3DRender::QRenderStateSet | 렌더링 상태 설정 |
| Qt3DRender::QRenderSurfaceSelector | 그릴 표면 선택 |
| Qt3DRender::QRenderTargetSelector | QRenderTarget 중 그릴 대상 선택 |
| Qt3DRender::QSortPolicy | 렌더링 순서를 결정하기 위해 엔티티의 정렬 방식 지정 |
| Qt3DRender::QTechniqueFilter | 그릴 기법을 선택하십시오 |
| Qt3DRender::QViewport | 뷰포트 지정 |
| Qt3DRender::QMemoryBarrier | 메모리 배리어를 배치합니다 |
[deprecated] class Qt3DRender::QFrontFace
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QFrontFace 는 정면을 향한 다각형의 감김 방향을 설정합니다.
QCullFace도 참조하십시오 .
[deprecated] class Qt3DRender::QFrustumCulling
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않도록 강력히 권장합니다.
QFrustumCulling 클래스는 카메라 시야와 엔티티의 QGeometry 경계를 기반으로 드로어블 엔티티의 프러스텀 컬링을 가능하게 합니다. FrameGraph에 QFrustumCulling이 존재하는 경우, QGeometry 경계가 카메라 프러스텀(즉, 카메라의 시야)과 교차하는 엔티티만 렌더링됩니다. QFrustumCulling이 존재하지 않으면, 모든 렌더링 가능한 엔티티가 그려집니다. 카메라는 현재 계층 구조 내의 ` QCameraSelector ` 프레임 그래프 노드를 통해 선택됩니다. 프러스텀 컬링은 렌더링되는 장면이 복잡할 때 GPU 처리 시간을 크게 절약할 수 있습니다.
QCameraSelector도 참조하십시오 .
[deprecated] class Qt3DRender::QGeometryRenderer
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QGeometryRenderer 는 Qt3DCore::QGeometry 를 그리는 데 필요한 모든 정보를 포함합니다. QGeometry는 기하학 데이터의 좌표를 포함하며, QGeometryRenderer는 해당 데이터를 해석하는 방법을 지정합니다.
[deprecated] class Qt3DRender::QGraphicsApiFilter
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QLayer
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QLayer FrameGraph 내의 Qt3DRender::QLayerFilter 와 연동하여 작동합니다.
QLayer는 recursive 속성을 true로 설정하여 엔티티의 하위 트리에 적용할 수 있습니다.
#include <Qt3DCore/QEntity>
#include <Qt3DRender/QGeometryRenderer>
#include <Qt3DRender/QLayer>
#include <Qt3DRender/QLayerFilter>
#include <Qt3DRender/QViewport>
// Scene
Qt3DCore::QEntity *rootEntity = new Qt3DCore::Qt3DCore::QEntity;
Qt3DCore::QEntity *renderableEntity = new Qt3DCore::Qt3DCore::QEntity(rootEntity);
Qt3DRender::QGeometryRenderer *geometryRenderer = new Qt3DCore::QGeometryRenderer(renderableEntity);
Qt3DRender::QLayer *layer1 = new Qt3DCore::QLayer(renderableEntity);
layer1->setRecursive(true);
renderableEntity->addComponent(geometryRenderer);
renderableEntity->addComponent(layer1);
...
// FrameGraph
Qt3DRender::QViewport *viewport = new Qt3DRender::QViewport;
Qt3DRender::QLayerFilter *layerFilter = new Qt3DRender::QLayerFilter(viewport);
layerFilter->addLayer(layer1);
...Qt3DRender::QLayerFilter도 참조하십시오 .
[deprecated] class Qt3DRender::QLayerFilter
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QLayerFilter 는 프레임 그래프의 해당 분기에서 어떤 레이어를 그릴지 렌더러에 지시하는 데 사용할 수 있습니다. QLayerFilter는 QLayerFilter에 추가된 QLayer 인스턴스와 Qt3DCore::QEntity 의 컴포넌트를 기반으로 그릴 엔티티를 선택합니다.
QLayerFilter는 filterMode 속성에 따라 특정 QLayer 를 가진 엔티티를 선택하거나 제외하도록 구성할 수 있습니다. 기본적으로, QLayerFilter 에서도 참조되고 있는 QLayer 객체 중 하나를 참조하는 엔티티가 선택됩니다(AcceptAnyMatchingLayers).
FrameGraph 트리 내에서, 루트에서 리프까지 이어지는 한 가지 분기 내에 여러 개의 QLayerFilter 노드가 중첩될 수 있습니다. 이 경우 필터링은 먼저 선언된 첫 번째 ` QLayerFilter`에 지정된 필터링 방법을 사용하여 씬의 모든 엔티티에 대해 수행됩니다. 그런 다음 필터링된 엔티티 하위 집합은 선언된 두 번째 ` QLayerFilter `에 설정된 필터링 방법을 기반으로 다시 필터링됩니다. 이 과정은 해당 분기의 모든 ` QLayerFilter ` 노드가 처리될 때까지 반복됩니다.
[deprecated] class Qt3DRender::QLevelOfDetail
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QLevelOfDetail은 관찰자와의 거리나 화면상의 크기에 따라 엔티티의 표현을 제어하는 데 사용할 수 있습니다.
렌더링 성능을 향상시키기 위해, 매우 작은 오브젝트는 지오메트리나 텍스처에서 훨씬 적은 디테일로 렌더링될 수 있습니다.
이 컴포넌트는 카메라와의 거리 또는 화면 크기로 해석되는 임계값을 지정하여 제어됩니다.
시점이 변경되면, ` currentIndex ` 속성이 범위 배열 내의 해당 값을 반영하도록 변경됩니다.
그런 다음 currentIndex 속성을 사용하여, 예를 들어 엔티티를 활성화하거나 비활성화하거나, 머티리얼을 변경하는 등의 작업을 수행할 수 있습니다.
LevelOfDetail 컴포넌트는 여러 entities 간에 공유할 수 없습니다.
#include <Qt3DCore/QEntity>
#include <Qt3DRender/QGeometryRenderer>
#include <Qt3DRender/QLevelOfDetail>
// Scene
Qt3DCore::QEntity *rootEntity = new Qt3DCore::Qt3DCore::QEntity;
Qt3DCore::QEntity *renderableEntity = new Qt3DCore::QEntity(rootEntity);
Qt3DRender::QGeometryRenderer *geometryRenderer = new Qt3DCore::QGeometryRenderer(renderableEntity);
renderableEntity->addComponent(geometryRenderer);
Qt3DRender::QLevelOfDetail* lod = new Qt3Render::QLevelOfDetail(renderableEntity);
QList<qreal> thresholds = {20, 35, 50, 65};
lod->setThresholds(thresholds);
lod->setCamera(mainCamera);
renderableEntity->addComponent(lod);
// connect to QLevelOfDetail::currentIndexChanged to toggle rendering
...[deprecated] class Qt3DRender::QLevelOfDetailBoundingSphere
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QLevelOfDetailSwitch
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
이 컴포넌트는 엔티티에 할당됩니다. 엔티티가 카메라에 대한 거리가 변경되면, QLevelOfDetailSwitch는 Qt3DRender::QLevelOfDetailSwitch::currentIndex 인덱스와 일치하는 엔티티를 제외한 모든 자식 엔티티를 비활성화합니다.
[deprecated] class Qt3DRender::QLineWidth
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QMaterial
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QMaterial은 entity 의 렌더링 방식을 지정하는 방법을 제공합니다. 어떤 요소든 자체적인 QMaterial 하위 클래스를 정의할 수 있으므로, Material을 사용하여 시각적 요소를 설명할 수 있습니다. 예를 들어, 소리가 요소에서 반사되는 방식이나 표면의 온도 등이 있습니다.
QMaterial 자체로는 아무런 동작도 수행하지 않습니다. QMaterial은 QEffect 노드를 참조할 때 비로소 유용해집니다.
실제로는 하나의 QEffect 가 여러 QMaterial 컴포넌트에서 참조되는 경우가 흔합니다. 이를 통해 효과, 기법, 패스 및 셰이더를 한 번만 생성하면서도 QParameter 인스턴스를 추가하여 재질을 지정할 수 있습니다.
QMaterial에 정의된 QParameter 는 QEffect, QTechnique 및 QRenderPass 에 정의된 (동일한 이름의) 매개변수를 재정의하지만, QRenderPassFilter 및 QTechniqueFilter 에 정의된 매개변수에 의해 재정의됩니다.
QMaterial *material1 = new QMaterial();
QMaterial *material2 = new QMaterial();
// Create effect, technique, render pass and shader
QEffect *effect = new QEffect();
QTechnique *gl3Technique = new QTechnique();
QRenderPass *gl3Pass = new QRenderPass();
QShaderProgram *glShader = new QShaderProgram();
// Set the shader on the render pass
gl3Pass->setShaderProgram(glShader);
// Add the pass to the technique
gl3Technique->addRenderPass(gl3Pass);
// Set the targeted GL version for the technique
gl3Technique->graphicsApiFilter()->setApi(QGraphicsApiFilter::OpenGL);
gl3Technique->graphicsApiFilter()->setMajorVersion(3);
gl3Technique->graphicsApiFilter()->setMinorVersion(1);
gl3Technique->graphicsApiFilter()->setProfile(QGraphicsApiFilter::CoreProfile);
// Add the technique to the effect
effect->addTechnique(gl3Technique);
// Set the effect on the materials
material1->setEffect(effect);
material2->setEffect(effect);
// Set different parameters on the materials
const QString parameterName = QStringLiteral("color");
material1->addParameter(new QParameter(parameterName, QColor::fromRgbF(0.0f, 1.0f, 0.0f, 1.0f)));
material2->addParameter(new QParameter(parameterName, QColor::fromRgbF(1.0f, 1.0f, 1.0f, 1.0f)));QEffect, QTechnique, QParameter도 참조하십시오 .
[deprecated] class Qt3DRender::QMemoryBarrier
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QMemoryBarrier 의 FrameGraph 노드는 렌더링의 특정 시점에 특정 메모리 배리어를 삽입하는 데 사용됩니다. 이는 GPU에서 드로잉 명령과 컴퓨트 명령을 올바르게 동기화하기 위해 필요합니다.
이 배리어는 이전 명령이 발행한 메모리 작업의 순서를 정의합니다. 즉, 명령 1이 후속 명령 2에서 정점 속성 버퍼로 사용될 버퍼를 조작하는 경우, 메모리 배리어는 명령 1 뒤에 배치되어야 하며 정점 속성 버퍼에 적합한 배리어 유형을 설정해야 합니다.
FrameGraph 분기에서 QMemoryBarrier 노드가 발견되면, 해당 분기의 더 깊은 수준에 드로잉 또는 컴퓨트 명령이 정의되어 있더라도 이 배리어는 해당 명령들보다 먼저 적용됩니다.
OpenGL 렌더링에 대해서는 이 페이지에서 메모리 모델에 대한 자세한 정보를 확인할 수 있습니다.
[deprecated] class Qt3DRender::QMesh
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
다양한 형식의 외부 파일에서 메쉬 데이터를 불러옵니다. ` Qt3DRender::QMesh `는 데이터를 단일 메쉬로 불러옵니다.
Qt3D 5.9에서 QMesh는 다음 형식을 지원합니다:
- Wavefront OBJ
- 스탠포드 삼각형 형식(Stanford Triangle Format) PLY
- STL (STereoLithography)
또한 SDK가 설치되어 있고 fbx 지오메트리 로더 플러그인이 빌드되어 발견될 경우, QMesh는 다음 형식도 지원합니다:
- Autodesk FBX
여러 오브젝트로 구성된 전체 씬을 불러오려면, 대신 Qt3DRender::QSceneLoader 를 사용하는 것이 좋습니다.
Qt3DRender::QSceneLoader도 참조하십시오 .
[deprecated] class Qt3DRender::QMultiSampleAntiAliasing
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
Qt3DRender::QMultiSampleAntiAliasing 클래스는 멀티샘플 앤티앨리어싱을 지원합니다.
QRenderPass::addRenderState()을 호출하여 QRenderPass 에 추가할 수 있습니다:
QRenderPass *renderPass = new QRenderPass();
QMultiSampleAntiAliasing *msaa = new QMultiSampleAntiAliasing();
renderPass->addRenderState(msaa);또는 ` QRenderStateSet::addRenderState()`를 호출하여 ` QRenderStateSet `에 적용할 수 있습니다:
QRenderStateSet *renderStateSet = new QRenderStateSet();
QMultiSampleAntiAliasing *msaa = new QMultiSampleAntiAliasing();
renderStateSet->addRenderState(msaa);멀티샘플링이 적용되려면 렌더 타깃이 멀티샘플링이 활성화된 상태로 할당되어야 합니다:
QTexture2DMultisample *colorTex = new QTexture2DMultisample;
colorTex->setFormat(QAbstractTexture::RGBA8_UNorm);
colorTex->setWidth(1024);
colorTex->setHeight(1024);
QRenderTargetOutput *color = new QRenderTargetOutput;
color->setAttachmentPoint(QRenderTargetOutput::Color0);
color->setTexture(colorTex);
QTexture2DMultisample *depthStencilTex = new QTexture2DMultisample;
depthStencilTex->setFormat(QAbstractTexture::RGBA8_UNorm);
depthStencilTex->setWidth(1024);
depthStencilTex->setHeight(1024);
QRenderTargetOutput *depthStencil = new QRenderTargetOutput;
depthStencil->setAttachmentPoint(QRenderTargetOutput::DepthStencil);
depthStencil->setTexture(depthStencilTex);
Qt3DRender::QRenderTarget *renderTarget = new Qt3DRender::QRenderTarget;
renderTarget->addOutput(color);
renderTarget->addOutput(depthStencil);또한, 셰이더 코드에서는 텍스처() 대신 멀티샘플링 샘플러 유형과 texelFetch()를 사용해야 합니다.
예를 들어, 다음과 같은 코드가 있다면
#version 150
uniform sampler2D colorTexture;
in vec2 texCoord;
out vec4 fragColor;
void main()
{
fragColor = texture(colorTexture, texCoord);
}다음과 같이 재작성할 수 있습니다.
#version 150
uniform sampler2DMS colorTexture;
in vec2 texCoord;
out vec4 fragColor;
void main()
{
ivec2 tc = ivec2(floor(textureSize(colorTexture) * texCoord));
vec4 c = texelFetch(colorTexture, tc, 0) +
texelFetch(colorTexture, tc, 1) +
texelFetch(colorTexture, tc, 2) +
texelFetch(colorTexture, tc, 3);
fragColor = c / 4.0;
}참고: OpenGL을 그래픽 API로 사용할경우 , 렌더링 상태에 QMultiSampleAntiAliasing이 추가되어 있으면 glEnable(GL_MULTISAMPLE)이 호출됩니다.
[deprecated] class Qt3DRender::QNoDepthMask
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QNoDepthMask 클래스는 딥스 버퍼에 대한 프래그먼트 딥스 쓰기 기능을 비활성화합니다.
Qt3DRender::QDepthTest도 참조하십시오 .
[deprecated] class Qt3DRender::QNoDraw
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QNoDraw FrameGraph가 메쉬를 그리지 않고도 일부 렌더링 상태를 설정하거나 버퍼를 지워야 할 때 사용해야 합니다. 이는 씬에 사용 가능한 Qt3DRender::QRenderPass 인스턴스 중 어느 것과도 일치하지 않는 Qt3DRender::QRenderPassFilter 를 설정하는 것과 동일한 효과를 가지지만, 실제로 필터링을 수행하는 데 따르는 오버헤드 비용은 발생하지 않습니다.
비활성화된 상태에서는 ` Qt3DRender::QNoDraw ` 노드가 씬의 렌더링을 차단하지 않습니다. 따라서 `enabled` 속성을 토글하는 것은 ` Qt3DRender::QNoDraw `를 활성화하거나 비활성화하는 방법입니다.
Qt3DRender::QNoDraw 이 노드는 일반적으로 Qt3DRender::QClearBuffers 노드의 자식 노드로 사용되어, 여러 번의 렌더링 패스가 있을 때 장면이 그려지는 것을 방지합니다.
Qt3DRender::QViewport *viewport = new Qt3DRender::QViewport();
Qt3DRender::QCameraSelector *cameraSelector = new Qt3DRender::QCameraSelector(viewport);
Qt3DRender::QClearBuffers *clearBuffers = new Qt3DRender::QClearBuffers(cameraSelector);
clearBuffers->setBuffers(Qt3DRender::QClearBuffers::ColorDepthBuffer);
Qt3DRender::QNoDraw *noDraw = new Qt3DRender::QNoDraw(clearBuffers);
Qt3DRender::QRenderPassFilter *mainPass = new Qt3DRender::QRenderPassFilter(cameraSelector);
....
Qt3DRender::QRenderPassFilter *previewPass = new Qt3DRender::QRenderPassFilter(cameraSelector);
....[deprecated] class Qt3DRender::QNoPicking
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
비활성화되면 ` Qt3DRender::QNoPicking ` 노드는 픽킹이 수행되는 것을 막지 않습니다. 따라서 `enabled` 속성을 토글하는 것은 ` Qt3DRender::QNoPicking `을 활성화하거나 비활성화하는 방법입니다.
FrameGraph에서 여러 개의 하위 뷰포트를 사용할 때, QNoPicking은 겹치는 뷰포트나 비가시적인 뷰포트 간의 피킹 충돌을 방지하는 데 유용할 수 있습니다. 또한 숨겨진 뷰포트나 피킹이 필요 없는 장면의 일부에 대해 불필요한 작업을 방지하는 최적화 수단으로도 사용할 수 있습니다.
Qt3DRender::QViewport *viewport = new Qt3DRender::QViewport();
Qt3DRender::QCameraSelector *cameraSelector = new Qt3DRender::QCameraSelector(viewport);
Qt3DRender::QNoPicking *noPicking = new Qt3DRender::QNoPicking(cameraSelector);
Qt3DRender::QClearBuffers *clearBuffers = new Qt3DRender::QClearBuffers(noPicking);
clearBuffers->setBuffers(Qt3DRender::QClearBuffers::ColorDepthBuffer);
Qt3DRender::QRenderPassFilter *mainPass = new Qt3DRender::QRenderPassFilter(cameraSelector);
....
Qt3DRender::QRenderPassFilter *previewPass = new Qt3DRender::QRenderPassFilter(cameraSelector);
....Qt3DRender::QObjectPicker, Qt3DRender::QRayCaster, Qt3DRender::QScreenRayCaster항목도 참조하십시오 .
[deprecated] class Qt3DRender::QObjectPicker
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
뷰포트와 카메라의 모든 조합에 대해, 'picking'은 씬을 가로질러 광선을 투사하여 그 광선과 바운딩 볼륨이 교차하는 엔티티를 찾습니다. 바운딩 볼륨은 지오메트리의 `boundingVolumePositionAttribute`에 지정된 속성 버퍼의 값을 사용하여 계산됩니다.
pickAttribute 속성으로 정의된 바운딩 볼륨이 레이와 교차할 때, pressed(), released(), clicked(), moved(), entered() 및 exited() 신호가 발생합니다.
대부분의 신호는 ` QPickEvent ` 인스턴스를 전달합니다. `QPickingSettings::pickMode()`가 ` QPickingSettings::TrianglePicking`로 설정된 경우, pick 매개변수의 실제 유형은 ` QPickTriangleEvent`가 됩니다.
픽 쿼리는 마우스 클릭 및 마우스 릴리스 시 수행됩니다. 드래그가 활성화된 경우, 버튼을 누른 상태에서 마우스를 움직일 때마다 쿼리가 발생합니다. 호버가 활성화된 경우, 버튼을 누르지 않은 상태에서도 마우스를 움직일 때마다 쿼리가 발생합니다.
일반화된 레이 캐스팅 쿼리에 대해서는 Qt3DRender::QRayCaster 및 Qt3DRender::QScreenRayCaster 을 참조하십시오.
참고: 이 컴포넌트의인스턴스는 공유해서는 안 됩니다. 이 조건을 준수하지 않을 경우 정의되지 않은 동작이 발생할 가능성이 높습니다.
참고: 카메라 원거리 평면값은 피킹에 영향을 미치며, 이 값이 ~100,000보다 클 경우 부동 소수점 정밀도 문제로 인해 잘못된 결과가 발생할 수 있습니다.
또한 Qt3DRender::QPickingSettings, Qt3DCore::QGeometry, Qt3DCore::QAttribute, Qt3DRender::QPickEvent, Qt3DRender::QPickTriangleEvent 및 Qt3DRender::QNoPicking 을참조하십시오 .
[deprecated] class Qt3DRender::QPaintedTextureImage
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QPaintedTextureImage는 QPainter 를 통해 텍스처 이미지(즉, OpenGL 텍스처)를 지정하는 방법을 제공합니다. 텍스처 이미지의 너비와 높이는 width, height 또는 size 속성을 통해 지정할 수 있습니다.
QPaintedTextureImage는 반드시 서브클래스로 상속되어야 하며, 가상 함수 ` paint()`를 구현해야 합니다. QPaintedTextureImage에서 ` update()`가 호출될 때마다 ` paint()` 함수가 호출되고, 그 결과 이미지가 업로드됩니다.
QPaintedTextureImage는 반드시 어떤 QAbstractTexture 에 연결되어 있어야 합니다.
[deprecated] class Qt3DRender::QParameter
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QParameter는 QRenderPass, QTechnique, QEffect, QMaterial, QTechniqueFilter, QRenderPassFilter 를 통해 참조할 수 있습니다. 런타임 시, 렌더링의 특정 단계에 대해 선택된 셰이더에 따라, 해당 셰이더에 QParameter의 이름과 일치하는 유니폼이 포함되어 있다면 QParameter에 포함된 값이 변환되어 업로드됩니다.
QParameter *param = new QParameter();
param->setName(QStringLiteral("diffuseColor"));
param->setValue(QColor::fromRgbF(0.0f, 0.0f, 1.0f, 1.0f));
// Alternatively you can create and set a QParameter this way
QParameter *param2 = new QParameter(QStringLiteral("diffuseColor"), QColor::fromRgbF(0.0f, 0.0f, 1.0f, 1.0f));
// Such QParameters will work with the following GLSL uniform shader declarations
// uniform vec4 diffuseColor;
// uniform vec3 diffuseColor;
// uniform vec2 diffuseColor;
// uniform float diffuseColor;참고: QParameter로 감싸진 값이 실제 유니폼이 기대하는 형식으로 실제로 변환될 수 있는지 확인하기 위해주의가 필요합니다. 실제 셰이더 유니폼의 형식이 float인 경우 int로 저장된 값을 전달하면 정의되지 않은 동작이 발생할 수 있습니다.
참고: 대상 유니폼이 배열인경우 , 이름은 유니폼 이름 뒤에 [0]을 추가한 형태여야 합니다.
참고: QParameter 노드는 비활성화할 수 없습니다.
QParameter *param = new QParameter();
QVariantList values = QVariantList() << 0.0f << 1.0f << 2.0f << 3.0f << 4.0f << 883.0f << 1340.0f << 1584.0f;
param->setName(QStringLiteral("diffuseValues[0]"));
param->setValue(values);
// Matching GLSL shader uniform declaration
// uniform float diffuseValues[8];텍스처 지원과 관련하여, QParameter 값은 셰이더 유니폼의 샘플러 유형과 일치하는 적절한 QAbstractTexture 하위 클래스로 설정되어야 합니다.
QTexture2D *texture = new QTexture2D();
...
QParameter *param = new QParameter();
param->setName(QStringLiteral("diffuseTexture"));
param->setValue(QVariant::fromValue(texture));
// Works with the following GLSL uniform shader declaration
// uniform sampler2D diffuseTextureQAbstractTexture도 참조하십시오 .
[deprecated] class Qt3DRender::QPickEvent
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
픽킹이 성공할 경우, 대부분의 QObjectPicker 컴포넌트 시그널에서 이 값을 매개변수로 수신합니다.
QPickingSettings, QPickTriangleEvent 및 QObjectPicker도 참조하십시오 .
[deprecated] class Qt3DRender::QPickLineEvent
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
QPickEvent도 참조하십시오 .
[deprecated] class Qt3DRender::QPickPointEvent
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QPickEvent도 참조하십시오 .
[deprecated] class Qt3DRender::QPickTriangleEvent
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QPickingSettings::pickMode()가 ` QPickingSettings::TrianglePicking`로 설정되면, ` QObjectPicker `의 시그널은 QPickTriangleEvent 인스턴스를 전달합니다.
여기에는 선택된 삼각형의 세부 정보가 포함됩니다.
참고: 인덱스 기반 렌더링의경우 , 점 인덱스는 인덱스 배열이 아닌 좌표 배열을 기준으로 합니다.
QPickingSettings, QPickEvent 및 QObjectPicker도 참조하십시오 .
[since 6.0, deprecated] class Qt3DRender::QPickingProxy
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않을 것을 강력히 권장합니다.
피킹 작업은 특히 메시의 정점 수가 많은 경우 계산 비용이 많이 드는 작업일 수 있습니다. QPickProxy를 사용하면 피킹에 사용될 대체 지오메트리(일반적으로 프리미티브 수가 더 적은)를 제공할 수 있으며, 렌더링에는 GeometryRenderer 인스턴스가 사용됩니다.
참고: 애플리케이션에서 피킹 좌표가 렌더링된 메시와 일치해야 하는 경우에는 QPickingProxy를 사용하지마십시오 .
참고: 피킹알고리즘은 바운딩 볼륨 계층 구조를 사용하여, 바운딩 볼륨이 피킹 광선과 교차하지 않는 엔티티를 최적화하여 제외합니다. 이 계층 구조에서는 프록시의 바운딩 볼륨 대신 렌더링된 엔티티의 바운딩 볼륨(또는 QBoundingVolume 컴포넌트를 사용하여 명시적으로 설정된 바운딩 볼륨)이 사용됩니다.
이 클래스는 Qt 6.0에서 도입되었습니다.
[deprecated] class Qt3DRender::QPickingSettings
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
피킹 설정은 엔티티 피킹이 어떻게 처리될지를 결정합니다. 엔티티 피킹에 대한 자세한 내용은 QObjectPicker 및 QRayCaster 컴포넌트 문서를 참조하십시오.
QObjectPicker 컴포넌트를 사용할 경우, 피킹은 마우스 이벤트에 의해 트리거됩니다.
QRayCaster 또는 QScreenRayCaster 컴포넌트를 사용할 때는 애플리케이션에서 피킹을 명시적으로 트리거할 수 있습니다.
두 경우 모두, 빔을 통해 씬을 스캔하여 빔과 교차하는 지오메트리를 찾습니다.
QObjectPicker, QPickEvent, QPickTriangleEvent, QRayCaster 및 QScreenRayCaster도 참조하십시오 .
[deprecated] class Qt3DRender::QPointLight
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
점광원은 단일 지점에서 모든 방향으로 빛을 방출하는 광원입니다. 개념적으로 이는 일반적인 전구가 발산하는 빛과 유사합니다.
포인트 라이트는 거리에 따라 빛의 강도가 어떻게 감소하는지를 설명하기 위해 세 가지 감쇠 계수를 사용합니다. 이 계수들은 총 감쇠량을 계산할 때 함께 사용되도록 설계되었습니다. Qt3D Extras의 머티리얼에서는 다음 공식이 사용되며, 여기서 '거리'는 광원과 렌더링되는 표면 사이의 거리를 의미합니다:
totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));사용자 정의 재질의 경우, 이러한 계수를 다르게 해석할 수도 있습니다.
[deprecated] class Qt3DRender::QPointSize
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
sizeMode 속성이 SizeMode::Fixed 로 설정된 경우, 가능한 경우 glPointSize()를 사용하여 값이 설정됩니다. SizeMode::Programmable 를 사용할 때는 셰이더 프로그램 내에서 gl_PointSize를 설정해야 하며, 이 경우 RenderState 에 제공된 값은 무시됩니다.
[deprecated] class Qt3DRender::QPolygonOffset
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않을 것을 강력히 권장합니다.
QPolygonOffset 클래스는 깊이 테스트 및 깊이 기록 전에 프래그먼트 깊이 값에 오프셋을 추가합니다. 이 오프셋은 데칼과 같이 깊이 값이 매우 근접한 폴리곤을 렌더링할 때 z-fighting을 방지하는 데 사용할 수 있습니다.
[deprecated] class Qt3DRender::QProximityFilter
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QProximityFilter 는 다른 엔티티로부터 주어진 거리 임계값 이내에 위치한 엔티티를 렌더링 대상으로 선택하는 데 사용할 수 있습니다.
[deprecated] class Qt3DRender::QRasterMode
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QRasterMode 클래스는 렌더링 시 프라이미티브의 래스터화 단계를 제어하는 데 사용됩니다. 이를 통해 점만 표시할지, 에지만 표시할지, 아니면 프라이미티브를 채울지 선택할 수 있습니다.
참고: OpenGL ES 2.0 플랫폼에서 렌더링할 때는이 기능이 지원되지 않습니다.
QAlphaTest 및 QStencilTest도 참조하십시오 .
[deprecated] class Qt3DRender::QRayCaster
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
3D 레이는 원점, 방향 및 길이로 정의됩니다. 이 레이는 소속된 엔티티에 적용된 변환의 영향을 받습니다.
레이 캐스팅 테스트는 컴포넌트가 활성화된 상태인 한 매 프레임마다 수행됩니다. hits 속성은 교차 지점 목록으로 업데이트됩니다.
QAbstractRayCaster, QScreenRayCaster 및 QNoPicking도 참조하십시오 .
[deprecated] class Qt3DRender::QRayCasterHit
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QRayCasterHit Qt3DRender::QRayCaster 또는 컴포넌트를 사용하여 모델을 통과하는 광선을 투사했을 때 성공적인 충돌에 대한 세부 정보를 포함합니다. Qt3DRender::QScreenRayCaster
Qt3DRender::QRayCaster, Qt3DRender::QScreenRayCaster 및 Qt3DRender::QPickingSettings도 참조하십시오 .
[deprecated] class Qt3DRender::QRenderAspect
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QRenderCapabilities
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QRenderCapabilities는 런타임 시 사용 가능한 그래픽 기능에 대한 세부 정보를 제공합니다. 예를 들어, 컴퓨트 셰이더를 사용할 수 있는지 여부에 따라 특정 알고리즘에 어떤 코드 경로를 적용할지 결정하는 데 사용할 수 있습니다.
[deprecated] class Qt3DRender::QRenderCapture
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QRenderCapture는 모든 렌더링 단계에서 렌더링 결과를 이미지로 캡처하는 데 사용됩니다. 캡처는 사용자가 직접 시작해야 하며, 캡처 요청 하나당 하나의 이미지가 반환됩니다. 사용자는 여러 개의 렌더링 캡처 요청을 동시에 발행할 수 있지만, 프레임당 QRenderCapture 인스턴스 하나당 하나의 요청만 처리됩니다.
[deprecated] class Qt3DRender::QRenderCaptureReply
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
QRenderCapture::requestCapture 에서 이미지를 수신하는 객체입니다.
[deprecated] class Qt3DRender::QRenderPass
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QRenderPass 는 Qt3DRender::QTechnique 에서 사용하는 단일 렌더링 패스(셰이더 프로그램 실행의 한 인스턴스)를 지정합니다. 렌더 패스는 Qt3DRender::QShaderProgram 와 Qt3DRender::QFilterKey 객체 목록, Qt3DRender::QRenderState 객체 목록, Qt3DRender::QParameter 객체 목록으로 구성됩니다.
QRenderPass는 참조되는 QFilterKey 노드 중 적어도 하나가 QRenderPassFilter 내의 QFilterKey 노드 중 하나와 일치하거나, QFilterKey 노드가 지정되지 않았고 FrameGraph에 QRenderPassFilter 가 존재하지 않을 때, 주어진 QRenderState 및 QParameter 노드를 사용하여 QShaderProgram 를 실행합니다.
QRenderPass가 QParameter 를 정의한 경우, 런타임 시 해당 패스와 연관된 QTechnique, QEffect, QMaterial, QTechniqueFilter, QRenderPassFilter 중 어느 곳에든 동일한 이름의 QParameter 가 존재하면 이를 덮어씁니다. 이는 합리적인 기본값을 정의하는 데 여전히 유용할 수 있습니다.
렌더링 시, FrameGraph의 각 리프 노드에 대해 FrameGraph 분기 내의 모든 QRenderStateSet 노드에 의해 정의된 상태를 누적하여 기본 렌더링 상태가 기록됩니다. 각 QRenderPass는 자체 QRenderState 노드를 지정하여 이 기본 렌더링 상태를 재정의할 수 있습니다.
// Create the render passes
QRenderPass *pass = new QRenderPass();
// Create shader program
QShaderProgram *glShader = new QShaderProgram();
// Set the shader on the render pass
pass->setShaderProgram(glShader);
// Create a FilterKey
QFilterKey *filterKey = new QFilterKey();
filterKey->setName(QStringLiteral("name"));
fitlerKey->setValue(QStringLiteral("zFillPass"));
// Add the FilterKey to the pass
pass->addFilterKey(filterKey);
// Create a QParameter
QParameter *colorParameter = new QParameter(QStringLiteral("color"), QColor::fromRgbF(0.0f, 0.0f, 1.0f, 1.0f));
// Add parameter to pass
pass->addParameter(colorParameter);
// Create a QRenderState
QDepthTest *depthTest = new QDepthTest();
// Add the render state to the pass
pass->addRenderState(depthTest);QRenderPassFilter, QFilterKey, QParameter, QRenderState, QEffect 및 QTechnique도 참조하십시오 .
[deprecated] class Qt3DRender::QRenderPassFilter
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QRenderPassFilter 프레임그래프 노드는 렌더링 대상으로 선택될 Qt3DRender::QRenderPass 객체를 지정하는 데 사용됩니다. QRenderPassFilter는 Qt3DRender::QFilterKey 객체와 Qt3DRender::QParameter 객체의 목록을 지정합니다. 프레임그래프에 QRenderPassFilter가 존재할 경우, Qt3DRender::QFilterKey 객체가 QRenderPassFilter의 키와 일치하는 QRenderPass 객체만 렌더링 대상으로 선택됩니다. QRenderPassFilter가 없는 경우, 모든 QRenderPass 객체가 렌더링 대상으로 선택됩니다. 목록에 있는 매개변수는 셰이더 매개변치의 값을 설정하는 데 사용할 수 있습니다. QRenderPassFilter의 매개변치는 QTechniqueFilter, QMaterial, QEffect, QTechnique 및 QRenderPass 의 매개변치를 재정의합니다.
[deprecated] class Qt3DRender::QRenderSettings
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QRenderSettings 컴포넌트는 씬 루트 엔티티의 컴포넌트로 설정되어야 합니다. 이 컴포넌트는 렌더링 정책과 피킹 설정을 지정할 뿐만 아니라, 활성 FrameGraph를 호스팅합니다.
[deprecated] class Qt3DRender::QRenderState
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
Qt3DRender::QRenderState 클래스는 모든 렌더링 상태를 위한 추상 기본 클래스입니다. QRenderState는 직접 인스턴스화할 수 없으며, 하위 클래스를 통해 인스턴스화해야 합니다.
[deprecated] class Qt3DRender::QRenderStateSet
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QRenderPass 에 설정할 수 있는 재료별 상태와 달리, QRenderStateSet에 설정된 상태는 전역적으로 적용됩니다. 기본적으로 빈 QRenderStateSet을 사용하면 실행 시 모든 렌더링 상태가 비활성화됩니다. QRenderState 상태를 명시적으로 추가하면 런타임에 해당 렌더링 상태가 활성화됩니다.
RenderStateSet 는 활성 프레임 그래프에 추가되면 활성화됩니다:
// using namespace Qt3DRender;
Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity();
QRenderSettings *renderSettings = new QRenderSettings();
QViewport *viewport = new QViewport();
QCameraSelector *cameraSelector = new QCameraSelector(viewport);
QClearBuffers *clearBuffers = new QClearBuffers(cameraSelector);
clearBuffers->setBuffers(QClearBuffers::ColorDepthBuffer);
QRenderStateSet *renderStateSet = new QRenderStateSet(cameraSelector);
QCullFace *cullFace = new QCullFace(renderStateSet);
cullFace->setMode(QCullFace::Front);
renderStateSet->addRenderState(cullFace);
renderSettings->setActiveFrameGraph(viewport);
rootEntity->addComponent(renderSettings);QRenderState 및 QRenderPass항목도 참조하십시오 .
[deprecated] class Qt3DRender::QRenderSurfaceSelector
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QRenderSurfaceSelector 는 Qt3D가 콘텐츠를 렌더링할 표면을 선택하는 데 사용할 수 있습니다. 표면은 창 표면이거나 오프스크린 표면일 수 있습니다. externalRenderTargetSize 는 오프스크린 표면을 사용할 때 표면의 실제 크기를 지정하는 데 사용됩니다.
시스템에서 DPI 스케일링을 사용하는 경우, 마우스 이벤트에 사용되는 논리적 표면 크기와 표면의 실제 '물리적' 크기가 다를 수 있습니다. surfacePixelRatio 는 논리적 크기를 물리적 크기로 변환하는 계수입니다.
QWindow, QOffscreenSurface 및 QSurface항목도 참조하십시오 .
[deprecated] class Qt3DRender::QRenderTarget
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QRenderTarget 는 렌더 타겟이 렌더링할 버퍼를 지정하는 ` Qt3DRender::QRenderTargetOutput ` 객체들로 구성됩니다. 사용자는 서로 다른 어태치먼트 포인트에 여러 텍스처를 연결하여 MRT(Multiple Render Targets)를 지정할 수 있습니다. 사용자가 동일한 어태치먼트 포인트에 여러 텍스처를 연결하려고 시도할 경우 결과는 정의되지 않습니다. 렌더링 시에는 렌더 타겟( Qt3DRender::QRenderTargetSelector )에 지정된 드로우 버퍼만 사용됩니다.
[deprecated] class Qt3DRender::QRenderTargetOutput
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QRenderTargetOutput은 렌더 타깃에 부착되는 텍스처의 부착 지점과 매개변수를 지정합니다. 부착 지점 외에도 텍스처의 밉 레벨, 레이어 및 큐브맵 면을 지정할 수 있습니다. QRenderTargetOutput에 부착된 텍스처는 지정된 매개변수와 호환되어야 합니다.
참고: Left 및 Right 부착 지점은 특수한 값입니다. 이들은 스테레오 렌더링에 사용되는 백 버퍼 중 하나를 가리키는 렌더 타겟 객체를 의미하지 않습니다.
[deprecated] class Qt3DRender::QRenderTargetSelector
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QRenderTargetSelector 는 FrameGraph에 대한 활성 Qt3DRender::QRenderTarget 를 선택하는 데 사용됩니다. FrameGraph에 QRenderTargetSelector가 존재할 경우, 렌더링은 Qt3DRender::QRenderSurfaceSelector 에 지정된 표면 대신 QTexture 객체나 드로우 버퍼로 전달됩니다.
[deprecated] class Qt3DRender::QSceneLoader
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
3D 소스 파일이 주어지면, ` Qt3DRender::QSceneLoader `는 이를 파싱하여 적절한 ` Qt3DRender::QGeometryRenderer`, ` Qt3DCore::QTransform ` 및 ` Qt3DRender::QMaterial ` 구성 요소를 가진 ` Qt3DCore::QEntity ` 객체 트리를 구축하려고 시도합니다.
로더는 모델 파일의 속성을 기반으로 사용할 최적의 머티리얼을 결정하려고 시도합니다. 사용자 정의 머티리얼을 사용하려면 트리를 탐색하여 기본으로 연결된 머티리얼을 사용자 정의 머티리얼로 교체해야 합니다.
이름에서 알 수 있듯이, ` Qt3DRender::QSceneLoader `는 전체 장면 하위 트리를 로드합니다. 단일 지오메트리만 로드하려는 경우에는 대신 ` Qt3DRender::QMesh `를 사용해야 합니다.
Qt3DRender::QSceneLoader 내부적으로는 다양한 3D 파일 형식을 지원하기 위해 플러그인을 사용합니다. 다음은 Qt3D에서 지원하는 형식 목록입니다.
참고: 이 컴포넌트는 여러 Qt3DCore::QEntity 인스턴스 간에 공유해서는 안 됩니다. 정의되지 않은 동작이 발생할 수 있습니다.
Qt3DRender::QMesh 및 Qt3DRender::QGeometryRenderer도 참조하십시오 .
[deprecated] class Qt3DRender::QScissorTest
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QScissorTest 클래스는 left, bottom, width 및 height 속성으로 지정된 화면의 직사각형 영역 외부의 조각을 제거하는 '가위 테스트(scissor test)' 기능을 활성화합니다.
[deprecated] class Qt3DRender::QScreenRayCaster
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QScreenRayCaster를 사용하면 화면 좌표계의 좌표를 지정하여 레이 캐스팅 테스트를 수행할 수 있으며, 이 좌표는 근면과 원면 사이의 실제 3D 레이를 구성하는 데 사용됩니다.
QRayCaster 및 QNoPicking도 참조하십시오 .
[deprecated] class Qt3DRender::QSeamlessCubemap
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
상태 집합에 이 클래스가 포함되어 있으면, GL_ARB_seamless_cubemap 확장 기능(사용 가능한 경우)이 제공하는 매끄러운 큐브맵 텍스처 필터링을 활성화합니다.
[deprecated] class Qt3DRender::QSetFence
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
펜스(Fence)는 GPU와 CPU의 작업 부하를 동기화할 수 있게 해줍니다. GPU 명령어는 일반적으로 비차단 방식입니다. 명령어가 발행되면 명령어 버퍼에 삽입되며, 이 버퍼는 나중에 GPU에 의해 읽힙니다. 경우에 따라, 특정 명령어가 하드웨어에 의해 실행되었음을 확실히 확인한 후에만 처리를 계속하거나 특정 명령어를 발행하고 싶을 때가 있습니다. 펜스는 이를 구현하는 방법입니다. 이는 Qt3D와 타사 엔진을 함께 사용할 때 특히 중요합니다. Qt3D는 다른 엔진 명령이 해당 리소스에 대한 수정을 완료한 것이 확인된 경우에만 공유 리소스에 접근해야 합니다.
QSetFence는 명령 스트림에 펜스를 삽입하는 FrameGraph 노드입니다. 이 노드는 ` QWaitFence `와 함께 사용하거나, 기본 핸들을 추출하여 사용할 수 있습니다.
핸들 속성은 렌더러가 기본 펜스 리소스를 생성하면 업데이트됩니다. 핸들은 ‘unsignaled’ 상태에 있는 한 유효합니다. ‘signaled’ 상태에 도달하면 핸들은 소멸되고 새로운 핸들이 생성됩니다. 즉, 펜스가 신호(signaled) 상태가 되는 데 걸리는 시간에 따라 동일한 핸들이 여러 프레임에 걸쳐 사용될 수 있습니다.
[deprecated] class Qt3DRender::QShaderData
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
참고: QShaderData를 상속하여 서브클래스를 만들고 속성을 추가할때 , 내부 Qt3DRender::QShaderData 를 중첩해야 하는 경우 해당 속성의 데이터 유형은 서브클래스 이름이 아닌 ` Qt3DRender::QShaderData*`이어야 합니다.
[deprecated] class Qt3DRender::QShaderImage
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
셰이더 내에서 텍스처의 내용을 읽고 쓸 수 있도록 하려면, 해당 텍스처를 QShaderImage로 노출해야 합니다. 텍스처는 여러 미프 레벨, 레이어 및 페이스로 구성될 수 있습니다. 또한 QShaderImage를 선언하면 텍스처 콘텐츠 중 어떤 레벨, 레이어 또는 페이스에 접근할지 지정할 수 있습니다.
QShaderImage는 정상적으로 작동하기 위해 ` QParameter`의 값으로 할당되어야 하며, 유효한 ` Qt3DRender::QAbstractTexture `를 참조해야 합니다.
참조되는 텍스처가 1차원 배열, 2차원 배열, 3차원, 큐브 맵, 큐브 맵 배열 또는 2차원 멀티샘플 배열 텍스처인 경우, 텍스처 레벨 전체나 텍스처 레벨의 단일 레이어 또는 면을 바인딩할 수 있습니다. 이는 layered 속성을 통해 제어할 수 있습니다.
QShaderImage는 OpenGL 4에서만 지원되며, OpenGL ES 3.1 및 3.2에서는 부분적으로만 지원됩니다.
OpenGL 4는 다음 이미지 유형을 지원합니다:
| GLSL 유형 | OpenGL 유형 열거형 | 텍스처 유형 |
|---|---|---|
| image1D | GL_IMAGE_1D | QTexture1D |
| image2D | GL_IMAGE_2D | QTexture2D |
| image3D | GL_IMAGE_3D | QTexture3D |
| image2DRect | GL_IMAGE_2D_RECT | QTextureRectangle |
| imageCube | GL_IMAGE_CUBE | QTextureCubeMap |
| imageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
| image1DArray | GL_IMAGE_1D_ARRAY | QTexture1DArray |
| image2DArray | GL_IMAGE_2D_ARRAY | QTexture2DArray |
| imageCubeArray | GL_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
| image2DMS | GL_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
| image2DMSArray | GL_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
| iimage1D | GL_INT_IMAGE_1D | QTexture1D |
| iimage2D | GL_INT_IMAGE_2D | QTexture2D |
| iimage3D | GL_INT_IMAGE_3D | QTexture3D |
| iimage2DRect | GL_INT_IMAGE_2D_RECT | QTextureRectangle |
| iimageCube | GL_INT_IMAGE_CUBE | QTextureCubeMap |
| iimageBuffer | GL_INT_IMAGE_BUFFER | QTextureBuffer |
| iimage1DArray | GL_INT_IMAGE_1D_ARRAY | QTexture1DArray |
| iimage2DArray | GL_INT_IMAGE_2D_ARRAY | QTexture2DArray |
| iimageCubeArray | GL_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
| iimage2DMS | GL_INT_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
| iimage2DMSArray | GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
| uimage1D | GL_UNSIGNED_INT_IMAGE_1D | QTexture1D |
| uimage2D | GL_UNSIGNED_INT_IMAGE_2D | QTexture2D |
| uimage3D | GL_UNSIGNED_INT_IMAGE_3D | QTexture3D |
| uimage2DRect | GL_UNSIGNED_INT_IMAGE_2D_RECT | QTextureRectangle |
| uimageCube | GL_UNSIGNED_INT_IMAGE_CUBE | QTextureCubeMap |
| uimageBuffer | GL_UNSIGNED_INT_IMAGE_BUFFER | QTextureBuffer |
| uimage1DArray | GL_UNSIGNED_INT_IMAGE_1D_ARRAY | QTexture1DArray |
| uimage2DArray | GL_UNSIGNED_INT_IMAGE_2D_ARRAY | QTexture2DArray |
| uimageCubeArray | GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
| uimage2DMS | GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
| uimage2DMSArray | GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
OpenGL ES 3.1은 다음 이미지 유형을 지원합니다:
| GLSL 유형 | OpenGL 유형 열거형 | 텍스처 유형 |
|---|---|---|
| image2D | GL_IMAGE_2D | QTexture2D |
| image3D | GL_IMAGE_3D | QTexture3D |
| imageCube | GL_IMAGE_CUBE | QTextureCubeMap |
| image2DArray | GL_IMAGE_2D_ARRAY | QTexture2DArray |
| iimage2D | GL_INT_IMAGE_2D | QTexture2D |
| iimage3D | GL_INT_IMAGE_3D | QTexture3D |
| iimageCube | GL_INT_IMAGE_CUBE | QTextureCubeMap |
| iimage2DArray | GL_INT_IMAGE_2D_ARRAY | QTexture2DArray |
| uimage2D | GL_UNSIGNED_INT_IMAGE_2D | QTexture2D |
| uimage3D | GL_UNSIGNED_INT_IMAGE_3D | QTexture3D |
| uimageCube | GL_UNSIGNED_INT_IMAGE_CUBE | QTextureCubeMap |
| uimage2DArray | GL_UNSIGNED_INT_IMAGE_2D_ARRAY | QTexture2DArray |
OpenGL ES 3.2는 OpenGL ES 3.1의 모든 이미지 유형과 더불어 다음을 지원합니다:
| GLSL 유형 | OpenGL 유형 열거형 | 텍스처 유형 |
|---|---|---|
| imageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
| imageCubeArray | GL_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
| iimageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
| iimageCubeArray | GL_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
| uimageBuffer | GL_UNSIGNED_INT_IMAGE_BUFFER | QTextureBuffer |
| uimageCubeArray | GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
예상되는 사용 예는 다음과 같습니다:
Qt3DRender::QTexture2D *tex2D = new Qt3DRender::QTexture2D();
...
Qt3DRender::QMaterial *material = new Qt3DRender::QMaterial();
...
Qt3DRender::QParameter *imageParameter = new Qt3DRender::QParameter();
Qt3DRender::QShaderImage *shaderImage = new Qt3DRender::QShaderImage();
shaderImage->setTexture(tex2D);
imageParameter->setName("imageUniformName");
imageParameter->setValue(QVariant::fromValue(shaderImage));
material->addParameter(imageParamenter);[deprecated] class Qt3DRender::QShaderProgram
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
셰이더 프로그램은 버텍스 셰이더 및 프래그먼트 셰이더와 같은 여러 가지 셰이더로 구성됩니다.
Qt3D는 셰이더 인트로스펙션 단계에서 기본 유니폼 세트가 발견되면 이를 자동으로 채워 넣습니다.
| 기본 유니폼 | 관련 Qt3D 매개변수 이름 | GLSL 선언 |
|---|---|---|
| ModelMatrix | modelMatrix | uniform mat4 modelMatrix; |
| ViewMatrix | viewMatrix | uniform mat4 viewMatrix; |
| 투영 행렬 | projectionMatrix | uniform mat4 투영행렬; |
| 모델 뷰 행렬 | modelView | uniform mat4 modelView; |
| ViewProjectionMatrix | viewProjectionMatrix | uniform mat4 뷰투영행렬; |
| ModelViewProjectionMatrix | modelViewProjection mvp | uniform mat4 modelViewProjection; uniform mat4 mvp; |
| InverseModelMatrix | inverseModelMatrix | uniform mat4 inverseModelMatrix; |
| InverseViewMatrix | 역뷰 행렬 | uniform mat4 inverseViewMatrix; |
| 역투영 행렬 | 역투영 행렬 | uniform mat4 inverseProjectionMatrix; |
| InverseModelViewMatrix | inverseModelView | uniform mat4 inverseModelView; |
| 역 뷰 투영 행렬 | 역 뷰 투영 행렬 | uniform mat4 inverseViewProjectionMatrix; |
| 역모델 뷰 투영 행렬 | 역모델뷰투영행렬 | uniform mat4 inverseModelViewProjection; |
| 모델 법선 행렬 | modelNormalMatrix | uniform mat3 모델법선행렬; |
| 모델 뷰 법선 행렬 | modelViewNormal | uniform mat3 modelViewNormal; |
| 뷰포트 행렬 | 뷰포트 행렬 | uniform mat4 뷰포트 행렬; |
| InverseViewportMatrix | inverseViewportMatrix | uniform mat4 inverseViewportMatrix; |
| AspectRatio (표면 너비 / 표면 높이) | aspectRatioxml-ph-0000@deepl.internal (표면 너비 / 표면 높이) uniform float aspectRatio; | uniform float aspectRatio; |
| 노출 | 노출 | uniform float exposure; |
| 감마 | 감마 | 균일한 부동소수점 감마; |
| 시간 (나노초 단위) | time | uniform float time; |
| EyePosition | eyePosition | uniform vec3 eyePosition; |
| 스키닝 팔레트 | skinningPalette[0] | const int maxJoints = 100; uniform mat4 skinningPalette[maxJoints]; |
RHI 지원
Qt 3D 의 RHI 백엔드와 함께 사용할 GLSL 450 셰이더 코드를 작성할 때, 기본 유니폼은 2개의 유니폼 버퍼 객체로 제공됩니다.
이들의 바인딩 위치는 RenderView 유니폼의 경우 0, Command 유니폼의 경우 1로 설정됩니다.
#version 450 core
layout(location = 0) in vec3 vertexPosition;
layout(std140, binding = 0) uniform qt3d_render_view_uniforms {
mat4 viewMatrix;
mat4 projectionMatrix;
mat4 uncorrectedProjectionMatrix;
mat4 clipCorrectionMatrix;
mat4 viewProjectionMatrix;
mat4 inverseViewMatrix;
mat4 inverseProjectionMatrix;
mat4 inverseViewProjectionMatrix;
mat4 viewportMatrix;
mat4 inverseViewportMatrix;
vec4 textureTransformMatrix;
vec3 eyePosition;
float aspectRatio;
float gamma;
float exposure;
float time;
float yUpInNDC;
float yUpInFBO;
};
layout(std140, binding = 1) uniform qt3d_command_uniforms {
mat4 modelMatrix;
mat4 inverseModelMatrix;
mat4 modelViewMatrix;
mat3 modelNormalMatrix;
mat4 inverseModelViewMatrix;
mat4 modelViewProjection;
mat4 inverseModelViewProjectionMatrix;
};
void main()
{
gl_Position = (projectionMatrix * viewMatrix * modelMatrix * vertexPosition);
}사용자 정의 유니폼 버퍼 객체의 경우, 바인딩을 2부터 시작하거나 'auto'를 사용하여 Qt 3D 가 바인딩을 자동으로 처리하도록 하십시오. 서로 다른 셰이더 단계 간에 일관성을 유지해야 합니다.
#version 450 core
layout(std140, binding = auto) uniform my_uniforms {
vec4 myColor;
};
layout(location=0) out vec4 fragColor;
void main()
{
fragColor = myColor;
}유니폼에 값을 전달하는 방식에는 변경 사항이 없습니다.
위의 예제에서 myColor를 설정하는 방법은 다음과 같습니다.
QParameter *parameter = new QParameter();
parameter->setName("myColor");
parameter->setValue(QVariant::fromValue(QColor(Qt::blue)));텍스처는 여전히 독립적인 유니폼으로 정의해야 합니다.
#version 450 core
layout(binding=0) uniform sampler2D source;
layout(location=0) out vec4 fragColor;
void main()
{
fragColor = texture(source, vec2(0.5, 0.5));
}[deprecated] class Qt3DRender::QShaderProgramBuilder
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
셰이더 프로그램 빌더는 셰이더 코드를 생성하는 데 사용되는 여러 가지 셰이더 그래프로 구성됩니다.
생성된 셰이더 코드의 캐시가 관리됩니다. 생성된 셰이더는 기본적으로 QStandardPaths::writableLocation(QStandardPaths::TempLocation)에 저장됩니다. 이 경로는 환경 변수 QT3D_WRITABLE_CACHE_PATH를 유효한 쓰기 가능한 경로로 설정하여 재정의할 수 있습니다.
환경 변수 QT3D_DISABLE_SHADER_CACHE를 설정하여 캐시 사용을 비활성화할 수 있습니다.
대부분의 경우, 그래프에 가해진 변경 사항은 Qt 3D 에 의해 감지되며 새로운 캐시 항목이 생성됩니다. 그래프에 포함된 코드 스니펫이 변경된 경우에는 이러한 감지가 이루어지지 않습니다. 이를 해결하기 위해 캐시 디렉터리를 지우거나 환경 변수 QT3D_REBUILD_SHADER_CACHE를 설정하여 셰이더 코드가 다시 생성되도록 강제할 수 있습니다.
[deprecated] class Qt3DRender::QSharedGLTexture
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
Qt 3D 가 사용하는 렌더링 모드에 따라, 공유 컨텍스트는 다음 중 하나가 됩니다:
- Qt 3D 가 렌더링을 제어하도록 할 경우 `qt_gl_global_share_context`가 됩니다. QApplication 클래스의 ` Qt::AA_ShareOpenGLContexts ` 속성을 설정하면, QOpenGLWidget 인스턴스의 컨텍스트가 자동으로 `qt_gl_global_share_context`와 공유됩니다.
- QtQuick 장면에서 제공되는 공유 컨텍스트. 5.13 버전 기준 이 공유 컨텍스트는 qt_gl_global_share_context이지만, 해당 컨텍스트를 직접 제어하려면 QWindow 을 서브클래스화하거나 QtQuickRenderControl을 사용해야 할 수도 있습니다.
Qt 3D 렌더러와 컨텍스트를 공유하는 모든 타사 엔진은 이제 Qt 3D 텍스처에서 참조될 텍스처 ID를 제공할 수 있습니다.
텍스처 속성을 명시적으로 지정하지 않아도 되며, Qt 3D 가 런타임에 해당 속성을 자동으로 파악하려고 시도합니다. 속성을 알고 있다면 당연히 직접 제공할 수 있으며, 이 경우 Qt 3D 의 추가 작업 부담을 줄일 수 있습니다.
사용자 정의 머티리얼과 셰이더를 사용하는 경우, 사용할 올바른 샘플러 유형을 지정해야 한다는 점을 유의하십시오.
[deprecated] class Qt3DRender::QSortPolicy
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QSortPolicy 클래스는 FrameGraph에서 사용하는 정렬 유형을 저장합니다. 정렬 유형은 그리기 순서를 결정하기 위해 그리기 전에 드로어블 엔티티가 어떻게 정렬되는지를 결정합니다. FrameGraph에 QSortPolicy가 존재할 경우, 정렬 메커니즘은 ` sortTypes ` 목록에 의해 결정됩니다. 여러 정렬 유형을 동시에 사용할 수 있습니다. FrameGraph에 QSortPolicy가 없는 경우, 엔티티는 엔티티 계층 구조에 나타나는 순서대로 그려집니다.
[deprecated] class Qt3DRender::QSpotLight
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
스포트라이트는 특정 방향으로 원뿔 모양의 빛을 방출하는 광원입니다.
스포트라이트는 빛의 강도가 거리에 따라 어떻게 감소하는지를 설명하기 위해 세 가지 감쇠 계수를 사용합니다. 이 계수들은 총 감쇠량을 계산할 때 함께 사용되도록 설계되었습니다. Qt3D Extras의 머티리얼에서는 다음 공식을 사용하며, 여기서 거리는 광원과 렌더링되는 표면 사이의 거리를 의미합니다:
totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));사용자 정의 머티리얼의 경우, 이러한 계수를 다르게 해석할 수도 있습니다.
[deprecated] class Qt3DRender::QStencilMask
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QStencilMask 클래스는 스텐실 테스트 후 스텐실 값에 적용될 쓰기 마스크를 지정합니다. 마스크는 앞면 폴리곤과 뒷면 폴리곤에 대해 별도로 지정할 수 있습니다. 프래그먼트 스텐실 값은 스텐실 버퍼에 기록되기 전에 마스크와 논리 AND 연산을 거칩니다.
Qt3DRender::QStencilTest도 참조하십시오 .
[deprecated] class Qt3DRender::QStencilOperation
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QStencilOperation 클래스는 앞면 및 뒷면 폴리곤에 대한 스텐실 연산을 지정합니다. 스텐실 연산은 스텐실 테스트와 깊이 테스트가 통과하거나 실패할 때 프래그먼트에 어떤 처리가 이루어질지를 제어합니다.
Qt3DRender::QStencilTest도 참조하십시오 .
[deprecated] class Qt3DRender::QStencilOperationArguments
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
Qt3DRender::QStencilOperationArguments 클래스는 스텐실 연산에 대한 인수를 지정합니다.
Qt3DRender::QStencilOperation도 참조하십시오 .
[deprecated] class Qt3DRender::QStencilTest
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QStencilTest 클래스는 스텐실 테스트에 대한 인수를 지정합니다. 스텐실 테스트는 스텐실 테스트 함수, 스텐실 테스트 마스크, 스텐실 기준값의 세 가지 인수로 구성됩니다. QStencilTest를 사용하면 앞면 및 뒷면 폴리곤에 대해 이러한 인수를 각각 별도로 설정할 수 있습니다.
Qt3DRender::QStencilMask 및 Qt3DRender::QStencilOperation도 참조하십시오 .
[deprecated] class Qt3DRender::QStencilTestArguments
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QStencilTestArguments 클래스는 스텐실 테스트에 대한 인수를 지정합니다.
[deprecated] class Qt3DRender::QSubtreeEnabler
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QFrameGraphNodes는 ` enabled ` 속성을 통해 개별적으로 활성화 및 비활성화할 수 있지만, 전체 경로를 한 번에 켜거나 꺼야 할 때는 이 작업이 번거로울 수 있습니다. `QSubtreeEnabler`는 이러한 사용 사례를 간편하게 처리해 주는 편의 노드로, 단일 스위치로 모든 자식 노드를 제어할 수 있게 해줍니다.
QSubtreeEnabler는 기본적으로 활성화되어 있습니다.
[deprecated] class Qt3DRender::QTechnique
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QTechnique 는 Qt3DRender::QRenderPass 객체, Qt3DRender::QFilterKey 객체, Qt3DRender::QParameter 객체 및 Qt3DRender::QGraphicsApiFilter 의 집합을 지정하며, 이 모든 요소가 함께 주어진 그래픽 API가 렌더링할 수 있는 렌더링 기법을 정의합니다. 필터 키(filter keys)는 Qt3DRender::QTechniqueFilter 에 의해 사용되어 FrameGraph의 특정 부분에서 특정 기법을 선택합니다. QTechnique에 정의된 QParameter 는 QRenderPass 에 정의된 (동일한 이름의) 매개변수를 재정의하지만, QRenderPassFilter, QTechniqueFilter, QMaterial 및 QEffect 에 있는 매개변수에 의해 재정의됩니다.
여러 버전의 그래픽 API를 대상으로 하는 QEffect 를 생성할 때는, 각 QTechnique 노드의 graphicsApiFilter 를 대상 GL 버전 중 하나에 맞게 설정하여 여러 개의 QTechnique 노드를 생성하는 것이 유용합니다. 실행 시, Qt3D 렌더러는 지원되는 그래픽 API 버전을 기준으로, 그리고 (지정된 경우) FrameGraph 내의 특정 QTechniqueFilter 을 충족하는 QFilterKey 노드를 기준으로 가장 적합한 QTechnique을 선택합니다.
참고: 렌더링을 위한 그래픽 API로 OpenGL을 사용할경우 , Qt3D는 런타임에 QSurfaceFormat::defaultFormat()가 반환하는 QSurfaceFormat 를 기반으로 사용 가능한 가장 적절한 GL 버전을 결정합니다. QSurfaceFormat 를 사용자 정의해야 하는 경우, QSurfaceFormat::setDefaultFormat()를 통해 이를 적용하는 것을 잊지 마십시오. 뷰의 QSurfaceFormat 를 설정해도 Qt3D 관련 렌더링에는 영향을 미치지 않을 가능성이 높습니다.
참고: QTechnique 노드는 비활성화할 수 없습니다.
QTechnique *gl3Technique = new QTechnique();
// Create the render passes
QRenderPass *firstPass = new QRenderPass();
QRenderPass *secondPass = new QRenderPass();
// Add the passes to the technique
gl3Technique->addRenderPass(firstPass);
gl3Technique->addRenderPass(secondPass);
// Set the targeted GL version for the technique
gl3Technique->graphicsApiFilter()->setApi(QGraphicsApiFilter::OpenGL);
gl3Technique->graphicsApiFilter()->setMajorVersion(3);
gl3Technique->graphicsApiFilter()->setMinorVersion(1);
gl3Technique->graphicsApiFilter()->setProfile(QGraphicsApiFilter::CoreProfile);
// Create a FilterKey
QFilterKey *filterKey = new QFilterKey();
filterKey->setName(QStringLiteral("name"));
fitlerKey->setValue(QStringLiteral("zFillPass"));
// Add the FilterKey to the Technique
gl3Technique->addFilterKey(filterKey);
// Create a QParameter
QParameter *colorParameter = new QParameter(QStringLiteral("color"), QColor::fromRgbF(0.0f, 0.0f, 1.0f, 1.0f));
// Add parameter to technique
gl3Technique->addParameter(colorParameter);QEffect, QRenderPass 및 QTechniqueFilter도 참조하십시오 .
[deprecated] class Qt3DRender::QTechniqueFilter
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
Qt3DRender::QTechniqueFilter 는 엔티티를 렌더링할 때 FrameGraph가 어떤 기법을 사용할지 지정합니다. QTechniqueFilter는 Qt3DRender::QFilterKey 객체와 Qt3DRender::QParameter 객체의 목록을 지정합니다. FrameGraph에 QTechniqueFilter가 존재할 경우, 목록의 키와 일치하는 기법만 렌더링에 사용됩니다. 목록에 포함된 매개변수는 셰이더 매개변수의 값을 설정하는 데 사용할 수 있습니다. QTechniqueFilter의 매개변수는 QMaterial, QEffect, QTechnique 및 QRenderPass 의 매개변수를 재정의하지만, QRenderPassFilter 의 매개변수에 의해 재정의됩니다.
[deprecated] class Qt3DRender::QTexture1D
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTexture1DArray
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QTexture2D
이 클래스는 더 이상 권장되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QTexture2DArray
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QTexture2DMultisample
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTexture2DMultisampleArray
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTexture3D
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTextureBuffer
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTextureCubeMap
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것이 좋습니다.
[deprecated] class Qt3DRender::QTextureCubeMapArray
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않도록 강력히 권고합니다.
[deprecated] class Qt3DRender::QTextureData
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTextureDataUpdate
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않도록 강력히 권장합니다.
실제 데이터 내용은 ` QTextureImageDataPtr ` 멤버에 포함되어 있습니다. 추가 멤버를 통해 콘텐츠 업데이트의 x, y, z 오프셋은 물론, 최종 레이어, mipLevel 및 면을 지정할 수 있습니다.
QAbstractTexture도 참조하십시오 .
[deprecated] class Qt3DRender::QTextureImage
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
이 클래스에는 OpenGL 텍스처에 데이터를 적절한 위치에 로드하는 데 필요한 정보(미프맵 레벨, 레이어, 큐브 면 및 소스 URL)가 포함되어 있습니다.
[deprecated] class Qt3DRender::QTextureImageData
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTextureImageDataGenerator
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
QTextureImageDataGenerator는 QAbstractTexture 을 위한 데이터 제공자입니다. QTextureImageDataGenerator를 사용하면 Qt3D에 텍스처 이미지 데이터를 로드하는 더 다양한 방법을 추가할 수 있을 뿐만 아니라, 사용자 정의 형식 및 Qt3D가 기본적으로 지원하지 않는 형식도 지원할 수 있습니다. 데이터는 텍스처에 로드될 데이터를 포함하는 ` QTextureImageDataPtr `를 통해 반환됩니다. `QTextureImageDataGenerator`는 백엔드의 Aspect 작업에 의해 실행됩니다.
[deprecated] class Qt3DRender::QTextureLoader
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 말 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTextureRectangle
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QTextureWrapMode
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
[deprecated] class Qt3DRender::QViewport
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
Qt3DRender::QViewport 씬의 뷰포트는 Qt3D가 렌더링 표면의 어느 부분에 렌더링을 수행할지 지정합니다. 뷰포트 외부의 영역은 변경되지 않습니다. 또한 뷰포트 내 렌더링에 적용되는 감마와 같은 전역 매개변수도 제어합니다.
[deprecated] class Qt3DRender::QWaitFence
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
펜스(Fence)는 GPU와 CPU의 작업 부하를 동기화할 수 있게 해줍니다. GPU 명령어는 대개 비차단 방식입니다. 명령어가 발행되면 명령어 버퍼에 삽입되며, 이 버퍼는 나중에 GPU에 의해 읽힙니다. 경우에 따라, 특정 명령어가 하드웨어에서 실행되었음을 확실히 확인한 후에만 처리를 계속하거나 특정 명령어를 발행하고 싶을 때가 있습니다. 펜스(Fence)는 이를 구현하는 방법입니다. 이는 Qt3D와 타사 엔진을 함께 사용할 때 특히 중요합니다. Qt3D는 다른 엔진 명령어가 리소스 수정을 완료한 것이 확인된 경우에만 공유 리소스에 접근해야 합니다.
QWaitFence는 후속 명령이 명령 스트림에 삽입되기 전에 신호가 발생하기를 강제로 대기하게 하는 FrameGraph 노드입니다. 이 노드는 QSetFence 와 함께 사용할 수 있으며, 대기 시간 및 CPU 측에서 차단할지 여부를 구성하는 속성을 포함하고 있습니다.
참고: ` Qt 3D `는 드로우 콜을 발행하기 전에 GPU 리소스(텍스처, 셰이더, 버퍼)를 업로드합니다.
© 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.