Results 1 to 6 of 6

Thread: Load Bitmaps....

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    Load Bitmaps....

    I have asked this question a million times, but I never get it to work....how can I load a picture into the game I'm currently working on(I'm using DirectX) without a bunch of advanced functions???

    I have tried LoadBitmap but it didn't load the picture...

    BTW: I'm using C++
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  2. #2
    Addicted Member
    Join Date
    Oct 2002
    Location
    Somewhere out in space
    Posts
    151
    Well... I've done a litle bit of directdraw a while back, and i'm sure I remember seeing a CreateSurfaceFromFile function or something like that... couldn't you use that?

  3. #3

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    hmmm dont know that function
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    I hav never used DX in C++, but I looked it up in my DX for VB book and I found it. The function Valkan is refering to looks like this.

    CreateSurfaceFromFile( file as String, dd As DDSURFACEDESC2) As DirectDrawSurface7

    If you have problems using this, post again...

  5. #5
    Addicted Member
    Join Date
    Oct 2002
    Location
    Somewhere out in space
    Posts
    151
    don't know the function... what version of DX are you using? Because if your using DX8, i think that DD was remove from it (meaning no CreateSurfaceFromFile.)

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    That is true. As you can see of my code. It was a DD7 Surface. That means that you have to use the DX7 SDK. How smart this is, depends on what kind of App/Game you are making.

    If only want to use DX8 (You could use both DX8 and DX7) you have to use D3D I think, and then you would have to load a picture, and set the camera to look right at it, so it looks like a 2D image. I don't know how to do this jet. Sorry....

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