If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
-
paddy
- Posts: 25
- Joined: Tue Oct 23, 2007 12:30 pm
Post
by paddy »
Hi there
I'm working on a little dialog which lets u select a color. I have a window, and a texture (rainbow colors) placed in it.
Is there any simple way to get the color of the pixel in that displayed texture which is hovered by the mouse cursor ?!
greets
paddy
-
arras
- Posts: 1622
- Joined: Mon Apr 05, 2004 8:35 am
- Location: Slovakia
-
Contact:
Post
by arras »
You could lock() texture and access pixels directly. With some simple math you can access pixels given their 2D coordinates.
Or you can use IImage instead of ITexture. There you can find getPixel() function which returns color of pixel.