QSSGRhiContext Class

QSSGRhiContext.詳細...

Header: #include <QSSGRhiContext>
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 が使用されている場合、QRhiSampler::Repeat のようなタイリングモードが、幅または高さが 2 のべき乗でないテクスチャではサポートされていない可能性があります。

この便利な関数は、QRhi::NPOTTextureRepeat のような機能が OpenGL ES 2.0 または WebGL 1 実装でサポートされていない場合でも、実行時に機能する堅牢なアプリケーションを作成するのに役立ちます。

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 を使用している場合、スワップチェーンからのレンダーターゲットとなります。より一般的には、レンダーターゲットはテクスチャを指します(つまり、QRhiTextureRenderTarget )。これは、レンダーモードがデフォルトのOffscreenである場合や、後処理エフェクトが使用されている場合などです。

QRhi *QSSGRhiContext::rhi() const

Qt Quick 3D レンダラーが使用するQRhi オブジェクトを返します。

QRhiSampler *QSSGRhiContext::sampler(const QSSGRhiSamplerDescription &samplerDescription)

samplerDescription で指定されたフィルターとタイリングモードを持つサンプラーを返す。

生成されたQRhiSampler オブジェクトはキャッシュされ、再利用されます。したがって、これは、常に新しい専用のオブジェクトを作成することなく、指定された設定でQRhiSampler にアクセスする便利な方法です。

返されたQRhiSampler の所有権はQt Quick 3D に残ります。

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