Re: Inverting draw mode?

"rtrussell" <[email protected]> Thu, 08 Dec 2016 12:12:03 +0000
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
joymaker wrote:
> Is this at all supported? If not, I would urge its adoption as an additional "Blending mode".

I rely on it.  The solution I use is to force OpenGL (or GLES 1.0) when it's not the default:


Code:
SDL_SetHint (SDL_HINT_RENDER_DRIVER, "opengl") ;
window = SDL_CreateWindow(..., SDL_WINDOW_OPENGL...) ;


then you can enable the wanted drawing mode using:


Code:
	glEnable (GL_COLOR_LOGIC_OP) ;
	glLogicOp (GL_XOR) ;



Works perfectly for me on Windows, Linux, Mac OS and Android.  It's unfortunate that support for glLogicOp was dropped from GLES 2.0 so on platforms which can't run full OpenGL you are forced to use the legacy GLES 1.0.

Richard.

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org