![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
fastest bliting method |
Steve Terry
Member #1,989
March 2002
![]() |
Can someone explain to me what the hell is going on? Optimize blit or optimize your code, if you need to optimize your code then it has nothing to do with blit, make your algorithms faster, not blit. ___________________________________ |
Billybob
Member #3,136
January 2003
|
Fastest blitting method is, as KK said, your video card's video ram->video ram accelerated blit. End of story! blit(something);
because you don't start a thread like this, waste time debating things, and blit is only 4 letters!
|
lucaz
Member #4,194
January 2004
|
1 said: what is the fast method?, 1)use iterative loops 2)memcpy 3)other.
2 said:
direct line access is the first option right?.
3 said: is is the fastest method?, ¬_¬ ....
4 said: are you sure this is the fastest method?, memcpy seems more useful, it dont iterate... just take a block of memory a copy it to another-
5 said: I dont know its code. but at least it just does one for(), not 2
6 said: who likes to optimise blit?
Ive never said that Im trying to optimise. ReyBrujo explained me why is better memcpy() than use loops, that was what I like to know. |
ReyBrujo
Moderator
January 2001
![]() |
Here is the code I used to optimize. Note that, if the processor does not have MMX support, it just copied with memcpy. Of course, the bitmaps must be aligned, and you cannot use these with the screen bitmap. I tried it a couple of times with that old project (DRS system), and worked quite fine. I can tell you it won't crash unless you don't meet the requirements
-- |
lucaz
Member #4,194
January 2004
|
thanks one more time reybrujo!. |
Paul whoknows
Member #5,081
September 2004
![]() |
I agree with Richard, make your game first, make it run faster later. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
lucaz
Member #4,194
January 2004
|
|
Steve Terry
Member #1,989
March 2002
![]() |
Then say that you are writing your own blitter, it makes more sense now. Since you are not using allegro I'm not sure what you are using, if it's good ol mode 13h then memcpy would work best since you probably have your bitmap stored linear anyway as well as the screen, just beware the screen "wraps" around ___________________________________ |
|
1
2
|