Thread: graphics and sound

  1. #1
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003

    Question graphics and sound

    how would you use graphics and sound. is there a header file? if so, what functions would i use and what header file is it? thanks.

    -The N00b

  2. #2
    Registered User
    Join Date
    Dec 2001

    Don't believe them!

    Some here will tell you using graphics and sound is sooo difficult, and they will tell you to learn the basics of C++ before even thinking of graphics. Don't believe them! It is not sooo difficult. Short instruction:
    Get (I would advise Visual) C++ (6 or better will help).
    Go to the page and download DirectX SDK (8.1 or better will help). Be warned, this download is huge (100 MB +).
    When you have DirectX SDK unzip and install it. It comes with some demo animations (won't last too long and you can program similar animations).
    Restart your computer.
    Start Visual C++. Start a new WIN32-Application. Add a cpp file and write #include<ddraw.h>. This is your header for graphics. The linker will need these files: dxguid.lib and ddraw.lib. You can find them in a subdirectory of your DirectX SDK. You must add them to your project if you want to use graphics in your program.
    Buy a book dealing with DirectX. Read about Surfaces, there are only about ten functions you should learn by heart if you want to finish your projects in a not-ridiculous amount of time (Sure you will meet the functions ->SetCooperativeLevel and ->BltFast in your book.) Be patient when reading your book, the subject is not difficult to understand, it is only extensive.
    If you have problems,though, post a precise question here. Some (not many) guys here might be able to help you out of your misery then.

    I think this is enough for the beginning.

    Good luck learning DirectX !

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001

    It depends on your compiler...

    Graphics and sound are NOT part of ANSI/ISO standard C++. That means that the particular header files will depend on the particular compiler / operating system / hardware.

    If you're running Windows and have a windows compiler, there will be lots of WinAPI functions available to you. Some compilers will have sound.h and graphics.h (You can search for all the .h files on your computer.)

    For more advanced graphics (faster, more detail, etc) you can use DirectX (Windows), OpenGL (Multi-platform), or Allegro (multi-platform).

    More graphics/sound info from the FAQ
    Last edited by DougDbug; 04-29-2003 at 07:26 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sound and graphics in C - recommandation needed
    By gavra in forum C Programming
    Replies: 50
    Last Post: 06-05-2008, 07:41 AM
  2. Project Lost Tomorrow recruiting Programmers and Sound Engineers
    By chewtoy in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 12-07-2005, 05:02 AM
  3. DirectX Question
    By bladerunner627 in forum Game Programming
    Replies: 2
    Last Post: 04-04-2005, 11:55 AM
  4. Game structure, any thoughts?
    By Vorok in forum Game Programming
    Replies: 2
    Last Post: 06-07-2003, 01:47 PM
  5. SkyLock graphics update...
    By jdinger in forum Game Programming
    Replies: 11
    Last Post: 05-29-2002, 03:11 PM