Here is a screen how it looks:
I want to draw this images white-out the border (It needs to be more transparent pixels)
Here is my code:
Code: Select all
#include <IrrLicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
//#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") // <- If you don't wane have a console add this line.
#endif
IrrlichtDevice *Device;
IVideoDriver* Driver;
ISceneManager* Smgr;
video::ITexture* Icons;
bool ExitGame = false;
int main()
{
while (!ExitGame)
{
// Keeps The Engine Running..
Device = createDevice(video::EDT_DIRECT3D9,dimension2d<u32>(120, 120), 32, false, false, false, NULL);
if (!Device)
{
return 1;
}
Device->setWindowCaption(L"Image 2 Screen Drawing");
Driver = Device->getVideoDriver();
Smgr = Device->getSceneManager();
Icons = Driver->getTexture("../Texture/WarRockIconsRip.png");
Driver->makeColorKeyTexture(Icons, video::SColor(250, 28, 28, 28), true);
Driver->getMaterial2D().TextureLayer[0].BilinearFilter=true;
Driver->getMaterial2D().AntiAliasing=video::EAAM_FULL_BASIC;
while(Device->run())
{
/* Looping while the screen is open */
Driver->beginScene(true, true, video::SColor(255,120,102,136));
/* Do things here */
Driver->draw2DImage(Icons, core::position2d<s32>(20,20), core::rect<s32>(0,0,76,86), 0, video::SColor(255,255,255,255), true); //core::position2d<s32>(50,50), core::rect<s32>(0,0,342,224)
Driver->endScene();
}
}
return 0;
}