[SDL2] Texture with alpha and mouse cursor over it

"Rang" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
I load image from png file to surface. It have some transparent parts.
Then i create a texture from surface and drawing it with render.

How can i check if mouse cursor is over transparent pixels of this image?

With old version of SDL (1.2) it was simple. We had surface and function SDL_GetPixel(), checking alpha value with threshold and all is works.

But with new version we have texture, and surface needed to be cleaned, because wasted a lot of memory.

How can i determine the mouse cursor is over the visible part of the image?
Is there simple solution?

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.