2 #ifndef __EFFEKSEERRENDERER_DX11_BASE_PRE_H__
3 #define __EFFEKSEERRENDERER_DX11_BASE_PRE_H__
14 #pragma comment(lib, "d3d11.lib")
20 namespace EffekseerRendererDX11
34 #endif // __EFFEKSEERRENDERER_DX11_PRE_BASE_H__
36 #ifndef __EFFEKSEERRENDERER_RENDERER_H__
37 #define __EFFEKSEERRENDERER_RENDERER_H__
42 #include <Effekseer.h>
58 namespace EffekseerRenderer
62 using RendererRef = ::Effekseer::RefPtr<Renderer>;
69 struct ExternalShaderSettings
71 Effekseer::Backend::ShaderRef StandardShader;
72 Effekseer::Backend::ShaderRef ModelShader;
73 Effekseer::AlphaBlendType Blend;
82 class DistortingCallback
88 virtual ~DistortingCallback()
122 enum class ProxyTextureType
128 class CommandList :
public ::Effekseer::IReference
131 CommandList() =
default;
132 virtual ~CommandList() =
default;
135 class SingleFrameMemoryPool :
public ::Effekseer::IReference
138 SingleFrameMemoryPool() =
default;
139 virtual ~SingleFrameMemoryPool() =
default;
151 struct DepthReconstructionParameter
153 float DepthBufferScale = 1.0f;
154 float DepthBufferOffset = 0.0f;
155 float ProjectionMatrix33 = 0.0f;
156 float ProjectionMatrix34 = 0.0f;
157 float ProjectionMatrix43 = 0.0f;
158 float ProjectionMatrix44 = 0.0f;
161 ::Effekseer::ModelLoaderRef CreateModelLoader(::Effekseer::Backend::GraphicsDeviceRef gprahicsDevice, ::Effekseer::FileInterfaceRef fileInterface =
nullptr);
163 class Renderer :
public ::Effekseer::IReference
170 std::unique_ptr<Impl> impl;
284 virtual void SetCameraParameter(const ::Effekseer::Vector3D& front, const ::Effekseer::Vector3D& position);
314 virtual ::Effekseer::TextureLoaderRef
CreateTextureLoader(::Effekseer::FileInterfaceRef fileInterface =
nullptr) = 0;
319 virtual ::Effekseer::ModelLoaderRef
CreateModelLoader(::Effekseer::FileInterfaceRef fileInterface =
nullptr) = 0;
327 virtual ::Effekseer::MaterialLoaderRef
CreateMaterialLoader(::Effekseer::FileInterfaceRef fileInterface =
nullptr) = 0;
384 virtual void SetRenderMode(Effekseer::RenderMode renderMode);
426 virtual void SetTime(
float time);
444 virtual const ::Effekseer::Backend::TextureRef&
GetBackground();
451 virtual void SetBackground(::Effekseer::Backend::TextureRef texture);
518 #endif // __EFFEKSEERRENDERER_RENDERER_H__
519 #ifndef __EFFEKSEERRENDERER_TEXTURELOADER_H__
520 #define __EFFEKSEERRENDERER_TEXTURELOADER_H__
522 #include <Effekseer.h>
524 namespace EffekseerRenderer
527 ::Effekseer::TextureLoaderRef CreateTextureLoader(::Effekseer::Backend::GraphicsDeviceRef gprahicsDevice,
528 ::Effekseer::FileInterfaceRef fileInterface =
nullptr,
529 ::Effekseer::ColorSpaceType colorSpaceType = ::Effekseer::ColorSpaceType::Gamma);
533 #endif // __EFFEKSEERRENDERER_TEXTURELOADER_H__
535 #ifndef __EFFEKSEERRENDERER_DX11_RENDERER_H__
536 #define __EFFEKSEERRENDERER_DX11_RENDERER_H__
545 namespace EffekseerRendererDX11
551 ::Effekseer::Backend::GraphicsDeviceRef CreateGraphicsDevice(ID3D11Device* device,
552 ID3D11DeviceContext* context);
554 ::Effekseer::MaterialLoaderRef CreateMaterialLoader(::Effekseer::Backend::GraphicsDeviceRef graphicsDevice, ::Effekseer::FileInterfaceRef fileInterface =
nullptr);
556 ::Effekseer::Backend::TextureRef CreateTexture(::Effekseer::Backend::GraphicsDeviceRef gprahicsDevice, ID3D11ShaderResourceView* srv, ID3D11RenderTargetView* rtv, ID3D11DepthStencilView* dsv);
567 ID3D11ShaderResourceView* ShaderResourceViewPtr =
nullptr;
568 ID3D11RenderTargetView* RenderTargetViewPtr =
nullptr;
569 ID3D11DepthStencilView* DepthStencilViewPtr =
nullptr;
572 TextureProperty GetTextureProperty(::Effekseer::Backend::TextureRef texture);
575 using RendererRef = ::Effekseer::RefPtr<Renderer>;
600 static RendererRef
Create(::Effekseer::Backend::GraphicsDeviceRef graphicsDevice,
601 int32_t squareMaxCount,
602 D3D11_COMPARISON_FUNC depthFunc = D3D11_COMPARISON_LESS_EQUAL,
603 bool isMSAAEnabled =
false);
617 static RendererRef
Create(ID3D11Device* device,
618 ID3D11DeviceContext* context,
619 int32_t squareMaxCount,
620 D3D11_COMPARISON_FUNC depthFunc = D3D11_COMPARISON_LESS_EQUAL,
621 bool isMSAAEnabled =
false);
623 virtual ID3D11Device* GetDevice() = 0;
625 virtual ID3D11DeviceContext* GetContext() = 0;
631 [[deprecated(
"please use EffekseerRenderer::SetBackground")]]
virtual void SetBackground(ID3D11ShaderResourceView* background) = 0;
649 #endif // __EFFEKSEERRENDERER_DX11_RENDERER_H__
virtual void GetDepth(::Effekseer::Backend::TextureRef &texture, DepthReconstructionParameter &reconstructionParam)
深度画像とZから深度を復元するためのパラメーターを取得する。
virtual void SetExternalShaderSettings(const std::shared_ptr< ExternalShaderSettings > &settings)
Specify external shader settings
virtual void SetCameraParameter(const ::Effekseer::Vector3D &front, const ::Effekseer::Vector3D &position)
Set a front direction and position of camera manually
virtual Effekseer::RenderMode GetRenderMode() const
描画モードを取得する。
virtual void ResetDrawVertexCount()
描画された頂点数をリセットする
virtual int32_t GetDrawVertexCount() const
描画された頂点数をリセットする
virtual void SetTime(float time)
現在の時間を設定する。(秒)
Definition: EffekseerRendererDX9.h:151
virtual ::Effekseer::Matrix44 GetCameraMatrix() const
Get a camera matrix
virtual int32_t GetDrawCallCount() const
ドローコールの回数を取得する
virtual std::shared_ptr< ExternalShaderSettings > GetExternalShaderSettings() const
Get external shader settings
virtual ::Effekseer::TextureLoaderRef CreateTextureLoader(::Effekseer::FileInterfaceRef fileInterface=nullptr)=0
標準のテクスチャ読込クラスを生成する。
virtual void SetMaintainGammaColorInLinearColorSpace(bool value)
リニア空間でもガンマカラーを維持するようにするか、を設定する。
virtual UVStyle GetBackgroundTextureUVStyle() const
パーティクルを描画するときの背景のUVの状態を取得する。
virtual void ResetDrawCallCount()
ドローコールの回数をリセットする
virtual ::Effekseer::Vector3D GetCameraFrontDirection() const
Get a front direction of camera
Definition: EffekseerRendererDX11.h:577
virtual ::Effekseer::Matrix44 GetCameraProjectionMatrix() const
Get a camera projection matrix
virtual void SetLightColor(const ::Effekseer::Color &color)
Specify the color of light
virtual void ResetStateForDefferedContext()=0
DefferedContextのために、内部の状態をリセットする。
virtual void SetCommandList(Effekseer::RefPtr< CommandList > commandList)
描画に使用するコマンドリストを設定する。この関数はDirectX9、DirectX11、OpenGL以外で使用できる。
Definition: EffekseerRendererDX11.h:433
virtual ::Effekseer::RibbonRendererRef CreateRibbonRenderer()=0
リボンレンダラーを生成する。
virtual void SetLightAmbientColor(const ::Effekseer::Color &color)
Specify the color of ambient
Impl * GetImpl()
only for Effekseer backend developer. Effekseer User doesn't need it.
static RendererRef Create(::Effekseer::Backend::GraphicsDeviceRef graphicsDevice, int32_t squareMaxCount, D3D11_COMPARISON_FUNC depthFunc=D3D11_COMPARISON_LESS_EQUAL, bool isMSAAEnabled=false)
インスタンスを生成する。
virtual void SetTextureUVStyle(UVStyle style)
パーティクルを描画するときのUVの状態を設定する。
virtual void SetCameraMatrix(const ::Effekseer::Matrix44 &mat)
Set a camera matrix
virtual void ResetRenderState()=0
レンダーステートを強制的にリセットする。
virtual void SetRenderMode(Effekseer::RenderMode renderMode)
描画モードを設定する。
Definition: EffekseerRendererDX9.h:163
virtual void DeleteProxyTexture(Effekseer::Backend::TextureRef &texture)
代替のテクスチャを削除する
virtual bool BeginRendering()=0
描画を開始する時に実行する。
virtual ::Effekseer::SpriteRendererRef CreateSpriteRenderer()=0
スプライトレンダラーを生成する。
virtual void SetProjectionMatrix(const ::Effekseer::Matrix44 &mat)
Set a projection matrix
virtual UVStyle GetTextureUVStyle() const
パーティクルを描画するときのUVの状態を取得する。
virtual ::Effekseer::Matrix44 GetProjectionMatrix() const
Get a projection matrix
virtual void SetBackground(::Effekseer::Backend::TextureRef texture)
背景のテクスチャを設定する。
virtual bool EndRendering()=0
描画を終了する時に実行する。
virtual void SetLightDirection(const ::Effekseer::Vector3D &direction)
Specifiy the direction of light
virtual ::Effekseer::RingRendererRef CreateRingRenderer()=0
リングレンダラーを生成する。
テクスチャ内のプロパティ
Definition: EffekseerRendererDX11.h:565
virtual void SetDepth(::Effekseer::Backend::TextureRef texture, const DepthReconstructionParameter &reconstructionParam)
深度画像とZから深度を復元するためのパラメーターを設定する。
virtual ::Effekseer::TrackRendererRef CreateTrackRenderer()=0
軌跡レンダラーを生成する。
virtual void SetRestorationOfStatesFlag(bool flag)=0
ステートを復帰するかどうかのフラグを設定する。
virtual void OnLostDevice()=0
デバイスロストが発生した時に実行する。
virtual void OnResetDevice()=0
デバイスがリセットされた時に実行する。
virtual const ::Effekseer::Backend::TextureRef & GetBackground()
背景を取得する。
virtual const ::Effekseer::Color & GetLightColor() const
Get the color of light
virtual void NewFrame()
新規フレームが始ったことを通知する。
Definition: EffekseerRendererDX11.h:146
virtual ::Effekseer::MaterialLoaderRef CreateMaterialLoader(::Effekseer::FileInterfaceRef fileInterface=nullptr)=0
標準のマテリアル読込クラスを生成する。
virtual ::Effekseer::Vector3D GetLightDirection() const
Get the direction of light
virtual ::Effekseer::Backend::TextureRef CreateProxyTexture(ProxyTextureType type)
代替のテクスチャを生成する
virtual bool OnDistorting(Renderer *renderer)
コールバック
Definition: EffekseerRendererDX11.h:100
virtual void SetBackgroundTextureUVStyle(UVStyle style)
パーティクルを描画するときの背景のUVの状態を設定する。
virtual void SetDistortingCallback(DistortingCallback *callback)=0
背景を歪ませるエフェクトが描画される前に呼ばれるコールバックを設定する。
virtual void SetBackground(ID3D11ShaderResourceView *background)=0
背景を設定する
virtual ::Effekseer::ModelLoaderRef CreateModelLoader(::Effekseer::FileInterfaceRef fileInterface=nullptr)=0
標準のモデル読込クラスを生成する。
virtual ::Effekseer::Vector3D GetCameraPosition() const
Get a position of camera
virtual Effekseer::Backend::GraphicsDeviceRef GetGraphicsDevice() const
グラフィクスデバイスを取得する。
virtual ::Effekseer::ModelRendererRef CreateModelRenderer()=0
モデルレンダラーを生成する。
virtual const ::Effekseer::Color & GetLightAmbientColor() const
Get the color of ambient
virtual DistortingCallback * GetDistortingCallback()=0
背景を歪ませるエフェクトが描画される前に呼ばれるコールバックを取得する。
virtual int32_t GetSquareMaxCount() const =0
最大描画スプライト数を取得する。
virtual float GetTime() const
現在の時間を取得する。(秒)