<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src/pvr2</tt></b></td></tr>
<tr><td><tt><a href="#file1">shaders.glsl</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+2</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-2</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">34e696c3a56f -> f50407acc682</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file2">texcache.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+13</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-12</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">34e696c3a56f -> f50407acc682</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+15</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-14</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >2 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Make palette textures 2D (1 pixel high) instead of 1D - pretty much the
same, but some systems don't support 1D textures
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/pvr2</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>shaders.glsl</b></big> <small id="info" style="color: #888888;" >34e696c3a56f -> f50407acc682</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/pvr2/shaders.glsl
+++ lxdream/src/pvr2/shaders.glsl
@@ -80,13 +80,13 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #fragment DEFAULT_FRAGMENT_SHADER
 
 uniform sampler2D primary_texture;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-uniform sampler<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >1</span>D palette_texture;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+uniform sampler<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >2</span>D palette_texture;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 void main()
 {
        vec4 tex = texture2D( primary_texture, gl_TexCoord[0].xy );
        if( gl_TexCoord[0].z >= 0.0 ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-       tex = texture1D( palette_texture, gl_TexCoord[0].z + (tex.a*0.249023) );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+         tex = texture2D( palette_texture, vec2(gl_TexCoord[0].z + (tex.a*0.249023),0.5) );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >    }
        /* HACK: unfortunately we have to maintain compatibility with GLSL 1.20,
         * which only supports varying float. So since we're propagating texcoord
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/pvr2</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>texcache.c</b></big> <small id="info" style="color: #888888;" >34e696c3a56f -> f50407acc682</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/pvr2/texcache.c
+++ lxdream/src/pvr2/texcache.c
@@ -101,10 +101,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
         /* Bind the texture and set the params */
         glActiveTexture(GL_TEXTURE1);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        glBindTexture(GL_TEXTURE_1D, texcache_palette_texid);
-        glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-        glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-        glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        glBindTexture(GL_TEXTURE_2D, texcache_palette_texid);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         glActiveTexture(GL_TEXTURE0);
 
     } else {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -290,14 +290,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     }
 
     glActiveTexture(GL_TEXTURE1);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-//    glBindTexture(GL_TEXTURE_1D, texcache_palette_texid);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     if( format_changed )
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        glTexImage1D(GL_TEXTURE_1D, 0, intFormat, 1024, 0, format, type, data );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        glTexImage2D(GL_TEXTURE_2D, 0, intFormat, 1024, 1, 0, format, type, data );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     else
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        glTexSubImage1D(GL_TEXTURE_1D, 0, 0, 1024, format, type, data);
-//    glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-//    glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-//    glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1024, 1, format, type, data);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     glActiveTexture(GL_TEXTURE0);
     texcache_palette_valid = TRUE;
 }
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -510,7 +506,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     case PVR2_TEX_FORMAT_IDX4:
     case PVR2_TEX_FORMAT_IDX8:
         if( texcache_have_palette_shader ) {
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-            intFormat = GL_ALPHA<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >8</span>;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+            intFormat = GL_ALPHA;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             format = GL_ALPHA;
             type = GL_UNSIGNED_BYTE;
             bpp_shift = 0;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -895,7 +891,12 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >                     POLY2_TEX_HEIGHT(texcache_active_list[slot].poly2_mode),
                     texcache_active_list[slot].poly2_mode,
                     texcache_active_list[slot].tex_mode,
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-                    (glAreTexturesResident(1, &texcache_active_list[slot].texture_id, &boolresult) ? "[RESIDENT]" : "[NOT RESIDENT]") );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#ifdef HAVE_OPENGL_TEX_RESIDENT
+                    (glAreTexturesResident(1, &texcache_active_list[slot].texture_id, &boolresult) ? "[RESIDENT]" : "[NOT RESIDENT]")
+#else
+                    ""
+#endif
+                    );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             slot = texcache_active_list[slot].next;
         }
     }
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>