mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-10 18:18:49 +00:00
AbstractTexture: Move Bind() method to Renderer
This makes state tracking simpler, and enables easier porting to command lists later on.
This commit is contained in:
parent
fca56d532a
commit
38e0b6e2ab
23 changed files with 70 additions and 90 deletions
|
@ -733,11 +733,24 @@ void Renderer::SetDepthState(const DepthState& state)
|
|||
m_gx_state.zmode.hex = state.hex;
|
||||
}
|
||||
|
||||
void Renderer::SetTexture(u32 index, const AbstractTexture* texture)
|
||||
{
|
||||
D3D::stateman->SetTexture(
|
||||
index,
|
||||
texture ? static_cast<const DXTexture*>(texture)->GetRawTexIdentifier()->GetSRV() : nullptr);
|
||||
}
|
||||
|
||||
void Renderer::SetSamplerState(u32 index, const SamplerState& state)
|
||||
{
|
||||
m_gx_state.samplers[index].hex = state.hex;
|
||||
}
|
||||
|
||||
void Renderer::UnbindTexture(const AbstractTexture* texture)
|
||||
{
|
||||
D3D::stateman->UnsetTexture(
|
||||
static_cast<const DXTexture*>(texture)->GetRawTexIdentifier()->GetSRV());
|
||||
}
|
||||
|
||||
void Renderer::SetInterlacingMode()
|
||||
{
|
||||
// TODO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue