blitting

This is a discussion on blitting within the Game Programming forums, part of the General Programming Boards category; Howdoes allegro and others do thisso fast? if I try to just get/pupixel an image its alls slow, do they ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    133

    blitting

    Howdoes allegro and others do thisso fast? if I try to just get/pupixel an image its alls slow, do they use some assembly stuff to machine gun an image onto the screen?
    flashdaddee.com rocks!!!

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    I don't know if they do, but that's what I would do using rep stosd or something.

  3. #3
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    The function call for putpixel is much more costly then the changing of a single change of a variable. While they probably do use asm to blit, using straight C to blit large areas wouldn't be that much slower than using asm... just as long as you don't use a function call for each pixel.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  4. #4
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    aside from asm, there are many tricks you can do in straight C/++ that can help... for example using a dirty rectangles updating system... and #define directives for put_pixel pseudo-functioning...
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Blitting a texture
    By mindofpoison in forum Game Programming
    Replies: 2
    Last Post: 12-04-2005, 02:41 AM
  2. Transparent Blitting
    By PsychoBrat in forum Windows Programming
    Replies: 2
    Last Post: 01-15-2003, 12:35 AM
  3. maps, tilesets, and blitting (SDL)
    By Flikm in forum Game Programming
    Replies: 1
    Last Post: 07-31-2002, 04:07 PM
  4. map blitting problem
    By Flikm in forum Game Programming
    Replies: 2
    Last Post: 04-17-2002, 04:32 PM
  5. blitting problem
    By cozman in forum Game Programming
    Replies: 5
    Last Post: 04-01-2002, 10:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21