Re: Inverting draw mode?

Jonathan Dearborn <[email protected]> Thu, 8 Dec 2016 09:36:54 -0500
Newsgroups gmane.comp.lib.sdl
Message-ID <CA+DSiHb3iN-mdZs0BgVCszoCPG6Dn3kBrRTKjzaj8y95y-e6zA@mail.gmail.com>
Does GLSL ES have bitwise operators?  I would think you could invert in a
shader.

Jonny D

On Thu, Dec 8, 2016 at 7:12 AM, rtrussell <[email protected]> wrote:

>
>
>
> 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
>
>

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