mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-06 04:33:49 +01:00
Work towards unifying ApplyTexture
This commit is contained in:
1 parent
665ffe34ab
commit
f839f1944e
10 files changed
+47
-25
No files matched your search
@@ -332,6 +332,14 @@ void TextureCacheDX9::UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase
|
||||
clutLastFormat_ = gstate.clutformat;
|
||||
}
|
||||
|
||||
void TextureCacheDX9::BindTexture(TexCacheEntry *entry) {
|
||||
LPDIRECT3DTEXTURE9 texture = DxTex(entry);
|
||||
if (texture != lastBoundTexture) {
|
||||
pD3Ddevice->SetTexture(0, texture);
|
||||
lastBoundTexture = texture;
|
||||
}
|
||||
}
|
||||
|
||||
void TextureCacheDX9::Unbind() {
|
||||
pD3Ddevice->SetTexture(0, NULL);
|
||||
}
|
||||
@@ -382,11 +390,7 @@ void TextureCacheDX9::ApplyTexture() {
|
||||
if (entry->framebuffer) {
|
||||
ApplyTextureFramebuffer(entry, entry->framebuffer);
|
||||
} else {
|
||||
LPDIRECT3DTEXTURE9 texture = DxTex(entry);
|
||||
if (texture != lastBoundTexture) {
|
||||
pD3Ddevice->SetTexture(0, texture);
|
||||
lastBoundTexture = texture;
|
||||
}
|
||||
BindTexture(entry);
|
||||
UpdateSamplingParams(*entry, false);
|
||||
|
||||
gstate_c.textureFullAlpha = entry->GetAlphaStatus() == TexCacheEntry::STATUS_ALPHA_FULL;
|
||||
|
||||
Reference in new issue
Block a user