[unconfirmed] addRenderTargetTexture crashes when tex exists

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
gerdb
Posts: 194
Joined: Wed Dec 02, 2009 8:21 pm
Location: Dresden, Germany

[unconfirmed] addRenderTargetTexture crashes when tex exists

Post by gerdb »

hi, i always got a runtime error when rendering my things.

I narrowed it down to

Code: Select all

tex = driver->addRenderTargetTexture( core::dimension2du(w,h), "rt_ssd", video::ECF_A8R8G8B8 );
this always crashed when the texture with name "rt_ssd" already existed and the crash was gone when i first tested the texname and removed it when exist.

Code: Select all

    video::ITexture* tex = 0;
        if (driver->getTexture("rt_ssd"))
        {
                                printf("removeTexture()\n");
            driver->removeTexture(driver->getTexture("rt_ssd"));
        }
 
        tex = driver->addRenderTargetTexture( core::dimension2du(w,h), "rt_ssd", video::ECF_A8R8G8B8 );
 
EDIT:
//! Adds a new render target texture to the texture cache.
/** \param size Size of the texture, in pixels. Width and
height should be a power of two (e.g. 64, 128, 256, 512, ...)
and it should not be bigger than the backbuffer, because it
shares the zbuffer with the screen buffer
.
how can i get the size of the backbuffer and why does it share anything with my rtt?

i like to create a render target texture 8192x8192 (max tex size of my GraphicsCard) for offscreen rendering without any damn limitation.

thx
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: [BUG] addRenderTargetTexture crashes when tex already ex

Post by hendu »

I think that doc is outdated. The depth of the window is not shared with RTTs, at least using any modern path.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: [BUG] addRenderTargetTexture crashes when tex already ex

Post by CuteAlien »

Hm, just calling 2x addRenderTargetTexture with the same name does not produce a crash here. Can you reduce this to a small example which can be compiled and reproduces the crash please? Otherwise I don't really know how to reproduce this.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply