gsdx-ogl-wnd:

* Patch from miseru to fix VS2010
* Quick fix for 8-bits textures


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5658 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-06-14 16:22:22 +00:00
parent e021630bb9
commit 92a3549e9c
3 changed files with 13 additions and 15 deletions

View File

@ -138,7 +138,7 @@ GSTextureOGL::GSTextureOGL(int type, int w, int h, bool msaa, int format, GLuint
GSTextureOGL::~GSTextureOGL() GSTextureOGL::~GSTextureOGL()
{ {
/* Unbind the texture from our local state */ /* Unbind the texture from our local state */
for (uint i = 0; i < 7; i++) for (uint32 i = 0; i < 7; i++)
if (g_state_texture_id[i] == m_texture_id) if (g_state_texture_id[i] == m_texture_id)
g_state_texture_id[i] = 0; g_state_texture_id[i] = 0;

View File

@ -457,13 +457,12 @@ vec4 sample_4a(vec4 uv)
{ {
vec4 c; vec4 c;
// XXX // Dx used the alpha channel.
// I think .a is related to 8bit texture in alpha channel // Opengl is only 8 bits on red channel.
// Opengl is only 8 bits on red channel. Not sure exactly of the impact c.x = sample_c(uv.xy).r;
c.x = sample_c(uv.xy).a; c.y = sample_c(uv.zy).r;
c.y = sample_c(uv.zy).a; c.z = sample_c(uv.xw).r;
c.z = sample_c(uv.xw).a; c.w = sample_c(uv.zw).r;
c.w = sample_c(uv.zw).a;
return c * 255./256 + 0.5/256; return c * 255./256 + 0.5/256;
} }

View File

@ -485,13 +485,12 @@ static const char* tfx_glsl =
"{\n" "{\n"
" vec4 c;\n" " vec4 c;\n"
"\n" "\n"
" // XXX\n" " // Dx used the alpha channel.\n"
" // I think .a is related to 8bit texture in alpha channel\n" " // Opengl is only 8 bits on red channel.\n"
" // Opengl is only 8 bits on red channel. Not sure exactly of the impact\n" " c.x = sample_c(uv.xy).r;\n"
" c.x = sample_c(uv.xy).a;\n" " c.y = sample_c(uv.zy).r;\n"
" c.y = sample_c(uv.zy).a;\n" " c.z = sample_c(uv.xw).r;\n"
" c.z = sample_c(uv.xw).a;\n" " c.w = sample_c(uv.zw).r;\n"
" c.w = sample_c(uv.zw).a;\n"
"\n" "\n"
" return c * 255./256 + 0.5/256;\n" " return c * 255./256 + 0.5/256;\n"
"}\n" "}\n"