43 ID3D11ShaderResourceView*
View()
const {
return view.Get();}
48 Microsoft::WRL::ComPtr<ID3D11Resource>
resource;
49 Microsoft::WRL::ComPtr<ID3D11ShaderResourceView>
view;
50 Microsoft::WRL::ComPtr<ID3D11Texture2D>
staging;
64 Microsoft::WRL::ComPtr<ID3D11Texture2D>
texture;
65 Microsoft::WRL::ComPtr<ID3D11RenderTargetView>
target;
87 Microsoft::WRL::ComPtr<ID3D11Query>
query;
205 {
return sprite.
Draw(image ? image->
View() :
nullptr,rectangle,center,position,color);}
250 std::unique_ptr<DrawContext11::Saved>
saved;
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
SCRIPT_CONTROL SCRIPT_STATE const void SCRIPT_CONTROL SCRIPT_STATE const int SCRIPT_TABDEF const BYTE SCRIPT_STRING_ANALYSIS BOOL
SCRIPT_CONTROL SCRIPT_STATE const void DWORD
ID3D11DeviceContext * Context() const
ID3D11Device * Device() const
void Scissor(const RECT &value)
bool Metrics(TEXTMETRICW &result) const
HRESULT Initialize(ID3D11Device *device, const LOGFONTW &description)
HRESULT Lock(UINT offset, UINT size, void **destination, bool readOnly=false, bool discard=false)
DWORD GetBufferSize() const
std::vector< uint8_t > bytes
void * GetBufferPointer()
HRESULT Lock(UINT offset, UINT bytes, void **output, DWORD flags)
HRESULT Create(RenderDevice &owner, UINT bytes, DWORD usage, bool index=false, bool indices32=false)
HRESULT DrawPrimitive(Primitive type, UINT first, UINT count)
HRESULT GetFVF(DWORD *value) const
HRESULT CreateStateBlock(UINT type, RenderStateSnapshot **result)
HRESULT SetIndices(RenderBuffer *buffer)
HRESULT SetPixelShader(std::nullptr_t)
HRESULT GetViewport(Viewport *value) const
UINT GetAvailableTextureMem() const
std::array< Light, 8 > lights
HRESULT SetStreamSource(UINT stream, RenderBuffer *buffer, UINT offset, UINT stride)
HRESULT SetMaterial(const Material *value)
HRESULT LightEnable(DWORD index, BOOL enabled)
HRESULT GetRenderState(DWORD state, DWORD *value) const
HRESULT SetLight(DWORD index, const Light *value)
ID3D11DeviceContext * Context()
HRESULT CreateIndexBuffer(UINT bytes, DWORD usage, ImageFormat format, ResourcePool pool, RenderBuffer **result, void *shared)
Microsoft::WRL::ComPtr< RenderBuffer > vertices
HRESULT SetClipPlane(DWORD index, const float *value)
HRESULT SetRenderState(DWORD state, DWORD value)
std::array< bool, 8 > enabled
HRESULT GetTransform(DWORD slot, RiseMath::Matrix *value) const
HRESULT SetFVF(DWORD value)
HRESULT SetViewport(const Viewport *value)
HRESULT Layout(VertexLayout11 &result, UINT stride) const
HRESULT SetScissorRect(const RECT *value)
HRESULT CreateQuery(UINT type, RenderQuery **result)
RenderDevice(DrawContext11 &draws)
HRESULT SetTransform(DWORD slot, const RiseMath::Matrix *value)
HRESULT DrawPrimitiveUP(Primitive type, UINT count, const void *vertices, UINT stride)
HRESULT Clear(DWORD count, const RECT *rectangles, DWORD flags, PackedColor color, float depth, DWORD stencil)
friend class RenderSprite
std::map< DWORD, DWORD > states
std::array< std::array< DWORD, 3 >, 8 > filters
HRESULT CreateVertexBuffer(UINT bytes, DWORD usage, DWORD format, ResourcePool pool, RenderBuffer **result, void *shared)
HRESULT SetTextureStageState(DWORD stage, DWORD state, DWORD value)
HRESULT SetTexture(DWORD stage, RenderTexture *texture)
HRESULT GetScissorRect(RECT *value) const
HRESULT DrawIndexedPrimitive(Primitive type, INT baseVertex, UINT minimum, UINT vertices, UINT startIndex, UINT count)
HRESULT GetBackBuffer(UINT chain, UINT buffer, UINT type, RenderSurface **result)
Microsoft::WRL::ComPtr< RenderBuffer > indices
RenderSprite * activeSprite
HRESULT SetSamplerState(DWORD sampler, DWORD state, DWORD value)
HRESULT SetVertexShader(std::nullptr_t)
HRESULT Restore(const Saved &value)
std::unique_ptr< RenderSprite > automatic
INT DrawTextW(RenderSprite *sprite, const wchar_t *text, INT count, RECT *rectangle, DWORD flags, PackedColor color)
INT DrawTextA(RenderSprite *sprite, const char *text, INT count, RECT *rectangle, DWORD flags, PackedColor color)
HRESULT Initialize(const LOGFONTW &description)
RenderFont(RenderDevice &owner)
INT DrawFixedTextW(RenderSprite *sprite, const wchar_t *text, INT count, RECT *rectangle, DWORD flags, PackedColor color)
BOOL GetTextMetricsW(TEXTMETRICW *result) const
HRESULT SetInt(const char *name, int value)
HRESULT SetVectorArray(const char *name, const RiseMath::Vector4 *value, UINT count)
HRESULT SetValue(const char *name, const void *value, UINT bytes)
HRESULT SetVector(const char *name, const RiseMath::Vector4 *value)
HRESULT SetFloat(const char *name, float value)
HRESULT SetIntArray(const char *name, const int *value, UINT count)
HRESULT Begin(UINT *count, DWORD flags)
HRESULT BeginPass(UINT pass)
RenderMaterial(RenderDevice &owner)
HRESULT SetTexture(const char *name, RenderTexture *value)
HRESULT SetMatrix(const char *name, const RiseMath::Matrix *value)
HRESULT SetTechnique(const char *name)
HRESULT Initialize(RenderDevice &owner)
Microsoft::WRL::ComPtr< ID3D11Query > query
HRESULT Issue(DWORD flags)
HRESULT GetData(void *destination, DWORD bytes, DWORD flags)
virtual ~RenderResource()=default
std::atomic< ULONG > references
std::array< DWORD, 3 > filters
RenderSprite(RenderDevice &owner)
HRESULT Begin(DWORD flags)
HRESULT SetTransform(const RiseMath::Matrix *value)
HRESULT SetSamplerState(DWORD state, DWORD value)
HRESULT GetTransform(RiseMath::Matrix *value) const
RenderSprite * previousSprite
HRESULT Draw(RenderTexture *image, const RECT *rectangle, const RiseMath::Vector3 *center, const RiseMath::Vector3 *position, PackedColor color)
RenderDevice::Saved saved
RenderStateSnapshot(RenderDevice &owner)
Microsoft::WRL::ComPtr< ID3D11Texture2D > texture
ID3D11RenderTargetView * Target() const
HRESULT GetDesc(SurfaceDescription *result) const
ID3D11Texture2D * Native() const
HRESULT Initialize(RenderDevice &owner, ID3D11Texture2D *texture, UINT level)
Microsoft::WRL::ComPtr< ID3D11RenderTargetView > target
HRESULT Load(RenderDevice &owner, const wchar_t *path, UINT levels=0, UINT width=0, UINT height=0)
ID3D11Resource * Native() const
HRESULT GetSurfaceLevel(UINT level, RenderSurface **result)
Microsoft::WRL::ComPtr< ID3D11DeviceContext > mappedContext
Microsoft::WRL::ComPtr< ID3D11ShaderResourceView > view
Microsoft::WRL::ComPtr< ID3D11Texture2D > staging
Microsoft::WRL::ComPtr< ID3D11Resource > resource
HRESULT GetLevelDesc(UINT level, SurfaceDescription *result) const
UINT GetLevelCount() const
ID3D11ShaderResourceView * View() const
HRESULT Adopt(RenderDevice &owner, Texture11 &texture, UINT requestedLevels)
HRESULT Create(RenderDevice &owner, UINT width, UINT height, UINT levels, DWORD usage, ImageFormat format)
HRESULT LockRect(UINT level, LockedRectangle *result, const RECT *region, DWORD flags)
HRESULT UnlockRect(UINT level)
RenderToTexture(RenderDevice &owner)
HRESULT EndScene(DWORD filter)
std::unique_ptr< DrawContext11::Saved > saved
HRESULT BeginScene(RenderSurface *surface, const Viewport *viewport)
HRESULT Initialize(UINT width, UINT height, bool hasDepth)
HRESULT Initialize(ID3D11Device *device, const std::filesystem::path &shaderDirectory={})
const Matrix & Transform() const
void SetTransform(const Matrix &value)
HRESULT Draw(ID3D11ShaderResourceView *texture, const RECT *source=nullptr, const Vector *center=nullptr, const Vector *position=nullptr, uint32_t color=0xffffffff)
constexpr uint32_t LINEAR
constexpr uint32_t ANISOTROPIC
constexpr uint32_t READONLY
constexpr uint32_t DISCARD
HRESULT LoadTextureMemory(RenderDevice *owner, const void *data, UINT bytes, RenderTexture **result, UINT levels=0)
ImageFormat ClientFormat(DXGI_FORMAT format)
HRESULT CreateRenderToSurface(RenderDevice *owner, UINT width, UINT height, ImageFormat format, BOOL depth, ImageFormat depthFormat, RenderToTexture **result)
HRESULT SaveSurfaceToFile(const wchar_t *path, ImageFile format, RenderSurface *surface, const void *, const RECT *crop)
HRESULT SaveSurfaceToMemory(ImageBuffer **result, ImageFile format, RenderSurface *surface, const void *, const RECT *crop)
HRESULT CreateFontW(RenderDevice *owner, INT height, UINT width, UINT weight, UINT mipLevels, BOOL italic, DWORD charset, DWORD precision, DWORD quality, DWORD pitch, const wchar_t *face, RenderFont **result)
DXGI_FORMAT NativeFormat(ImageFormat format)
HRESULT CreateSprite(RenderDevice *owner, RenderSprite **result)
HRESULT SaveTextureToFile(const wchar_t *path, ImageFile format, RenderTexture *texture, const void *)
HRESULT LoadTexture(RenderDevice *owner, const wchar_t *path, RenderTexture **result, UINT levels=0, UINT width=0, UINT height=0)
HRESULT CreateFontA(RenderDevice *owner, INT height, UINT width, UINT weight, UINT mipLevels, BOOL italic, DWORD charset, DWORD precision, DWORD quality, DWORD pitch, const char *face, RenderFont **result)
HRESULT CreateTexture(RenderDevice *owner, UINT width, UINT height, UINT levels, DWORD usage, ImageFormat format, ResourcePool pool, RenderTexture **result)
std::map< DWORD, DWORD > states
DrawContext11::Saved draws
std::array< Light, 8 > lights
Microsoft::WRL::ComPtr< RenderBuffer > vertices
std::array< std::array< DWORD, 3 >, 8 > filters
Microsoft::WRL::ComPtr< RenderBuffer > indices
std::array< bool, 8 > enabled