11#ifndef INCGUARD_MGL_D3D11_RENDERER_2D_H_1614581032
12#define INCGUARD_MGL_D3D11_RENDERER_2D_H_1614581032
15#if defined(MGL_RENDERER_ENABLE_D3D11)
27namespace MGL::Render::D3D11
49 virtual
void Flush() noexcept override;
50 virtual
void Clear(const
Color &color) noexcept override;
69 bool InitializeRasterizerState() noexcept;
70 bool InitializeBlendState() noexcept;
73 ID3D11Buffer *GetOrthogonalMatrixBuffer() const noexcept;
75 void ChangeObjectRenderer(
ObjectRenderer *objectRenderer) noexcept;
77 void ApplyAnchor(
float *offset, const
Vector2 &size, const
DrawOption2D &option) const noexcept;
79 CComPtr<ID3D11RasterizerState> _mainRasterizerState;
80 CComPtr<ID3D11RasterizerState> _clippedRasterizerState;
81 CComPtr<ID3D11BlendState> _blendState;
83 bool _isEnabledScissor;
Direct3D11用ラインレンダラ
Definition mgl_d3d11_line_renderer.h:29
Direct3D11用オブジェクトレンダラ基底クラス
Definition mgl_d3d11_object_renderer.h:23
Direct3D11用矩形レンダラ
Definition mgl_d3d11_rectangle_renderer.h:27
MGL Direct3D11 2Dレンダラ
Definition mgl_d3d11_renderer_2d.h:31
virtual void DrawSprite(const Vector2 &position, SharedTextureResource textureResource, const Rectangle &sourceRectangle, const DrawOption2D &option=DrawOption2D()) noexcept override
スプライトの描画
Definition mgl_d3d11_renderer_2d.cc:203
virtual void DrawRectangle(const Rectangle &rectangle, const Color &color, const DrawOption2D &option=DrawOption2D()) noexcept override
矩形の描画
Definition mgl_d3d11_renderer_2d.cc:153
virtual void SetScissor(bool isEnabled, const Rectangle &rectangle=Rectangle()) noexcept override
シザーを設定
Definition mgl_d3d11_renderer_2d.cc:355
virtual void Flush() noexcept override
描画の実行
Definition mgl_d3d11_renderer_2d.cc:110
virtual void Clear(const Color &color) noexcept override
描画領域のクリア
Definition mgl_d3d11_renderer_2d.cc:122
virtual SharedTextureResource GetMainRenderTarget() const noexcept override
メインレンダーターゲットを取得
Definition mgl_d3d11_renderer_2d.cc:342
virtual bool IsEnabledScissor() const noexcept override
シザーが有効かどうかを取得
Definition mgl_d3d11_renderer_2d.cc:408
virtual SharedTextureResource GetRenderTarget() const noexcept override
現在のレンダーターゲットを取得
Definition mgl_d3d11_renderer_2d.cc:330
virtual void DrawLine(const Vector2 &start, const Vector2 &end, const Color &color) noexcept override
ラインの描画
Definition mgl_d3d11_renderer_2d.cc:136
virtual bool CanInitialize() const noexcept override
レンダラが初期化可能な状態かを取得
Definition mgl_d3d11_renderer_2d.cc:47
virtual bool SetRenderTarget(SharedTextureResource renderTarget) noexcept override
レンダーターゲットの設定
Definition mgl_d3d11_renderer_2d.cc:290
virtual RendererType GetRendererType() const noexcept override
レンダラタイプを取得
Definition mgl_d3d11_renderer_2d.h:41
Renderer2D() noexcept
コンストラクタ
Definition mgl_d3d11_renderer_2d.cc:24
virtual bool Initialize() noexcept override
初期化処理
Definition mgl_d3d11_renderer_2d.cc:60
virtual Rectangle GetScissorRectangle() const noexcept override
シザー矩形を取得
Definition mgl_d3d11_renderer_2d.cc:420
Direct3D11用スプライトレンダラ
Definition mgl_d3d11_sprite_renderer.h:28
2D描画オプション
Definition mgl_draw_option_2d.h:23
MGL 2Dレンダラデリゲート
Definition mgl_renderer_2d_delegate.h:25
constexpr auto kRendererTypeDirect3D11
Direct3D11用のレンダラタイプを表す値
Definition mgl_d3d11_defs.h:19
RendererType
レンダラタイプの型
Definition mgl_render_types.h:21
std::shared_ptr< MGL::Render::TextureResource > SharedTextureResource
共有するテクスチャリソースの型
Definition mgl_texture_resource.h:145
色情報
Definition mgl_color.h:22
矩形
Definition mgl_rectangle.h:20
2Dベクトル
Definition mgl_vector2.h:23