possible to get color of a single pixel in 2d?
possible to get color of a single pixel in 2d?
Hello, I'm trying to make just a simple game where if your mouse goes outside of a maze something happens... is there a way to get the color thats under your mouse?
You could create a screenshot, but I guess this would be very slow:
driver->createScreenShot()
http://irrlicht.sourceforge.net/docu/cl ... 715ef36dbe
driver->createScreenShot()
http://irrlicht.sourceforge.net/docu/cl ... 715ef36dbe
It's generally not a good idea to get data back from your graphics card, it's very slow.
If you load your maze as an image from a file, try loading it manually as an IImage (image in system memory) then create a texture from it manually. Query the image in system memory using getPixel.
If you're creating your maze in 3D then you should solve this problem in 3D using triangle selectors and not worry about what actually gets drawn.
If you load your maze as an image from a file, try loading it manually as an IImage (image in system memory) then create a texture from it manually. Query the image in system memory using getPixel.
If you're creating your maze in 3D then you should solve this problem in 3D using triangle selectors and not worry about what actually gets drawn.