mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Let's specify MAX_LOD whether it works or not on gles 2...
This commit is contained in:
1 parent
8144715e0b
commit
87c9aa99c2
2 files changed
+12
-7
No files matched your search
@@ -221,8 +221,8 @@ FramebufferManager::VirtualFramebuffer *FramebufferManager::GetDisplayFBO() {
|
||||
void GetViewportDimensions(int *w, int *h) {
|
||||
float vpXa = getFloat24(gstate.viewportx1);
|
||||
float vpYa = getFloat24(gstate.viewporty1);
|
||||
*w = fabsf(vpXa * 2);
|
||||
*h = fabsf(vpYa * 2);
|
||||
*w = (int)fabsf(vpXa * 2);
|
||||
*h = (int)fabsf(vpYa * 2);
|
||||
}
|
||||
|
||||
void FramebufferManager::SetRenderFrameBuffer() {
|
||||
@@ -284,8 +284,8 @@ void FramebufferManager::SetRenderFrameBuffer() {
|
||||
vfb->z_stride = z_stride;
|
||||
vfb->width = drawing_width;
|
||||
vfb->height = drawing_height;
|
||||
vfb->renderWidth = drawing_width * renderWidthFactor;
|
||||
vfb->renderHeight = drawing_height * renderHeightFactor;
|
||||
vfb->renderWidth = (u16)(drawing_width * renderWidthFactor);
|
||||
vfb->renderHeight = (u16)(drawing_height * renderHeightFactor);
|
||||
vfb->format = fmt;
|
||||
|
||||
vfb->colorDepth = FBO_8888;
|
||||
|
||||
@@ -390,11 +390,16 @@ static const GLuint MagFiltGL[2] = {
|
||||
GL_LINEAR
|
||||
};
|
||||
|
||||
// OpenGL ES 2.0 workaround. Let's see if this hackery works.
|
||||
// OpenGL ES 2.0 workaround. This SHOULD be available but is NOT in the headers in Android.
|
||||
// Let's see if this hackery works.
|
||||
#ifndef GL_TEXTURE_LOD_BIAS
|
||||
#define GL_TEXTURE_LOD_BIAS 0x8501
|
||||
#endif
|
||||
|
||||
#ifndef GL_TEXTURE_MAX_LOD
|
||||
#define GL_TEXTURE_MAX_LOD 0x813B
|
||||
#endif
|
||||
|
||||
// This should not have to be done per texture! OpenGL is silly yo
|
||||
// TODO: Dirty-check this against the current texture.
|
||||
void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
|
||||
@@ -813,9 +818,9 @@ void TextureCache::SetTexture() {
|
||||
LoadTextureLevel(entry, i);
|
||||
}
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, entry.maxLevel);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, entry.maxLevel);
|
||||
#endif
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, (float)entry.maxLevel);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4.0);
|
||||
|
||||
UpdateSamplingParams(entry, true);
|
||||
|
||||
|
||||
Reference in new issue
Block a user