OROCHI
 
Loading...
Searching...
No Matches
GxRenderContext Class Reference

描画コマンドの並列発行を管理します。 More...

#include <GxRenderContext.h>

Inheritance diagram for GxRenderContext:
Collaboration diagram for GxRenderContext:

定義

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次元ベクトル)
 
GxVector4setVectorArray (GX_HANDLE handle, u32 count)
 シェーダ定数の設定(4次元ベクトル配列)
 
void setMatrix44 (GX_HANDLE handle, const GxMatrix44Gpu &matrix)
 シェーダ定数の設定(4x4行列)
 
void setMatrixAffine (GX_HANDLE handle, const GxMatrixAffineGpu &matrix)
 シェーダ定数の設定(アフィン変換行列行列)
 
GxMatrix44GpusetMatrix44Array (GX_HANDLE handle, u32 count)
 シェーダ定数の設定(4x4行列配列)
 
GxMatrixAffineGpusetMatrixAffineArray (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 GxRenderContextgetContext (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

- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 

Detailed Description

描画コマンドの並列発行を管理します。

描画コンテキストクラス

Member Function Documentation

◆ beginMarker()

void GxRenderContext::beginMarker ( GX_CSTR name)
inlineconstexpr

マーカー開始

Parameters
name[in] 名前
Here is the caller graph for this function:

◆ clear()

void GxRenderContext::clear ( u32 clearFlags,
const GxColor clearColor,
f32 clearZ,
u32 clearStencil )

画面クリア

Parameters
clearFlags[in] フラグ
clearColor[in] 色
clearZ[in] Z値
clearStencil[in] ステンシル値
Here is the caller graph for this function:

◆ clearHDR()

void GxRenderContext::clearHDR ( u32 clearFlags,
const GxColorHDR & clearColor,
f32 clearZ,
u32 clearStencil )

画面クリア(HDR)

Parameters
clearFlags[in] フラグ
clearColor[in] 色
clearZ[in] Z値
clearStencil[in] ステンシル値
Here is the caller graph for this function:

◆ copyDepthStencilToTexture()

void GxRenderContext::copyDepthStencilToTexture ( GxRenderTexture * pTexture = nullptr,
u32 dstMipLevel = 0,
const GxRect * pSrcRect = nullptr,
const GxPoint2 * pDstPoint = nullptr )

深度ステンシルをテクスチャにコピーする

Parameters
pTexture[in] テクスチャ
dstMipLevel[in] 出力ミップレベル
pSrcRect[in] 入力矩形
pDstPoint[in] 出力座標
Here is the caller graph for this function:

◆ copyDepthStencilToTextureStretch()

void GxRenderContext::copyDepthStencilToTextureStretch ( GxRenderTexture * pTexture = nullptr,
u32 dstMipLevel = 0,
const GxRect * pSrcRect = nullptr,
const GxRect * pDstRect = nullptr )

深度ステンシルをテクスチャに拡大/縮小コピーする(Xbox版以外)

Parameters
pTexture[in] テクスチャ
dstMipLevel[in] 出力ミップレベル
pSrcRect[in] 入力矩形
pDstRect[in] 出力矩形

◆ copyRenderTargetToTexture()

void GxRenderContext::copyRenderTargetToTexture ( u32 index = 0,
GxRenderTexture * pTexture = nullptr,
u32 dstMipLevel = 0,
const GxRect * pSrcRect = nullptr,
const GxPoint2 * pDstPoint = nullptr )

レンダーターゲットをテクスチャにコピーする

Parameters
index[in] インデックス
pTexture[in] テクスチャ
dstMipLevel[in] 出力ミップレベル
pSrcRect[in] 入力矩形
pDstPoint[in] 出力座標
Here is the caller graph for this function:

◆ copyRenderTargetToTextureStretch()

void GxRenderContext::copyRenderTargetToTextureStretch ( u32 index = 0,
GxRenderTexture * pTexture = nullptr,
u32 dstMipLevel = 0,
const GxRect * pSrcRect = nullptr,
const GxRect * pDstRect = nullptr )

レンダーターゲットをテクスチャに拡大/縮小コピーする(Xbox版以外)

Parameters
index[in] インデックス
pTexture[in] テクスチャ
dstMipLevel[in] 出力ミップレベル
pSrcRect[in] 入力矩形
pDstRect[in] 出力矩形

◆ copyRenderTargetToTextureWithMipmap()

void GxRenderContext::copyRenderTargetToTextureWithMipmap ( u32 index = 0,
GxRenderTexture * pTexture = nullptr )

レンダーターゲットをテクスチャにミップマップつきでコピーする

Parameters
index[in] インデックス
pTexture[in] テクスチャ

◆ draw()

void GxRenderContext::draw ( RENDER_PRIMITIVE_TYPE type,
u32 startVertex,
u32 vertexCount )

インデックスなし描画

Parameters
type[in] プリミティブタイプ
startVertex[in] 開始頂点インデックス
vertexCount[in] 頂点数
Here is the caller graph for this function:

◆ drawIndexed()

void GxRenderContext::drawIndexed ( RENDER_PRIMITIVE_TYPE type,
s32 baseVertexIndex,
u32 minIndex,
u32 vertexCount,
u32 startIndex,
u32 indexCount,
u32 instanceCount = 0,
s32 * pQueryIndex = nullptr )

インデックスあり描画

Parameters
type[in] プリミティブタイプ
baseVertexIndex[in] 開始頂点インデックス
minIndex[in] 呼び出しに使用される最小のインデックス(baseVertexIndexをIndex0として考える)
vertexCount[in] 呼び出しに使用される頂点数
startIndex[in] インデックスバッファの開始インデックス
indexCount[in] インデックス数
instanceCount[in] インスタンス数
pQueryIndex[in] クエリインデックスのアドレス
Here is the caller graph for this function:

◆ drawIndexedMemory()

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 )

インデックスあり描画(メインメモリ)

Parameters
type[in] プリミティブタイプ
minIndex[in] 最小インデックス値
vertexCount[in] 呼び出しに使用される頂点数
indexCount[in] 呼び出しに使用されるインデックス数
pVertex[in] 頂点データ
pIndex[in] インデックスデータ
vertexStride[in] 1頂点のサイズ
indexType[in] インデックスタイプ

◆ drawMemory()

void GxRenderContext::drawMemory ( RENDER_PRIMITIVE_TYPE type,
u32 vertexCount,
const void * pVertex,
u32 vertexStride )

インデックスなし描画(メインメモリ)

Parameters
type[in] プリミティブタイプ
vertexCount[in] 呼び出しに使用される頂点数
pVertex[in] 頂点データ
vertexStride[in] 1頂点のサイズ
Here is the caller graph for this function:

◆ endMarker()

void GxRenderContext::endMarker ( GX_CSTR name)
inlineconstexpr

マーカー終了

Parameters
name[in] 名前
Here is the caller graph for this function:

◆ setAlphaTestState()

void GxRenderContext::setAlphaTestState ( GxRenderAlphaTestState state)

アルファテストステートの設定

Parameters
state[in] アルファテストステート
Here is the caller graph for this function:

◆ setBlendState()

void GxRenderContext::setBlendState ( GxRenderBlendState state)

ブレンドステートの設定

Parameters
state[in] ブレンドステート
Here is the caller graph for this function:

◆ setBoolean()

void GxRenderContext::setBoolean ( GX_HANDLE handle,
b32 boolean )

シェーダ定数の設定(ブール値)

Parameters
handle[in] シェーダパラメータハンドル
boolean[in] ブール値

◆ setCallback() [1/2]

void GxRenderContext::setCallback ( GxCallback::GxHandlerBase handle,
void * pSource,
u32 srcSize,
void * pArgument,
u32 argumentSize )

コールバックの設定

Parameters
handle[in] ハンドル
pSource[in] 入力
srcSize[in] 入力サイズ
pArgument[in] 引数
argumentSize[in] 引数サイズ

◆ setCallback() [2/2]

void GxRenderContext::setCallback ( GxCallback::GxHandlerBase handle,
void * pSource,
void * pArgument )

コールバックの設定

Parameters
handle[in] ハンドル
pSource[in] 呼び出し元
pArgument[in] 引数
Here is the caller graph for this function:

◆ setDepthStencil()

void GxRenderContext::setDepthStencil ( GxRenderTexture * pDepthStencil,
b32 readOnly = false )

深度ステンシルの設定

Parameters
pDepthStencil[in] 深度ステンシルに設定するテクスチャ
readOnly[in] 読み込み専用ならtrue
Here is the caller graph for this function:

◆ setDepthTestState()

void GxRenderContext::setDepthTestState ( GxRenderDepthTestState state)

深度テストステートの設定

Parameters
state[in] Zテストステート
Here is the caller graph for this function:

◆ setIndexBuffer()

void GxRenderContext::setIndexBuffer ( GxRenderIndexBuffer * pIndexBuffer)

インデックスバッファの設定

Parameters
pIndexBuffer[in] インデックスバッファ
Here is the caller graph for this function:

◆ setInt4()

void GxRenderContext::setInt4 ( GX_HANDLE handle,
const s32 int4[4] )

シェーダ定数の設定(s32 4次元ベクトル)

Parameters
handle[in] シェーダパラメータハンドル
int4[in] s32 4次元ベクトル

◆ setMatrix44()

void GxRenderContext::setMatrix44 ( GX_HANDLE handle,
const GxMatrix44Gpu & matrix )

シェーダ定数の設定(4x4行列)

Parameters
handle[in] シェーダパラメータハンドル
matrix[in] マトリクス
Here is the caller graph for this function:

◆ setMatrix44Array()

GxMatrix44Gpu * GxRenderContext::setMatrix44Array ( GX_HANDLE handle,
u32 count )

シェーダ定数の設定(4x4行列配列)

Parameters
handle[in] シェーダパラメータハンドル
count[in] 配列数
Returns
書き込み先メモリ
Here is the caller graph for this function:

◆ setMatrixAffine()

void GxRenderContext::setMatrixAffine ( GX_HANDLE handle,
const GxMatrixAffineGpu & matrix )

シェーダ定数の設定(アフィン変換行列行列)

Parameters
handle[in] シェーダパラメータハンドル
matrix[in] マトリクス
Here is the call graph for this function:

◆ setMatrixAffineArray()

GxMatrixAffineGpu * GxRenderContext::setMatrixAffineArray ( GX_HANDLE handle,
u32 count )

シェーダ定数の設定(アフィン変換行列配列)

Parameters
handle[in] シェーダパラメータハンドル
count[in] 配列数
Returns
書き込み先メモリ
Here is the caller graph for this function:

◆ setPass()

void GxRenderContext::setPass ( RENDER_PASS pass)

パスの設定(Zプリパス、不透明パスなど)

Parameters
pass[in] パス
Here is the caller graph for this function:

◆ setPredication()

void GxRenderContext::setPredication ( void * pFlag,
u32 size,
b32 value )

プレディケーションの設定

Parameters
pFlag[in] フラグ
size[in] サイズ
value[in] 値

◆ setRenderState()

void GxRenderContext::setRenderState ( RENDER_STATE renderState,
u32 value )

描画ステートの設定

Parameters
renderState[in] 描画ステート
value[in] 設定する値
Here is the caller graph for this function:

◆ setRenderTarget()

void GxRenderContext::setRenderTarget ( u32 index,
GxRenderTexture * pRenderTarget,
b32 forceRenderToTexture = false )

レンダーターゲットの設定

Parameters
index[in] インデックス(0~RENDER_TARGET_COUNT_MAX-1)
pRenderTarget[in] レンダーターゲットに設定するテクスチャ
forceRenderToTexture[in] (サーフェイスではなく)テクスチャへのレンダリングを強制
Here is the caller graph for this function:

◆ setSamplerState()

void GxRenderContext::setSamplerState ( GX_HANDLE handle,
GxRenderSamplerState state )

サンプラステートの設定

Parameters
handle[in] シェーダパラメータハンドル
state[in] サンプラステート
Here is the caller graph for this function:

◆ setScissorRect()

void GxRenderContext::setScissorRect ( const GxRect & rect)

シザリング矩形の設定

Parameters
rect[in] シザリング矩形
Here is the caller graph for this function:

◆ setShader()

void GxRenderContext::setShader ( RENDER_SHADER renderShader,
GxRenderShader * pShader )

頂点シェーダの設定

Parameters
renderShader[in] シェーダタイプ
pShader[in] シェーダ
Here is the caller graph for this function:

◆ setStencilTestState()

void GxRenderContext::setStencilTestState ( GxRenderStencilTestState state,
u32 stencilRef,
b32 stencilTwoSideEnable )

ステンシルテストステートの設定

Parameters
state[in] ステンシルテストステート
Here is the caller graph for this function:

◆ setSubPriority()

void GxRenderContext::setSubPriority ( u32 subPriority)

サブプライオリティの設定(パス内での優先度)

Parameters
subPriority[in] サブプライオリティ(小さいほど先に描画される)
Here is the caller graph for this function:

◆ setSubPriorityF32()

void GxRenderContext::setSubPriorityF32 ( f32 subPriority)

サブプライオリティの設定(パス内での優先度)

Parameters
subPriority[in] サブプライオリティ 0.0f~1.0f(小さいほど先に描画される)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSubView()

void GxRenderContext::setSubView ( RENDER_SUB_VIEW subView)

サブビューの設定(シャドウマップや反射マップなど)

Parameters
subView[in] サブビュー
Here is the caller graph for this function:

◆ setTexture()

void GxRenderContext::setTexture ( GX_HANDLE handle,
GxRenderTexture * pTexture )

テクスチャの設定

Parameters
handle[in] シェーダパラメータハンドル
pTexture[in] テクスチャ
Here is the caller graph for this function:

◆ setVector()

void GxRenderContext::setVector ( GX_HANDLE handle,
const GxVector4 & vector )

シェーダ定数の設定(4次元ベクトル)

Parameters
handle[in] シェーダパラメータハンドル
vector[in] ベクトル
Here is the caller graph for this function:

◆ setVectorArray()

GxVector4 * GxRenderContext::setVectorArray ( GX_HANDLE handle,
u32 count )

シェーダ定数の設定(4次元ベクトル配列)

Parameters
handle[in] シェーダパラメータハンドル
count[in] 配列数
Returns
書き込み先メモリ
Here is the caller graph for this function:

◆ setVertexDeclaration()

void GxRenderContext::setVertexDeclaration ( GxRenderVertexDeclaration * pVertexDeclaration)

頂点宣言の設定

Parameters
pVertexDeclaration[in] 頂点宣言
Here is the caller graph for this function:

◆ setVertexStream()

void GxRenderContext::setVertexStream ( u32 slot,
GxRenderVertexBuffer * pVertexBuffer,
u32 offset,
u32 stride,
RENDER_STREAM_FREQUENCY_TYPE frequencyType = RENDER_STREAM_FREQUENCY_TYPE::INDEXED )

頂点ストリームの設定

Parameters
slot[in] スロット(0~RENDER_VERTEX_STREAM_COUNT_MAX-1)
pVertexBuffer[in] 頂点バッファ
offset[in] 頂点バッファの先頭からのオフセット
stride[in] 1頂点の間隔(Byte)
frequencyType[in] 頂点頻度タイプ
Here is the caller graph for this function:

◆ setView()

void GxRenderContext::setView ( RENDER_VIEW view)

ビューの設定(画面分割など、別のビューポート)

Parameters
view[in] ビュー
Here is the caller graph for this function:

◆ setViewport()

void GxRenderContext::setViewport ( const GxRect & rect,
f32 nearZ,
f32 farZ )

ビューポートの設定

Parameters
rect[in] ビューポート矩形
nearZ[in] Zニアクリップ値
farZ[in] Zファークリップ値
Here is the caller graph for this function:

The documentation for this class was generated from the following files: