title: How to best render to a window, when pixels could be written directly to display buffer?
body: <p>I have used OpenGL pretty exclusively for all my rendering, to the point that I'm unaware of any other way to write pixels to a window unfortunately.</p>
  
  <p>This is a problem because my current project is a work tool that emulates an LCD display (pixel perfect, 2D, very few pixels are touched each frame, all 'drawing' can be done with memcpy() to a pixel buffer) and I feel that OpenGL might be too heavy for this, but I could absolutely be wrong in that assumption.</p>
  
  <p>My goal is to borrow as little CPU time as possible.  What's the best way to draw pixels to a window, in this limited way, on a modern typical machine running windows 10 circa 2019?  Is OpenGL suited for this type of rendering, or should I adopt another rendering method in this case?  And if so, what would that method be?</p>
  
  <p>edit:</p>
  
  <p>I should also mention, OpenGL can be used right away for me.  If rendering textured triangles with an optimal setup is the fastest method, then I can already do that.  Anything that just acts as an API over OpenGL or DirectX will likely be worse in my case.</p>
  
  <p>edit2:</p>
  
  <p>After some research, and thanks to the comments, I think I may just use OpenGL with Pixel Buffer Objects to optimize pixel uploads and keep rendering inexpensive.</p>