Results 1 to 2 of 2

Thread: Dynamic textures

  1. #1

    Dynamic textures

    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 :
    Code:
    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

  2. #2

    Dynamic textures

    It's better to have:
    Code:
    class
    private
      tex1, tex2: TEXTURE
    ....
    
    begin
    ...
      COMPUTE(tex1);
      DRAW(tex2);
      SWAP(tex1, tex2)
      Present()
    ...
    end
    So currently generated texture is rendered in next frame.
    There are only 10 types of people in this world; those who understand binary and those who don't.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •