Browse Source

ushort->short

Alexander Hendrich 10 years ago
parent
commit
1d3256816e
2 changed files with 6 additions and 9 deletions
  1. 5 7
      bbiwarg/Test/OutputTest.cs
  2. 1 2
      bbiwarg/bbiwarg.csproj

+ 5 - 7
bbiwarg/Test/OutputTest.cs

@@ -61,18 +61,16 @@ namespace bbiwarg
 
             for (int x = 0; x < width; x++) {
                 for (int y = 0; y < height; y++) {
-                    ushort depth = depthImage.getDepth(x, y);
-                    int depth2 = depth;
-                    //depth = 60;
+                    short depth = depthImage.getDepth(x, y);
 
                     int relX = x - width / 2;
                     int relY = y - height / 2;
 
                     GL.Begin(BeginMode.Polygon);
-                    GL.Vertex3(relX-0.5f, relY+0.5f, -depth2);
-                    GL.Vertex3(relX+0.5f, relY+0.5f, -depth2);
-                    GL.Vertex3(relX+0.5f, relY-0.5f, -depth2);
-                    GL.Vertex3(relX-0.5f, relY-0.5f, -depth2);
+                    GL.Vertex3(relX-0.5f, relY+0.5f, -depth);
+                    GL.Vertex3(relX+0.5f, relY+0.5f, -depth);
+                    GL.Vertex3(relX+0.5f, relY-0.5f, -depth);
+                    GL.Vertex3(relX-0.5f, relY-0.5f, -depth);
                     GL.End();
                 }
             }

+ 1 - 2
bbiwarg/bbiwarg.csproj

@@ -32,8 +32,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <PropertyGroup>
-    <StartupObject>
-    </StartupObject>
+    <StartupObject>bbiwarg.OutputTest</StartupObject>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="iisuNet, Version=3.0.0.0, Culture=neutral, processorArchitecture=x86">