mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 17:59:08 +02:00
Merge pull request #5905 from raven02/patch-9
Define texture level mode and set bias in constant mode
This commit is contained in:
commit
669dc74eb0
2 files changed
+18
-1
No files matched your search
@@ -504,7 +504,18 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
|
||||
float lodBias = (float)(int)(s8)((gstate.texlevel >> 16) & 0xFF) / 16.0f;
|
||||
if (force || entry.lodBias != lodBias) {
|
||||
#ifndef USING_GLES2
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, lodBias);
|
||||
int mode = gstate.texlevel & 0x3;
|
||||
switch (mode) {
|
||||
case GE_TEXBIAS_MODE_AUTO:
|
||||
// TODO
|
||||
break;
|
||||
case GE_TEXBIAS_MODE_CONST:
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, lodBias);
|
||||
break;
|
||||
case GE_TEXBIAS_MODE_SLOPE:
|
||||
// TODO
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
entry.lodBias = lodBias;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,12 @@ enum FramebufferNotification {
|
||||
NOTIFY_FB_DESTROYED,
|
||||
};
|
||||
|
||||
enum TextureLevelMode {
|
||||
GE_TEXBIAS_MODE_AUTO = 0,
|
||||
GE_TEXBIAS_MODE_CONST = 1,
|
||||
GE_TEXBIAS_MODE_SLOPE = 2,
|
||||
};
|
||||
|
||||
class TextureCache {
|
||||
public:
|
||||
TextureCache();
|
||||
|
||||
Reference in new issue
Block a user