2 #ifndef __EFFEKSEERRENDERER_DX9_BASE_PRE_H__
3 #define __EFFEKSEERRENDERER_DX9_BASE_PRE_H__
14 #pragma comment(lib, "d3d9.lib")
20 namespace EffekseerRendererDX9
34 #endif // __EFFEKSEERRENDERER_DX9_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>;
71 Effekseer::Backend::ShaderRef StandardShader;
72 Effekseer::Backend::ShaderRef ModelShader;
73 Effekseer::AlphaBlendType Blend;
122 enum class ProxyTextureType
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);
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_DX9_RENDERER_H__
536 #define __EFFEKSEERRENDERER_DX9_RENDERER_H__
545 namespace EffekseerRendererDX9
548 ::Effekseer::Backend::GraphicsDeviceRef CreateGraphicsDevice(LPDIRECT3DDEVICE9 device);
551 using RendererRef = ::Effekseer::RefPtr<Renderer>;
570 static RendererRef
Create(Effekseer::Backend::GraphicsDeviceRef graphicsDevice, int32_t squareMaxCount);
578 static RendererRef
Create(LPDIRECT3DDEVICE9 device, int32_t squareMaxCount);
583 virtual LPDIRECT3DDEVICE9
GetDevice() = 0;
588 virtual void ChangeDevice(LPDIRECT3DDEVICE9 device) = 0;
593 virtual void SetBackground(IDirect3DTexture9* background) = 0;
600 #endif // __EFFEKSEERRENDERER_DX9_RENDERER_H__
virtual void GetDepth(::Effekseer::Backend::TextureRef &texture, DepthReconstructionParameter &reconstructionParam)
Get a depth texture and parameters to reconstruct from z to depth
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
Get a render mode.
virtual void ResetDrawVertexCount()
Reset the number of vertex drawn.
virtual int32_t GetDrawVertexCount() const
Get the number of vertex drawn.
virtual void SetTime(float time)
Set a current time (s)
Definition: EffekseerRendererDX9.h:151
virtual ::Effekseer::Matrix44 GetCameraMatrix() const
Get a camera matrix.
virtual int32_t GetDrawCallCount() const
Get draw call count.
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)
Specify whether maintain gamma color in a linear color space.
virtual LPDIRECT3DDEVICE9 GetDevice()=0
デバイスを取得する。
virtual UVStyle GetBackgroundTextureUVStyle() const
Get an UV Style of background when particles are rendered.
virtual void ResetDrawCallCount()
Reset draw call count.
virtual ::Effekseer::Vector3D GetCameraFrontDirection() const
Get a front direction of camera.
Definition: EffekseerRendererDX9.h:135
virtual ::Effekseer::Matrix44 GetCameraProjectionMatrix() const
Get a camera projection matrix.
virtual void SetLightColor(const ::Effekseer::Color &color)
Specify the color of light.
virtual void SetCommandList(Effekseer::RefPtr< CommandList > commandList)
specify a command list to render. This function is available except DirectX9, DirectX11 and OpenGL.
Definition: EffekseerRendererDX9.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.
virtual void SetTextureUVStyle(UVStyle style)
Set an UV Style of texture when particles are rendered.
virtual void SetBackground(IDirect3DTexture9 *background)=0
背景を設定する。
Definition: EffekseerRendererDX9.h:553
virtual void SetCameraMatrix(const ::Effekseer::Matrix44 &mat)
Set a camera matrix.
virtual void ResetRenderState()=0
レンダーステートを強制的にリセットする。
virtual void SetRenderMode(Effekseer::RenderMode renderMode)
Specify a render mode.
Definition: EffekseerRendererDX9.h:163
virtual void DeleteProxyTexture(Effekseer::Backend::TextureRef &texture)
Delete a proxy 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
Get an UV Style of texture when particles are rendered.
static RendererRef Create(Effekseer::Backend::GraphicsDeviceRef graphicsDevice, int32_t squareMaxCount)
Create an instance.
virtual ::Effekseer::Matrix44 GetProjectionMatrix() const
Get a projection matrix.
virtual void SetBackground(::Effekseer::Backend::TextureRef texture)
Specify a background texture.
virtual bool EndRendering()=0
描画を終了する時に実行する。
virtual void SetLightDirection(const ::Effekseer::Vector3D &direction)
Specifiy the direction of light.
virtual ::Effekseer::RingRendererRef CreateRingRenderer()=0
リングレンダラーを生成する。
Definition: EffekseerRendererDX9.h:128
A callback to distort a background before drawing
Definition: EffekseerRendererDX9.h:82
virtual void SetDepth(::Effekseer::Backend::TextureRef texture, const DepthReconstructionParameter &reconstructionParam)
Specify a depth texture and parameters to reconstruct from z to depth
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()
Get a background texture. Textures are generated by a function specific to each backend or SetBackgro...
virtual const ::Effekseer::Color & GetLightColor() const
Get the color of light.
virtual void NewFrame()
notify that new frame is started.
Definition: EffekseerRendererDX9.h:146
virtual ::Effekseer::MaterialLoaderRef CreateMaterialLoader(::Effekseer::FileInterfaceRef fileInterface=nullptr)=0
Create default material loader.
virtual ::Effekseer::Vector3D GetLightDirection() const
Get the direction of light.
virtual ::Effekseer::Backend::TextureRef CreateProxyTexture(ProxyTextureType type)
Create a proxy texture.
virtual bool OnDistorting(Renderer *renderer)
A callback Don't hold renderer in the instance
Definition: EffekseerRendererDX9.h:100
virtual void SetBackgroundTextureUVStyle(UVStyle style)
Set an UV Style of background when particles are rendered.
virtual void SetDistortingCallback(DistortingCallback *callback)=0
背景を歪ませるエフェクトが描画される前に呼ばれるコールバックを設定する。
virtual void ChangeDevice(LPDIRECT3DDEVICE9 device)=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
Get the graphics device
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
Get a current time (s)
Specify a shader for renderer from external class.
Definition: EffekseerRendererDX9.h:69