Results 1 to 6 of 6

Thread: Speed

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2000
    Posts
    55

    Question

    How do i speed the pixelation of my program.
    Im makeing the backround with mathematical function and pset.
    how could i speed this process up without using image files?

  2. #2
    Member
    Join Date
    Oct 2000
    Posts
    33
    Use the SetPixel API function instead of PSet.

  3. #3
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    I dont know what kind of mathfunctions you use. But on some it would be useful to create a look-up table. This is only interesting when you have to do the mathfunction multiple times, or your pic will be really big. Also it only works good on 8-bit color.
    Sanity is a full time job

    Puh das war harter Stoff!

  4. #4
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    If the results are always the same (like Sin & Cos from 0 to 360 degrees) you can put the calculation results in an array while loading the form.
    Then, when using these values, you simply have to read them from the array (which speeds up very muchy!).
    Example: moving a string around a certain circle's centerpoint -> no more floating point calculations needed anymore.So, I agree with /\/\isanThr0p.

  5. #5
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    use ddraw/d3d?
    lookup tables will help, but not as much as changing from dirty pset to fast>> ddraw
    buzzwords are the language of fools

  6. #6
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    > Kenny

    That depends very much on the calculations! And DDraw isn't that fast in windowed mode (it still would help), so if the app needs windows mode, you can use pset! If it does not require windows mode you really have to switch!
    Sanity is a full time job

    Puh das war harter Stoff!

Posting Permissions

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



Click Here to Expand Forum to Full Width