How can I save OpenGL draw with OpenGL?

前端 未结 4 513
遥遥无期
遥遥无期 2021-01-15 03:42

I draw a screen with OpenGL commands. And I must save this screen to .bmp or .png format. But I can\'t do it. I am using glReadpixels but I can\'t do continue. How can I sav

4条回答
  •  旧巷少年郎
    2021-01-15 04:06

    One thing need to be fixed at:

    bmih.biXPelsPerMeter = bmih.biYPelsPerMeter = 0;
    

    Otherwise, some picture edit can not open correctly.

提交回复
热议问题