diff options
author | Jesse Hall <jessehall@google.com> | 2012-06-26 15:36:39 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2012-06-26 15:36:39 -0700 |
commit | 307c6c18a3a6eb80ca2d868853e5b2892ef1c3f8 (patch) | |
tree | 73b40bd8c4dd9bfb6c4b08629f751e5132a9f88f /emulator | |
parent | d10b2b098824aae55d338c80c3b093b37782cbbd (diff) | |
download | sdk-307c6c18a3a6eb80ca2d868853e5b2892ef1c3f8.zip sdk-307c6c18a3a6eb80ca2d868853e5b2892ef1c3f8.tar.gz sdk-307c6c18a3a6eb80ca2d868853e5b2892ef1c3f8.tar.bz2 |
Use linear filtering for colorbuffer textures
Switch the min and mag filters for the ColorBuffer's texture object to
linear instead of nearest. This gives much better results when posting
a colorbuffer to a scaled framebuffer, which happens when the android
screen + emulator skin is too big to fit on the user's display.
The ColorBuffer's own texture object is only actually used as a
texture during post(); when used as a texture by the guest system
(e.g. by surfaceflinger composition) it's mapped through an EGLImage
to a guest-owned texture object, which has its own filter settings. So
we can just change the filter settings for the ColorBuffer texture
object at initialization without affecting anything else.
SDK Bug: 6721429
Change-Id: I8ec81125d076e0ed77a44f8b0dce412fa3cecabf
Diffstat (limited to 'emulator')
-rw-r--r-- | emulator/opengl/host/libs/libOpenglRender/ColorBuffer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/emulator/opengl/host/libs/libOpenglRender/ColorBuffer.cpp b/emulator/opengl/host/libs/libOpenglRender/ColorBuffer.cpp index 681db8b..e50b8ec 100644 --- a/emulator/opengl/host/libs/libOpenglRender/ColorBuffer.cpp +++ b/emulator/opengl/host/libs/libOpenglRender/ColorBuffer.cpp @@ -66,8 +66,8 @@ ColorBuffer *ColorBuffer::create(int p_width, int p_height, texInternalFormat, GL_UNSIGNED_BYTE, zBuff); delete [] zBuff; - s_gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - s_gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + s_gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + s_gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); s_gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); s_gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); s_gl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); |