|
@@ -80,20 +80,8 @@ namespace bbiwarg.Graphics
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /*GL.BindTexture(TextureTarget.Texture2D, textureId);
|
|
|
- GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgb, videoHandle.getWidth(), videoHandle.getHeight(), 0,
|
|
|
- PixelFormat.Rgb, PixelType.Short, textureData);
|
|
|
-
|
|
|
- float size_2 = 0.5f / 2.0f;
|
|
|
- GL.Begin(PrimitiveType.Quads);
|
|
|
- GL.Color3(1.0, 1.0, 1.0);
|
|
|
- GL.TexCoord2(0.0, 0.0); GL.Vertex3(-size_2, size_2, -0.5);
|
|
|
- GL.TexCoord2(1.0, 0.0); GL.Vertex3( size_2, size_2, -0.5);
|
|
|
- GL.TexCoord2(1.0, 1.0); GL.Vertex3( size_2, -size_2, -0.5);
|
|
|
- GL.TexCoord2(0.0, 1.0); GL.Vertex3(-size_2, -size_2, -0.5);
|
|
|
- GL.End();*/
|
|
|
-
|
|
|
-
|
|
|
+ // draw histogram
|
|
|
+ GL.Disable(EnableCap.Texture2D);
|
|
|
int[] histogram = videoHandle.getHistogram();
|
|
|
int maxValue = 0;
|
|
|
for (int i = 0; i < histogram.Length; ++i)
|
|
@@ -111,6 +99,21 @@ namespace bbiwarg.Graphics
|
|
|
}
|
|
|
GL.End();
|
|
|
|
|
|
+ // draw texture
|
|
|
+ GL.Enable(EnableCap.Texture2D);
|
|
|
+ GL.BindTexture(TextureTarget.Texture2D, textureId);
|
|
|
+ GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgb, videoHandle.getWidth(), videoHandle.getHeight(), 0,
|
|
|
+ PixelFormat.Rgb, PixelType.Short, textureData);
|
|
|
+
|
|
|
+ float size_2 = 0.5f / 2.0f;
|
|
|
+ GL.Begin(PrimitiveType.Quads);
|
|
|
+ GL.Color3(1.0, 1.0, 1.0);
|
|
|
+ GL.TexCoord2(0.0, 0.0); GL.Vertex3(-size_2, size_2, -0.5);
|
|
|
+ GL.TexCoord2(1.0, 0.0); GL.Vertex3( size_2, size_2, -0.5);
|
|
|
+ GL.TexCoord2(1.0, 1.0); GL.Vertex3( size_2, -size_2, -0.5);
|
|
|
+ GL.TexCoord2(0.0, 1.0); GL.Vertex3(-size_2, -size_2, -0.5);
|
|
|
+ GL.End();
|
|
|
+
|
|
|
sw.Stop();
|
|
|
Console.WriteLine(sw.ElapsedMilliseconds);
|
|
|
|