addRenderTargetTexture
Posted: Mon Jan 19, 2009 6:03 am
I've just been trying Irrlicht 1.5 for the first time. Very pleased with it. Especially loving the non-flipped OpenGL RTTs, and the addition of joystick support - SDL about to get the flick from my project.
Irrlicht 1.5 kept telling me that createRenderTargetTexture() was deprecated, so I've swapped to addRenderTargetTexture(). Two queries relating to this:
1) The docs say that the width and height of the RTT "should be a power of 2". Mine have always been 200. 200 seems to work with addRenderTargetTexture(). So how important is the use of the word "should"? Will I eventually suffer some sort of horrible problem (in the middle of a customer demo no doubt)?
2) I was suffering segmentation faults in device->drop(). Stack trace was showing it was related to deleting RTTs. Docs didn't seem to have an answer. Looking in changes.txt, I saw the following comment "but also changes the way of removing the RTTs, and especially one must not drop the pointer anymore". So now I use removeTexture(), and all seems well. This is the correct method yes?
Irrlicht 1.5 kept telling me that createRenderTargetTexture() was deprecated, so I've swapped to addRenderTargetTexture(). Two queries relating to this:
1) The docs say that the width and height of the RTT "should be a power of 2". Mine have always been 200. 200 seems to work with addRenderTargetTexture(). So how important is the use of the word "should"? Will I eventually suffer some sort of horrible problem (in the middle of a customer demo no doubt)?
2) I was suffering segmentation faults in device->drop(). Stack trace was showing it was related to deleting RTTs. Docs didn't seem to have an answer. Looking in changes.txt, I saw the following comment "but also changes the way of removing the RTTs, and especially one must not drop the pointer anymore". So now I use removeTexture(), and all seems well. This is the correct method yes?