Bitmap.SetPixel(x,y, Color) too slow

前端 未结 4 1550
醉话见心
醉话见心 2021-01-19 17:44

So currently I\'m creating a 1000x1000 bitmap and it\'s spending about .3 seconds simply calling the Bitmap.SetPixel() function.

I\'m actually only drawing probably

4条回答
  •  独厮守ぢ
    2021-01-19 18:33

    Modern blockbuster video games do all the pixel setting behind the scenes in hardware; they give the hardware a buffer of geometries and the highly parallelized hardware does all the math. OpenGL and DirectX are APIs for talking to the hardware.

    Search gamedev.net for some tutorials.

提交回复
热议问题