开发者

OpenGL equivalent of SetROP2(R2_NOT)

Considering QGLWidget (or OpenGL in general), what can be the easiest solution to draw pixels in the inverse color of the screen / frame buffer? In Win32 / MFC environment, I used to use the SetROP2(R2_NO开发者_C百科T) with zero pain.


Something like this?:

glEnable(GL_BLEND);
glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);


I'm not sure what that function does, but you surely can do it with shaders, and they're HW accelerated.

Related, you can use glLogicOp, BUT, that function is usually NOT HW accelerated, so shaders are preferred.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜