浏览代码

- 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 年之前
父节点
当前提交
19c6637abf
共有 1 个文件被更改,包括 6 次插入1 次删除
  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;