描画コマンドの並列発行を管理します。 More...
#include <GxRenderContext.h>
定義 | |
class | GxSysRenderBase |
class | GxRenderDevice |
初期化 | |
GxRenderContext (void) | |
デフォルトコンストラクタ | |
b32 | initialize (void) |
初期化関数 | |
void | terminate (void) |
終了関数 | |
b32 | initializeThreadLocalStorage (void) |
スレッドローカルストレージ初期化関数 | |
アクセサ | |
constexpr u32 | getPacketCount (void) const |
描画パケットの個数を取得 | |
GX_FORCE_INLINE void | setView (RENDER_VIEW view) |
ビューの設定(画面分割など、別のビューポート) | |
constexpr RENDER_VIEW | getView (void) const |
ビューの取得(画面分割など、別のビューポート) | |
GX_FORCE_INLINE void | setSubView (RENDER_SUB_VIEW subView) |
サブビューの設定(シャドウマップや反射マップなど) | |
constexpr RENDER_SUB_VIEW | getSubView (void) const |
サブビューの取得(シャドウマップや反射マップなど) | |
GX_FORCE_INLINE void | setPass (RENDER_PASS pass) |
パスの設定(Zプリパス、不透明パスなど) | |
constexpr RENDER_PASS | getPass (void) const |
パスの取得(Zプリパス、不透明パスなど) | |
GX_FORCE_INLINE void | setSubPriority (u32 subPriority) |
サブプライオリティの設定(パス内での優先度) | |
GX_FORCE_INLINE void | setSubPriorityF32 (f32 subPriority) |
サブプライオリティの設定(パス内での優先度) | |
constexpr u32 | getSubPriority (void) const |
サブプライオリティの取得(パス内での優先度) | |
void | setRenderState (RENDER_STATE renderState, u32 value) |
描画ステートの設定 | |
void | setDepthTestState (GxRenderDepthTestState state) |
深度テストステートの設定 | |
void | setStencilTestState (GxRenderStencilTestState state, u32 stencilRef, b32 stencilTwoSideEnable) |
ステンシルテストステートの設定 | |
void | setAlphaTestState (GxRenderAlphaTestState state) |
アルファテストステートの設定 | |
void | setBlendState (GxRenderBlendState state) |
ブレンドステートの設定 | |
void | setViewport (const GxRect &rect, f32 nearZ, f32 farZ) |
ビューポートの設定 | |
void | setScissorRect (const GxRect &rect) |
シザリング矩形の設定 | |
void | setTexture (GX_HANDLE handle, GxRenderTexture *pTexture) |
テクスチャの設定 | |
void | setSamplerState (GX_HANDLE handle, GxRenderSamplerState state) |
サンプラステートの設定 | |
void | setVector (GX_HANDLE handle, const GxVector4 &vector) |
シェーダ定数の設定(4次元ベクトル) | |
GxVector4 * | setVectorArray (GX_HANDLE handle, u32 count) |
シェーダ定数の設定(4次元ベクトル配列) | |
void | setMatrix44 (GX_HANDLE handle, const GxMatrix44Gpu &matrix) |
シェーダ定数の設定(4x4行列) | |
void | setMatrixAffine (GX_HANDLE handle, const GxMatrixAffineGpu &matrix) |
シェーダ定数の設定(アフィン変換行列行列) | |
GxMatrix44Gpu * | setMatrix44Array (GX_HANDLE handle, u32 count) |
シェーダ定数の設定(4x4行列配列) | |
GxMatrixAffineGpu * | setMatrixAffineArray (GX_HANDLE handle, u32 count) |
シェーダ定数の設定(アフィン変換行列配列) | |
void | setBoolean (GX_HANDLE handle, b32 boolean) |
シェーダ定数の設定(ブール値) | |
void | setInt4 (GX_HANDLE handle, const s32 int4[4]) |
シェーダ定数の設定(s32 4次元ベクトル) | |
GX_FORCE_INLINE void | setVertexStream (u32 slot, GxRenderVertexBuffer *pVertexBuffer, u32 offset, u32 stride, RENDER_STREAM_FREQUENCY_TYPE frequencyType=RENDER_STREAM_FREQUENCY_TYPE::INDEXED) |
頂点ストリームの設定 | |
GX_FORCE_INLINE void | setIndexBuffer (GxRenderIndexBuffer *pIndexBuffer) |
インデックスバッファの設定 | |
GX_FORCE_INLINE void | setVertexDeclaration (GxRenderVertexDeclaration *pVertexDeclaration) |
頂点宣言の設定 | |
GX_FORCE_INLINE void | setShader (RENDER_SHADER renderShader, GxRenderShader *pShader) |
頂点シェーダの設定 | |
void | setRenderTarget (u32 index, GxRenderTexture *pRenderTarget, b32 forceRenderToTexture=false) |
レンダーターゲットの設定 | |
void | setDepthStencil (GxRenderTexture *pDepthStencil, b32 readOnly=false) |
深度ステンシルの設定 | |
void | forceDrawState (void) |
描画ステート強制変更 | |
void | setCallback (GxCallback::GxHandlerBase handle, void *pSource, void *pArgument) |
コールバックの設定 | |
void | setCallback (GxCallback::GxHandlerBase handle, void *pSource, u32 srcSize, void *pArgument, u32 argumentSize) |
コールバックの設定 | |
void | setCallbackAsync (GxCallback::GxHandlerBase handle, void *pSource, void *pArgument) |
コールバックの設定(非同期用) | |
void | setPredication (void *pFlag, u32 size, b32 value) |
プレディケーションの設定 | |
static GX_FORCE_INLINE GxRenderContext * | getContext (void) |
カレントスレッドのコンテキストを取得 | |
操作 | |
void | draw (RENDER_PRIMITIVE_TYPE type, u32 startVertex, u32 vertexCount) |
インデックスなし描画 | |
void | drawIndexed (RENDER_PRIMITIVE_TYPE type, s32 baseVertexIndex, u32 minIndex, u32 vertexCount, u32 startIndex, u32 indexCount, u32 instanceCount=0, s32 *pQueryIndex=nullptr) |
インデックスあり描画 | |
void | drawMemory (RENDER_PRIMITIVE_TYPE type, u32 vertexCount, const void *pVertex, u32 vertexStride) |
インデックスなし描画(メインメモリ) | |
void | drawIndexedMemory (RENDER_PRIMITIVE_TYPE type, u32 minIndex, u32 vertexCount, u32 indexCount, const void *pVertex, const void *pIndex, u32 vertexStride, RENDER_INDEX_TYPE indexType) |
インデックスあり描画(メインメモリ) | |
void | clear (u32 clearFlags, const GxColor clearColor, f32 clearZ, u32 clearStencil) |
画面クリア | |
void | clearHDR (u32 clearFlags, const GxColorHDR &clearColor, f32 clearZ, u32 clearStencil) |
画面クリア(HDR) | |
void | copyRenderTargetToTexture (u32 index=0, GxRenderTexture *pTexture=nullptr, u32 dstMipLevel=0, const GxRect *pSrcRect=nullptr, const GxPoint2 *pDstPoint=nullptr) |
レンダーターゲットをテクスチャにコピーする | |
void | copyDepthStencilToTexture (GxRenderTexture *pTexture=nullptr, u32 dstMipLevel=0, const GxRect *pSrcRect=nullptr, const GxPoint2 *pDstPoint=nullptr) |
深度ステンシルをテクスチャにコピーする | |
void | copyRenderTargetToTextureStretch (u32 index=0, GxRenderTexture *pTexture=nullptr, u32 dstMipLevel=0, const GxRect *pSrcRect=nullptr, const GxRect *pDstRect=nullptr) |
レンダーターゲットをテクスチャに拡大/縮小コピーする(Xbox版以外) | |
void | copyDepthStencilToTextureStretch (GxRenderTexture *pTexture=nullptr, u32 dstMipLevel=0, const GxRect *pSrcRect=nullptr, const GxRect *pDstRect=nullptr) |
深度ステンシルをテクスチャに拡大/縮小コピーする(Xbox版以外) | |
void | copyRenderTargetToTextureWithMipmap (u32 index=0, GxRenderTexture *pTexture=nullptr) |
レンダーターゲットをテクスチャにミップマップつきでコピーする | |
void | assembleFinalVrImage (void *pPacket, u32 packetSize) |
VR用の最終的な両目の画像を作成 | |
GX_FORCE_INLINE void | doNotSkipThisFrame (void) |
このフレームのスキップを禁止 | |
GX_FORCE_INLINE b32 | canNotSkipThisFrame (void) const |
このフレームのスキップが禁止されているか | |
constexpr void | beginMarker (GX_CSTR) |
マーカー開始 | |
constexpr void | endMarker (GX_CSTR) |
マーカー終了 | |
void | flushGpuCommandBuffer (void) |
GPUコマンドバッファのフラッシュ | |
Additional Inherited Members | |
![]() | |
constexpr | GxClassBase (void) |
コンストラクタ | |
constexpr | GxClassBase (const GxClassBase &base) |
コピーコンストラクタ | |
~GxClassBase (void) override | |
デストラクタ | |
![]() | |
constexpr | GxClassBaseRoot (void) |
コンストラクタ | |
constexpr | GxClassBaseRoot (const GxClassBaseRoot &) |
コピーコンストラクタ | |
virtual | ~GxClassBaseRoot (void) |
デストラクタ | |
constexpr GxClassBaseRoot & | operator= (const GxClassBaseRoot &) |
代入演算子 | |
virtual GxRtti & | getRtti (void) const =0 |
Rttiの取得 | |
virtual GX_FORCE_INLINE const GxTypedObject * | getDefaultObject (void) |
デフォルトオブジェクトを取得 | |
GX_FORCE_INLINE b32 | isDefaultObject (void) |
デフォルトオブジェクト判定 | |
![]() | |
static GX_FORCE_INLINE GxRtti & | __getStaticRtti (void) |
Rttiの取得 | |
描画コマンドの並列発行を管理します。
描画コンテキストクラス
|
inlineconstexpr |
マーカー開始
name | [in] 名前 |
void GxRenderContext::clear | ( | u32 | clearFlags, |
const GxColor | clearColor, | ||
f32 | clearZ, | ||
u32 | clearStencil ) |
画面クリア
clearFlags | [in] フラグ |
clearColor | [in] 色 |
clearZ | [in] Z値 |
clearStencil | [in] ステンシル値 |
void GxRenderContext::clearHDR | ( | u32 | clearFlags, |
const GxColorHDR & | clearColor, | ||
f32 | clearZ, | ||
u32 | clearStencil ) |
画面クリア(HDR)
clearFlags | [in] フラグ |
clearColor | [in] 色 |
clearZ | [in] Z値 |
clearStencil | [in] ステンシル値 |
void GxRenderContext::copyDepthStencilToTexture | ( | GxRenderTexture * | pTexture = nullptr, |
u32 | dstMipLevel = 0, | ||
const GxRect * | pSrcRect = nullptr, | ||
const GxPoint2 * | pDstPoint = nullptr ) |
深度ステンシルをテクスチャにコピーする
pTexture | [in] テクスチャ |
dstMipLevel | [in] 出力ミップレベル |
pSrcRect | [in] 入力矩形 |
pDstPoint | [in] 出力座標 |
void GxRenderContext::copyDepthStencilToTextureStretch | ( | GxRenderTexture * | pTexture = nullptr, |
u32 | dstMipLevel = 0, | ||
const GxRect * | pSrcRect = nullptr, | ||
const GxRect * | pDstRect = nullptr ) |
深度ステンシルをテクスチャに拡大/縮小コピーする(Xbox版以外)
pTexture | [in] テクスチャ |
dstMipLevel | [in] 出力ミップレベル |
pSrcRect | [in] 入力矩形 |
pDstRect | [in] 出力矩形 |
void GxRenderContext::copyRenderTargetToTexture | ( | u32 | index = 0, |
GxRenderTexture * | pTexture = nullptr, | ||
u32 | dstMipLevel = 0, | ||
const GxRect * | pSrcRect = nullptr, | ||
const GxPoint2 * | pDstPoint = nullptr ) |
レンダーターゲットをテクスチャにコピーする
index | [in] インデックス |
pTexture | [in] テクスチャ |
dstMipLevel | [in] 出力ミップレベル |
pSrcRect | [in] 入力矩形 |
pDstPoint | [in] 出力座標 |
void GxRenderContext::copyRenderTargetToTextureStretch | ( | u32 | index = 0, |
GxRenderTexture * | pTexture = nullptr, | ||
u32 | dstMipLevel = 0, | ||
const GxRect * | pSrcRect = nullptr, | ||
const GxRect * | pDstRect = nullptr ) |
レンダーターゲットをテクスチャに拡大/縮小コピーする(Xbox版以外)
index | [in] インデックス |
pTexture | [in] テクスチャ |
dstMipLevel | [in] 出力ミップレベル |
pSrcRect | [in] 入力矩形 |
pDstRect | [in] 出力矩形 |
void GxRenderContext::copyRenderTargetToTextureWithMipmap | ( | u32 | index = 0, |
GxRenderTexture * | pTexture = nullptr ) |
レンダーターゲットをテクスチャにミップマップつきでコピーする
index | [in] インデックス |
pTexture | [in] テクスチャ |
void GxRenderContext::draw | ( | RENDER_PRIMITIVE_TYPE | type, |
u32 | startVertex, | ||
u32 | vertexCount ) |
インデックスなし描画
type | [in] プリミティブタイプ |
startVertex | [in] 開始頂点インデックス |
vertexCount | [in] 頂点数 |
void GxRenderContext::drawIndexed | ( | RENDER_PRIMITIVE_TYPE | type, |
s32 | baseVertexIndex, | ||
u32 | minIndex, | ||
u32 | vertexCount, | ||
u32 | startIndex, | ||
u32 | indexCount, | ||
u32 | instanceCount = 0, | ||
s32 * | pQueryIndex = nullptr ) |
インデックスあり描画
type | [in] プリミティブタイプ |
baseVertexIndex | [in] 開始頂点インデックス |
minIndex | [in] 呼び出しに使用される最小のインデックス(baseVertexIndexをIndex0として考える) |
vertexCount | [in] 呼び出しに使用される頂点数 |
startIndex | [in] インデックスバッファの開始インデックス |
indexCount | [in] インデックス数 |
instanceCount | [in] インスタンス数 |
pQueryIndex | [in] クエリインデックスのアドレス |
void GxRenderContext::drawIndexedMemory | ( | RENDER_PRIMITIVE_TYPE | type, |
u32 | minIndex, | ||
u32 | vertexCount, | ||
u32 | indexCount, | ||
const void * | pVertex, | ||
const void * | pIndex, | ||
u32 | vertexStride, | ||
RENDER_INDEX_TYPE | indexType ) |
インデックスあり描画(メインメモリ)
type | [in] プリミティブタイプ |
minIndex | [in] 最小インデックス値 |
vertexCount | [in] 呼び出しに使用される頂点数 |
indexCount | [in] 呼び出しに使用されるインデックス数 |
pVertex | [in] 頂点データ |
pIndex | [in] インデックスデータ |
vertexStride | [in] 1頂点のサイズ |
indexType | [in] インデックスタイプ |
void GxRenderContext::drawMemory | ( | RENDER_PRIMITIVE_TYPE | type, |
u32 | vertexCount, | ||
const void * | pVertex, | ||
u32 | vertexStride ) |
インデックスなし描画(メインメモリ)
type | [in] プリミティブタイプ |
vertexCount | [in] 呼び出しに使用される頂点数 |
pVertex | [in] 頂点データ |
vertexStride | [in] 1頂点のサイズ |
|
inlineconstexpr |
マーカー終了
name | [in] 名前 |
void GxRenderContext::setAlphaTestState | ( | GxRenderAlphaTestState | state | ) |
アルファテストステートの設定
state | [in] アルファテストステート |
void GxRenderContext::setBlendState | ( | GxRenderBlendState | state | ) |
ブレンドステートの設定
state | [in] ブレンドステート |
シェーダ定数の設定(ブール値)
handle | [in] シェーダパラメータハンドル |
boolean | [in] ブール値 |
void GxRenderContext::setCallback | ( | GxCallback::GxHandlerBase | handle, |
void * | pSource, | ||
u32 | srcSize, | ||
void * | pArgument, | ||
u32 | argumentSize ) |
コールバックの設定
handle | [in] ハンドル |
pSource | [in] 入力 |
srcSize | [in] 入力サイズ |
pArgument | [in] 引数 |
argumentSize | [in] 引数サイズ |
void GxRenderContext::setCallback | ( | GxCallback::GxHandlerBase | handle, |
void * | pSource, | ||
void * | pArgument ) |
コールバックの設定
handle | [in] ハンドル |
pSource | [in] 呼び出し元 |
pArgument | [in] 引数 |
void GxRenderContext::setDepthStencil | ( | GxRenderTexture * | pDepthStencil, |
b32 | readOnly = false ) |
深度ステンシルの設定
pDepthStencil | [in] 深度ステンシルに設定するテクスチャ |
readOnly | [in] 読み込み専用ならtrue |
void GxRenderContext::setDepthTestState | ( | GxRenderDepthTestState | state | ) |
深度テストステートの設定
state | [in] Zテストステート |
void GxRenderContext::setIndexBuffer | ( | GxRenderIndexBuffer * | pIndexBuffer | ) |
インデックスバッファの設定
pIndexBuffer | [in] インデックスバッファ |
void GxRenderContext::setInt4 | ( | GX_HANDLE | handle, |
const s32 | int4[4] ) |
シェーダ定数の設定(s32 4次元ベクトル)
handle | [in] シェーダパラメータハンドル |
int4 | [in] s32 4次元ベクトル |
void GxRenderContext::setMatrix44 | ( | GX_HANDLE | handle, |
const GxMatrix44Gpu & | matrix ) |
シェーダ定数の設定(4x4行列)
handle | [in] シェーダパラメータハンドル |
matrix | [in] マトリクス |
GxMatrix44Gpu * GxRenderContext::setMatrix44Array | ( | GX_HANDLE | handle, |
u32 | count ) |
シェーダ定数の設定(4x4行列配列)
handle | [in] シェーダパラメータハンドル |
count | [in] 配列数 |
void GxRenderContext::setMatrixAffine | ( | GX_HANDLE | handle, |
const GxMatrixAffineGpu & | matrix ) |
シェーダ定数の設定(アフィン変換行列行列)
handle | [in] シェーダパラメータハンドル |
matrix | [in] マトリクス |
GxMatrixAffineGpu * GxRenderContext::setMatrixAffineArray | ( | GX_HANDLE | handle, |
u32 | count ) |
シェーダ定数の設定(アフィン変換行列配列)
handle | [in] シェーダパラメータハンドル |
count | [in] 配列数 |
void GxRenderContext::setPass | ( | RENDER_PASS | pass | ) |
パスの設定(Zプリパス、不透明パスなど)
pass | [in] パス |
void GxRenderContext::setPredication | ( | void * | pFlag, |
u32 | size, | ||
b32 | value ) |
プレディケーションの設定
pFlag | [in] フラグ |
size | [in] サイズ |
value | [in] 値 |
void GxRenderContext::setRenderState | ( | RENDER_STATE | renderState, |
u32 | value ) |
描画ステートの設定
renderState | [in] 描画ステート |
value | [in] 設定する値 |
void GxRenderContext::setRenderTarget | ( | u32 | index, |
GxRenderTexture * | pRenderTarget, | ||
b32 | forceRenderToTexture = false ) |
レンダーターゲットの設定
index | [in] インデックス(0~RENDER_TARGET_COUNT_MAX-1) |
pRenderTarget | [in] レンダーターゲットに設定するテクスチャ |
forceRenderToTexture | [in] (サーフェイスではなく)テクスチャへのレンダリングを強制 |
void GxRenderContext::setSamplerState | ( | GX_HANDLE | handle, |
GxRenderSamplerState | state ) |
サンプラステートの設定
handle | [in] シェーダパラメータハンドル |
state | [in] サンプラステート |
void GxRenderContext::setScissorRect | ( | const GxRect & | rect | ) |
シザリング矩形の設定
rect | [in] シザリング矩形 |
void GxRenderContext::setShader | ( | RENDER_SHADER | renderShader, |
GxRenderShader * | pShader ) |
頂点シェーダの設定
renderShader | [in] シェーダタイプ |
pShader | [in] シェーダ |
void GxRenderContext::setStencilTestState | ( | GxRenderStencilTestState | state, |
u32 | stencilRef, | ||
b32 | stencilTwoSideEnable ) |
ステンシルテストステートの設定
state | [in] ステンシルテストステート |
void GxRenderContext::setSubPriority | ( | u32 | subPriority | ) |
サブプライオリティの設定(パス内での優先度)
subPriority | [in] サブプライオリティ(小さいほど先に描画される) |
void GxRenderContext::setSubPriorityF32 | ( | f32 | subPriority | ) |
サブプライオリティの設定(パス内での優先度)
subPriority | [in] サブプライオリティ 0.0f~1.0f(小さいほど先に描画される) |
void GxRenderContext::setSubView | ( | RENDER_SUB_VIEW | subView | ) |
サブビューの設定(シャドウマップや反射マップなど)
subView | [in] サブビュー |
void GxRenderContext::setTexture | ( | GX_HANDLE | handle, |
GxRenderTexture * | pTexture ) |
テクスチャの設定
handle | [in] シェーダパラメータハンドル |
pTexture | [in] テクスチャ |
シェーダ定数の設定(4次元ベクトル)
handle | [in] シェーダパラメータハンドル |
vector | [in] ベクトル |
シェーダ定数の設定(4次元ベクトル配列)
handle | [in] シェーダパラメータハンドル |
count | [in] 配列数 |
void GxRenderContext::setVertexDeclaration | ( | GxRenderVertexDeclaration * | pVertexDeclaration | ) |
頂点宣言の設定
pVertexDeclaration | [in] 頂点宣言 |
void GxRenderContext::setVertexStream | ( | u32 | slot, |
GxRenderVertexBuffer * | pVertexBuffer, | ||
u32 | offset, | ||
u32 | stride, | ||
RENDER_STREAM_FREQUENCY_TYPE | frequencyType = RENDER_STREAM_FREQUENCY_TYPE::INDEXED ) |
頂点ストリームの設定
slot | [in] スロット(0~RENDER_VERTEX_STREAM_COUNT_MAX-1) |
pVertexBuffer | [in] 頂点バッファ |
offset | [in] 頂点バッファの先頭からのオフセット |
stride | [in] 1頂点の間隔(Byte) |
frequencyType | [in] 頂点頻度タイプ |
void GxRenderContext::setView | ( | RENDER_VIEW | view | ) |
ビューの設定(画面分割など、別のビューポート)
view | [in] ビュー |
void GxRenderContext::setViewport | ( | const GxRect & | rect, |
f32 | nearZ, | ||
f32 | farZ ) |
ビューポートの設定
rect | [in] ビューポート矩形 |
nearZ | [in] Zニアクリップ値 |
farZ | [in] Zファークリップ値 |