What is the fastest way to draw a 2D array of color triplets on screen?

前端 未结 6 1513
星月不相逢
星月不相逢 2021-02-14 18:24

The target language is C/C++ and the program has only to work on Linux, but platform independent solutions are preferred obviously. I run Xorg, XVideo and OpenGL are available.<

6条回答
  •  萌比男神i
    2021-02-14 18:44

    the "how many fps can i expect" question can not be answered seriously. not even if you name the grandpa of the guy who did the processor layouting. it depends on tooooo many variables.

    • how many triplets do you need to render?
    • do they change between the frames?
    • at which rate (you wont notice the change if its more often than 30times a sec)?
    • do all of the pixels changes all of the time or just some of the pixels in some areas?
    • do you look at the pixels without any perspective distortion?
    • do you always see all the pixels?
    • depending on the version of the opengl driver you will get different results

    this could go on for ever, the answer depends absolutly on your algorithm. if you stick to the opengl approach you could also try different extensions (http://www.opengl.org/registry/specs/NV/pixel_data_range.txt comes to mind for example), to see if it fits your needs better; although the already mentioned glTexSubImage() method is quite fast.

提交回复
热议问题