|
@@ -25,7 +25,7 @@ namespace bbiwarg.Test
|
|
|
|
|
|
public void initSource()
|
|
|
{
|
|
|
- source = new IIsuDataSource("..\\..\\videos\\10.skv");
|
|
|
+ source = new IIsuDataSource();
|
|
|
source.init();
|
|
|
source.start();
|
|
|
|
|
@@ -35,7 +35,7 @@ namespace bbiwarg.Test
|
|
|
{
|
|
|
base.OnLoad(e);
|
|
|
Title = "OutputTest";
|
|
|
- GL.ClearColor(Color.CornflowerBlue);
|
|
|
+ GL.ClearColor(Color.Black);
|
|
|
}
|
|
|
|
|
|
protected override void OnRenderFrame(FrameEventArgs e)
|
|
@@ -62,20 +62,16 @@ namespace bbiwarg.Test
|
|
|
for (int x = 0; x < width-1; x++) {
|
|
|
for (int y = 0; y < height-1; y++)
|
|
|
{
|
|
|
- short depth00 = depthImage.getDepth(x, y);
|
|
|
- short depth01 = depthImage.getDepth(x + 1, y);
|
|
|
- short depth10 = depthImage.getDepth(x, y+1);
|
|
|
- short depth11 = depthImage.getDepth(x + 1, y+1);
|
|
|
-
|
|
|
- int relX0 = x - width / 2;
|
|
|
- int relY0 = y - height / 2;
|
|
|
- int relX1 = x + 1 - width / 2;
|
|
|
- int relY1 = y + 1 - width / 2;
|
|
|
-
|
|
|
- GL.Begin(BeginMode.Triangles);
|
|
|
- GL.Vertex3(relX0, relY0, -depth00);
|
|
|
- GL.Vertex3(relX0, relY1, -depth01);
|
|
|
- GL.Vertex3(relX1, relY0, -depth10);
|
|
|
+ short depth = depthImage.getDepth(x, y);
|
|
|
+
|
|
|
+ int relX = x - width / 2;
|
|
|
+ int relY = height/2 - y;
|
|
|
+
|
|
|
+ GL.Begin(BeginMode.Polygon);
|
|
|
+ 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();
|
|
|
}
|
|
|
}
|
|
@@ -120,7 +116,7 @@ namespace bbiwarg.Test
|
|
|
{
|
|
|
base.OnResize(e);
|
|
|
GL.Viewport(ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width, ClientRectangle.Height);
|
|
|
- Matrix4 projection = Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 4, Width / (float)Height, 1.0f, 640.0f);
|
|
|
+ Matrix4 projection = Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 4, Width / (float)Height, 1.0f, 3000.0f);
|
|
|
GL.MatrixMode(MatrixMode.Projection);
|
|
|
GL.LoadMatrix(ref projection);
|
|
|
}
|