Bink SDK 1.5v

# BinkCopyToBufferRect

The function BinkCopyToBufferRect copies a piece of the video frame from the internal Bink memory buffers to a specified memory address.

    S32 BinkCopyToBufferRect(
      HBINK bink,
      VOID_PTR dest_addr,
      S32 dest_pitch,
      U32 dest_height,
      U32 dest_x,
      U32 dest_y,
      U32 src_x,
      U32 src_y,
      U32 src_w,
      U32 src_h,
      BINK_COPY_FLAGS copy_flags
    );

#### In Parameters

bink
  Specifies the Bink handle.
dest_addr
  Address of the destination memory buffer.
dest_pitch
  Pitch of the destination buffer in bytes.
dest_height
  Height of the destination buffer in pixels.
dest_x
  X (left) pixel offset into the destination buffer.
dest_y
  Y (top) pixel offset into the destination buffer.
src_x
  The X pixel offset in the internal Bink buffer. This must be divisible by 16 unless you use the BINKCOPYALL flag.
src_y
  The Y pixel offiset in the internal Bink buffer.
src_w
  The width in pixels to copy.
src_h
  The height in pixels to copy.
copy_flags
  Specifies the flags that describe the destination buffer type and other special copy options.

#### Returns

Returns one if the frame was skipped, or zero otherwise.

#### Discussion

Use this function to copy the decompressed pixels from Bink's internal decompression buffers into a destination address just like BinkCopyToBuffer. The only difference between this function and BinkCopyToBuffer is that this function can copy a sub-rectangle of Bink's internal buffers. This is handy when you don't need the entire video frame, or when a single video frame is being broken up into multiple output buffers (like when you are using tiled 256x256 textures, for example. When using this function without the BINKCOPYALL flag, you must use a divisible by 16 value for the src_x parameter.

Group: Bink API
Related Sections: Scaling
Related Functions: BinkCopyToBuffer, BinkDDSurfaceType, BinkDoFrame, BinkGDSurfaceType
Related Basic Types: BINK_COPY_FLAGS, HBINK, S32, U32, VOID_PTR

For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.