i'm working on a scenenode with procedural texture and noticed a strange behaviour in texturing.
i alter the texture in the 'SceneNode::PreRender' function as follows:
Code: Select all
short* img=texture->lock();
//... do some pixel manipulation
texture->unlock();
the cloudy part is the texture I produced in my algorithm, the green, brown etc. part is the original texture i loaded at startup. when i move the camera the texture changes, at closer positions, to my generated pixels but when i move away every thing changes back to the texture that was originally loaded.
I tried to verified that behaviour with the opengl driver, but opengl draws every thing like i expect it, without any trace of the originally loaded texture! but the program runs 10 times slower!!
any ideas why this happens? or how i can make directx to do the same as opengl (i like the speed of directx though )
thanks
gorgon zola