Thread: Pasting image to rotating billboard

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    1

    Pasting image to rotating billboard

    Hi;

    I am working on a project that requires capturing image with a camera and then pasting the image onto a rotating/moving billboard and display it in 3D graphics real-time. There are also other smaller billboards displaying other images within the scene, like fractured glasses flying all around while reflecting various images. I think the best way is to use DirectX graphics to render this. I am new to DirectX and thus need help. One way I can think of is to first convert the image to bitmap file (or other graphics file format) in memory, and then use D3DXCreateTextureFromFileInMemory() to map the image to the 2D rectangular plane, before applying the 3D marix to rotate the plane. But the overhead in suh conversion might make it too slow for real-time because the image is big (1280x 1024pixels). StretchRect() is not useful as it only match to rectangles.

    Anyone has experience or suggestion ?Help most appreciated.

    Fun Wey

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    1. D3DXCreateTextureFromFileInMemory() only creates the underlying IDirect3DTexture(x) COM object. It has nothing to do with mapping it to a plane.
    2. StretchRect() is used to down-sample or up-sample one texture into another texture provided you follow it's long list of surface matching criteria.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading tiff image files?
    By compz in forum C++ Programming
    Replies: 9
    Last Post: 10-30-2009, 04:17 AM
  2. Replies: 1
    Last Post: 05-27-2009, 12:46 PM
  3. Simple Image Processing
    By ejohns85 in forum C++ Programming
    Replies: 4
    Last Post: 03-19-2009, 12:10 PM
  4. HotSpot image controls (web)
    By novacain in forum C# Programming
    Replies: 0
    Last Post: 06-25-2008, 04:27 AM
  5. Replies: 4
    Last Post: 03-02-2003, 09:12 AM