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 void Flush() noexcept override;
50 void Clear(const
Color &color) noexcept override;
69 bool InitializeRasterizerState() noexcept;
70 bool InitializeBlendState() noexcept;
73 [[nodiscard]] ID3D11Buffer *GetOrthogonalMatrixBuffer() const noexcept;
75 void ChangeObjectRenderer(
ObjectRenderer *objectRenderer) noexcept;
77 static
void ApplyAnchor(
float *offset, const
Vector2 &size, const
DrawOption2D &option) 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
RendererType GetRendererType() const noexcept override
レンダラタイプを取得
Definition mgl_d3d11_renderer_2d.h:41
void Flush() noexcept override
描画の実行
Definition mgl_d3d11_renderer_2d.cc:106
void DrawSprite(const Vector2 &position, SharedTextureResource textureResource, const Rectangle &sourceRectangle, const DrawOption2D &option) noexcept override
スプライトの描画
Definition mgl_d3d11_renderer_2d.cc:199
void Clear(const Color &color) noexcept override
描画領域のクリア
Definition mgl_d3d11_renderer_2d.cc:118
SharedTextureResource GetMainRenderTarget() const noexcept override
メインレンダーターゲットを取得
Definition mgl_d3d11_renderer_2d.cc:338
void SetScissor(bool isEnabled, const Rectangle &rectangle) noexcept override
シザーを設定
Definition mgl_d3d11_renderer_2d.cc:351
bool IsEnabledScissor() const noexcept override
シザーが有効かどうかを取得
Definition mgl_d3d11_renderer_2d.cc:404
SharedTextureResource GetRenderTarget() const noexcept override
現在のレンダーターゲットを取得
Definition mgl_d3d11_renderer_2d.cc:326
void DrawLine(const Vector2 &start, const Vector2 &end, const Color &color) noexcept override
ラインの描画
Definition mgl_d3d11_renderer_2d.cc:132
bool CanInitialize() const noexcept override
レンダラが初期化可能な状態かを取得
Definition mgl_d3d11_renderer_2d.cc:43
bool SetRenderTarget(SharedTextureResource renderTarget) noexcept override
レンダーターゲットの設定
Definition mgl_d3d11_renderer_2d.cc:286
Renderer2D() noexcept
コンストラクタ
Definition mgl_d3d11_renderer_2d.cc:24
void DrawRectangle(const Rectangle &rectangle, const Color &color, const DrawOption2D &option) noexcept override
矩形の描画
Definition mgl_d3d11_renderer_2d.cc:149
bool Initialize() noexcept override
初期化処理
Definition mgl_d3d11_renderer_2d.cc:56
Rectangle GetScissorRectangle() const noexcept override
シザー矩形を取得
Definition mgl_d3d11_renderer_2d.cc:416
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