QSSGRhiContext Class
QSSGRhiContext。詳細...
| Header: | #include <qssgrhicontext.h> |
| Since: | Qt 6.7 |
パブリック関数
| void | checkAndAdjustForNPoT(QRhiTexture *texture, QSSGRhiSamplerDescription *samplerDescription) |
| QRhiCommandBuffer * | commandBuffer() const |
| QRhiCommandBuffer::BeginPassFlags | commonPassFlags() const |
| QRhiTexture * | dummyTexture(QRhiTexture::Flags flags, QRhiResourceUpdateBatch *rub, const QSize &size = QSize(64, 64), const QColor &fillColor = Qt::black, int arraySize = 0) |
| bool | isValid() const |
| int | mainPassSampleCount() const |
| int | mainPassViewCount() const |
| QRhiRenderPassDescriptor * | mainRenderPassDescriptor() const |
| QRhiRenderTarget * | renderTarget() const |
| QRhi * | rhi() const |
| QRhiSampler * | sampler(const QSSGRhiSamplerDescription &samplerDescription) |
メンバー関数のドキュメント
void QSSGRhiContext::checkAndAdjustForNPoT(QRhiTexture *texture, QSSGRhiSamplerDescription *samplerDescription)
texture のピクセルサイズに基づいて、samplerDescription のタイリングモードおよびフィルタリングモードを調整します。
ほとんどの場合、samplerDescription は変更されません。ただし、古いレガシーな3D APIを使用している場合、幅または高さが2の冪でないテクスチャに対して、QRhiSampler::Repeat などのタイリングモードがサポートされていない可能性があります。
この便利関数を使用することで、実行時に OpenGL ES 2.0 や WebGL 1 の実装でQRhi::NPOTTextureRepeat などの機能がサポートされていない場合でも、正常に動作する堅牢なアプリケーションを作成できます。
QRhiCommandBuffer *QSSGRhiContext::commandBuffer() const
Qt Quick 3D レンダラーで使用されている、現在のフレームのコマンドバッファを返します。
QRhiCommandBuffer::BeginPassFlags QSSGRhiContext::commonPassFlags() const
QRhiCommandBuffer::beginPass() を呼び出す際の推奨フラグを返します。
QRhiTexture *QSSGRhiContext::dummyTexture(QRhiTexture::Flags flags, QRhiResourceUpdateBatch *rub, const QSize &size = QSize(64, 64), const QColor &fillColor = Qt::black, int arraySize = 0)
指定されたflags とピクセルsize を持つテクスチャを返します。
これは、指定されたfillColor で塗りつぶされた「ダミー」テクスチャに効率的にアクセスし、レンダリングスタックのさまざまな場所で再利用することを目的としています。
rub この関数は、適切なキャッシュされたオブジェクトが見つからない場合、新しいテクスチャを作成してそのコンテンツを生成するため、QRhiResourceUpdateBatch は有効なものでなければなりません。その後、必要なアップロード操作が、指定された更新バッチにキューに入れられます。
arraySize が 2 以上の場合、2D テクスチャ配列が返されます。
返されるテクスチャの所有権は、Qt Quick 3D に残ります。
bool QSSGRhiContext::isValid() const
レンダラーの初期化が正常に完了した場合、true を返します。
int QSSGRhiContext::mainPassSampleCount() const
メインのレンダリングパスで使用されるサンプル数を返します。
int QSSGRhiContext::mainPassViewCount() const
メインのレンダリングパスで使用されるマルチビューの数を返します。これは、マルチビューレンダリングが使用されている場合は 2、使用されていない場合は 1 となります。
QRhiRenderPassDescriptor *QSSGRhiContext::mainRenderPassDescriptor() const
Qt Quick 3D レンダラーのメイン・レンダリング・パスで使用される `QRhiRenderPassDescriptor ` を返します。
QRhiRenderTarget *QSSGRhiContext::renderTarget() const
Qt Quick の3Dレンダラーが、現在のフレームのメインレンダーパスで使用するレンダーターゲットを返します。
View3D がOffscreen以外のrenderModeを使用している場合、これは実質的にスワップチェーンからのレンダリングターゲットとなります。より一般的なケースとして、renderModeがデフォルトのOffscreenである場合や、ポストプロセッシングエフェクトが使用されている場合など、レンダリングターゲットはテクスチャ(つまりQRhiTextureRenderTarget )を指すことがよくあります。
QRhi *QSSGRhiContext::rhi() const
Qt Quick の3Dレンダラーで使用されるQRhi オブジェクトを返します。
QRhiSampler *QSSGRhiContext::sampler(const QSSGRhiSamplerDescription &samplerDescription)
samplerDescription で指定されたフィルタおよびタイリングモードを持つサンプラーを返します。
生成されたQRhiSampler オブジェクトはキャッシュされ、再利用されます。したがって、この方法は、毎回新しい専用オブジェクトを作成することなく、指定された設定を持つQRhiSampler にアクセスするための便利な手段となります。
返されるQRhiSampler の所有権は、Qt Quick 3Dに留まります。
© 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.