Thread: Fastest way to paint window?

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    752

    Fastest way to paint window?

    Hi everyone. I have a graphics project where the computations are fairly complex, so I set up a screen buffer. Basically, let's say that I have a 512 x 512 window. Then I will also have a 512 x 512 array of COLORREFs that correspond to what I want the window to look like.

    Right now, I am just barreling through the array with two for loops and SetPixelV(), but I can still see the window scanning in whenever it needs updated.

    What is the fastest way to fill a window with colors from a buffer?
    Callou collei we'll code the way
    Of prime numbers and pings!

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    SetDIBBitsToDevice(), BitBlt() or some other blitting function should help you.

    good luck!
    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  4. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  5. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM