title: stream bitmap data with opengl in c #
body: <p>When I stream with the picturebox, there is a decrease in performance. I'm looking for a library that supports 4k 30fps. I think Opengl will support it. I shared my code below. I need a higher performance viewer instead of Picturebox. Are examples of this available for Opengl?</p>
  <p>I have a c ++ dll. I convert the 4k 30fps data from gstreamer to bitmap and print it to the screen.</p>
  <p>pt = DLLWrapper.WrapperSingleCameras (0) is returning the 4k30fps frame from the stream as a pointer.</p>
  <pre><code>pt = DLLWrapper.WrapperSingleCameras(0);
  BitmapSingleImage = new Bitmap(rsSplitWidth, rsSplitHeight, rsSplitWidth, System.Drawing.Imaging.PixelFormat.Format8bppIndexed, (IntPtr)pt);
                           
  ColorPalette _palette = BitmapSingleImage.Palette;
  System.Drawing.Color[] _entries = _palette.Entries;
  
  for (int m = 0; m &lt; 256; m++)
  {
      System.Drawing.Color b = new System.Drawing.Color();
      b = System.Drawing.Color.FromArgb((byte)m, (byte)m, (byte)m);
      _entries[m] = b;
  }
  
  BitmapSingleImage.Palette = _palette;
  
  videosGUI.videoPictureBox.Image = BitmapSingleImage;
  videosGUI.videoPictureBox.Refresh();
  </code></pre>