Results 1 to 4 of 4

Thread: Buffered RGB data

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    15

    Question Buffered RGB data

    I have a buffer of RGB data ~154K that I need to display 6 times a second. I have tried SetPixelV...it is too slow. Is there a faster way? If DirectDraw is the answer could someone point me in the right direction.

    Regards,

    D Seed

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Pset is definitely slower than SetpixelV plenderj. You can get# the file data into a an array and then compose the bitmap with CreateDIBitmap, and then blit it of a offscreen device context.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    15
    I have never used CreateDIBitmap could you point me in the right direction. Or even better maybe an example.

    Regards,

    D Seed

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    hbitmap = createDIBitmap(hdc, bmiinfo.bmiheader, cbm_init, buffer(0), bmiinfo, dib_rgb_colors)

    you need the bitmapinfo header types (you can find those in win32api.txt) for bmiinfo, buffer is a byte array you read with get# and hdc is the target device context handle.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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