1) gs_Intro loads a texture:
m_pRPGLogo = NULL;
printf("loading dragon.bmp\n");
m_driver->setTextureCreationFlag(irr::video::ETCF_OPTIMIZED_FOR_QUALITY, true);
m_pRPGLogo = m_driver->getTexture("data/dragon.bmp");
2) gs_Intro trys to draw the texture during rendering:
if(m_pRPGLogo) m_driver->draw2DImage(m_pRPGLogo,
irr::core::position2d< irr::s32 >(50,50),
irr::core::rect< irr::s32 >(0,0,320,240),
0,
irr::video::SColor(255, 255, 255, 255),
true
);
3) gs_Intro is destroyed, and unloads it:
if(m_pRPGLogo) {
printf("unloading dragon.bmp\n");
m_pRPGLogo->drop(); //should we be dropping?
m_pRPGLogo = NULL;
}
4) gs_Intro is created again, trys to load texture, crashes:
"
loading dragon.bmp (1)
Loaded texture: data/dragon.bmp
unloading dragon.bmp (3)
loading dragon.bmp (4)
Fatal Error: Tried to set a texture not owned by this driver.
"
also, the image never actually draws (2), unless I load the image somewhere else first.
I must be using texture wrong: ISSUE RESOLVED
I must be using texture wrong: ISSUE RESOLVED
Last edited by keless on Thu Jan 22, 2004 4:18 am, edited 1 time in total.
a screen cap is worth 0x100000 DWORDS
issue resolved:
when loading the dragon texture, I did not create a color key texture for transparency like the Ice image. Thus, when I was drawing the dragon image, and still had 'true' for use alpha transparency, the whole thing was determined to be transparent. I have turned this to false and it works now. My bad.
when loading the dragon texture, I did not create a color key texture for transparency like the Ice image. Thus, when I was drawing the dragon image, and still had 'true' for use alpha transparency, the whole thing was determined to be transparent. I have turned this to false and it works now. My bad.
a screen cap is worth 0x100000 DWORDS