Results 1 to 7 of 7

Thread: DirectDraw VB C++ *Resolved*

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    33

    Question DirectDraw VB C++ *Resolved*

    I have been working on a game for some time now in C++ using DirectDraw, for reasons i changed to VB still using DirectDraw. I noticed that the tutorials that i took in vb dont release any of the surfaces. Is this done automatically or am i meant to do like in c++

    thnx in advance...
    Last edited by Nafreya; Oct 20th, 2003 at 04:15 AM.
    "Microsoft isn't evil, they just make really crappy operating systems."
    -Linus Torvalds

  2. #2
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Neither C++ or VB has a garbage collector. But VB is not so hard on you like C++ is. But all the things you are defining as "new" in VB is ment to be released the same way as C++. So there is not that much as in C++ but there are some things...I can't remember if surfaces are created that way in VB...and I don't have the time to check it now....but if you can't figure it out for your self. I will be happy to look it up for you on saturday or something...


    BTW do you know any great tutorials for newbies in C++ DX?

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    33
    Well im not sure but i think its done automatically, Ne way ill find out wen i load more images to memory.

    Ye i know a good tutorial its the one i learned off: http://sunlightd.virtualave.net/Windows/DirectX/

    thnx for help
    "Microsoft isn't evil, they just make really crappy operating systems."
    -Linus Torvalds

  4. #4
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Its always best to clean up by setting your surfaces to nothing when you have finished with them. This is the same for most objects in VB.

    Surface = Nothing


    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    33
    Thnx for the info

    ^_^
    "Microsoft isn't evil, they just make really crappy operating systems."
    -Linus Torvalds

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Originally posted by Nafreya

    Ye i know a good tutorial its the one i learned off: http://sunlightd.virtualave.net/Windows/DirectX/

    thnx for help

    Thanks I will have a look at it when I have some time....

    Have to do some QT stuff first.,...

  7. #7
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by NoteMe
    Neither C++ or VB has a garbage collector. But VB is not so hard on you like C++ is. But all the things you are defining as "new" in VB is ment to be released the same way as C++. So there is not that much as in C++ but there are some things...I can't remember if surfaces are created that way in VB...and I don't have the time to check it now....but if you can't figure it out for your self. I will be happy to look it up for you on saturday or something...
    VB uses garabge collection as well as C# and anything using managed extensions.

    C++ only uses garbage collection when using something like the .NET framework (since the framework uses garabge collection for EVERYTHING), otherwise C++ uses RAII.

    The keyword "new" does NOT release data in VB the same way as C++. When you use new with C++, you're usually putting something on the heap in which you must manually close or kill it within a scope.

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