开发者

Can I write directly into the color buffer in OpenGL?

For some reason I want to write directly some pixels into the screen. For example, is there any function call that close to: glDrawPixels(int x, int y), or is there any way I can get and set the color buffer?

Hahaha ... it's funny b开发者_JAVA百科ecause glDrawPixels is a name I made up, and after reading Ramya's reply I went to the reference and found that they really got a function called glDrawPixels, and it is just what I need. How ironical!


Yes, glDrawPixels does that, but it's slow, to draw pixel data, use textures by drawing a textured quad. If you want to draw individual pixels, that will be a lot slower than drawing bigger textured areas.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜