access/pointer to an irrlichtdriver-backbuffer ?
-
knightoflight
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany
access/pointer to an irrlichtdriver-backbuffer ?
does someone know access to the driver-backbuffer ? Pointer/address ?
-
knightoflight
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany
there are many things one could do - i personally still thought about merging many textures - after createSurface is not possible (another thread) - i thought about merging textures with draw2DImage on a second irrlichtdevice, but isnt it nice, i can do, but no way to get to them ? Is it allowed to add the featue request for a mergeTexture-function (or is it already planned) ?
-
knightoflight
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany
Ok, Mr. Guest, that wasnt really this thread, but ok:
yes i can lock a texture and access, for example the fuction below, like Niko suggested in the old forum, but its too slow, we need a fuction, that uses the Blitter-fuctions of directx in the base and its all there in irrlicht
//Merge textures Format R5G5B5, same width, same height, transparent color=0
void mergeTextures(video::ITexture* texture1, video::ITexture* texture2)
{
s16 *p1 = (s16*)texture1->lock();
s16 *p2 = (s16*)texture2->lock();
core::dimension2d<s32> dim;
dim = texture1->getDimension();
s32 pitch = texture1->getPitch()/2;
for (s32 x=0; x<dim.Width; ++x)
for (s32 y=0; y<dim.Height; ++y)
if ((p1[y*pitch + x] & 0x7FFF) !=0)
p2[y*pitch+x]=p1[y*pitch + x];
texture1->unlock();
texture2->unlock();
}
yes i can lock a texture and access, for example the fuction below, like Niko suggested in the old forum, but its too slow, we need a fuction, that uses the Blitter-fuctions of directx in the base and its all there in irrlicht
//Merge textures Format R5G5B5, same width, same height, transparent color=0
void mergeTextures(video::ITexture* texture1, video::ITexture* texture2)
{
s16 *p1 = (s16*)texture1->lock();
s16 *p2 = (s16*)texture2->lock();
core::dimension2d<s32> dim;
dim = texture1->getDimension();
s32 pitch = texture1->getPitch()/2;
for (s32 x=0; x<dim.Width; ++x)
for (s32 y=0; y<dim.Height; ++y)
if ((p1[y*pitch + x] & 0x7FFF) !=0)
p2[y*pitch+x]=p1[y*pitch + x];
texture1->unlock();
texture2->unlock();
}