Work towards unifying ApplyTexture

This commit is contained in:
Henrik Rydgard committed 2017-02-19 23:07:00 +01:00
1 parent 665ffe34ab
commit f839f1944e
10 files changed
+47 -25

No files matched your search

+8 -4
View File
@@ -385,6 +385,13 @@ bool SetDebugTexture() {
}
#endif
void TextureCacheGLES::BindTexture(TexCacheEntry *entry) {
if (entry->textureName != lastBoundTexture) {
glBindTexture(GL_TEXTURE_2D, entry->textureName);
lastBoundTexture = entry->textureName;
}
}
void TextureCacheGLES::Unbind() {
glBindTexture(GL_TEXTURE_2D, 0);
}
@@ -434,10 +441,7 @@ void TextureCacheGLES::ApplyTexture() {
if (entry->framebuffer) {
ApplyTextureFramebuffer(entry, entry->framebuffer);
} else {
if (entry->textureName != lastBoundTexture) {
glBindTexture(GL_TEXTURE_2D, entry->textureName);
lastBoundTexture = entry->textureName;
}
BindTexture(entry);
UpdateSamplingParams(*entry, false);
gstate_c.textureFullAlpha = entry->GetAlphaStatus() == TexCacheEntry::STATUS_ALPHA_FULL;