PDA

View Full Version : Dynamic textures



jansoft
08-11-2004, 10:43 AM
Hello,
i am using some sort of dynamic textures - textures, which i need to compute in runtime, and i was thinking about the fastest way. Somthing like this :


beginscene();
computetextures();
drawtextures();
present();

:idea: 1. after creating textures i am adding it into list. After drawing them (Powerdraw.Device.Present) I am NOT destroying them, but only moving into "unused" list and "recycling" in next round.

:idea: 2. i was using writescanline, but i thing better is to lock whole texture.
LifePower, can you please provide Lock/Unlock methods to be public in next release ? thanx

Could you please tell me some another speed improvements ?

thank you very much for your brain-share , Jansoft

Clootie
08-11-2004, 01:59 PM
It's better to have:


class
private
tex1, tex2: TEXTURE
....

begin
...
COMPUTE(tex1);
DRAW(tex2);
SWAP(tex1, tex2)
Present()
...
end
So currently generated texture is rendered in next frame.