Selaa lähdekoodia

- fixed incorrect workaround in revision 1943

git-svn-id: http://zengl.googlecode.com/svn/branches/0.3.x@1947 6573c10b-8653-0410-9706-d32479e959fb
dr.andru 12 vuotta sitten
vanhempi
commit
19c6637abf
1 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 6 1
      src/zgl_video.pas

+ 6 - 1
src/zgl_video.pas

@@ -252,7 +252,12 @@ begin
           FreeMem( data );
         end;
       if sh <> u_GetPOT( sh ) Then
-        tex_SetData( Stream.Texture, Stream.Data, 0, sh, sw, 1 );
+        begin
+          // tricky hack
+          INC( Stream.Texture.Height );
+          tex_SetData( Stream.Texture, PByteArray( @Stream.Data[ sw * ( sh - 1 ) * 4  ] ), 0, 0, sw, 1 );
+          DEC( Stream.Texture.Height );
+        end;
     end;
 end;