Re: [SDL2] Texture with alpha and mouse cursor over it
"Rang" <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
I need highlight the object and handle click events. Images like buttons. But they not have rectangle forms. Jonny D wrote: > If the use is rare, like on user input, then the performance penalty of reading the pixels directly from the texture might be acceptable. > > > It also depends on what you want to use this info for. In some cases, you can do everything you need to do in a shader. > > > > Jonny D > > > > On Thu, Aug 25, 2016 at 12:43 PM, Rang <[email protected] ([email protected])> wrote: > > > In this moment i use same method as you describe, but memory we use x2 (RAM + GPU). [Image: http://forums.libsdl.org/images/smiles/icon_sad.gif ] > > > > I thought use SDL_Rect (or other structure) for saving borders\points of borders for visible part, but this is more complicated code. > > I already have images, and need dynamicly creating this zones. > > > > > > _______________________________________________ > > SDL mailing list > > [email protected] ([email protected]) > > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org) > > > > > _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org