Simple light with image

I’m trying to do a simple light effect with a white image and I found only a way with OpenGL but I don’t want to use it, it’s using this :

Code:
glBlendFunc(GL_ONE, GL_SRC_COLOR);

But can i do this without OpenGL ?

Thanks

Draw the lights with attitude blending to the render target, then drawn the
render target to the main screen with modulate blend mode . Don’t ask me
what that all means cause I’m not real sure. I asked what it means in the
other thread but the guy never answered. When I have a lot of time on my
hands I’m going to try to research itOn Mar 24, 2014 10:04 PM, “coquinounet” wrote:

I’m trying to do a simple light effect with a white image and I found
only a way with OpenGL but I don’t want to use it, it’s using this :

Code:

glBlendFunc(GL_ONE, GL_SRC_COLOR);

But can i do this without OpenGL ?

Thanks


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

If you want to do the ‘lighten’ effect, I think either SDL_SetTextureBlendMode() with ADD mode, or SDL_SetTextureColorMod() might works.

If you want something like … ‘spotlight’ effect (for example), then make a white texture (with translucency… 25% or 50% should do) and draw it under the texture you want to highlight.

I haven’t tried any of those, but they should work somehow ;-).