C++ Graphics and...
Results 1 to 3 of 3

Thread: C++ Graphics and...

  1. #1
    Member
    Join Date
    Feb 2003
    Posts
    78

    C++ Graphics and...

    Yeah, I have two questions here.
    My first one, If I wanted to write a C++ program and have it contain graphics, am I going to have to use something besides your average compiler, like Dev? I was reading about it, and I think I would have use something like OpenGL or DirectX. I dont know what those are and/or how to use them? If anyone could explain some basic information about that, that would be great.

    Second question, I remember back when I was learning QBASIC that we had made a program like pong. Well, I was wondering how to do something like that in C++. Mainly, All I want to know is how would I use the keyboard for interaction. I have been doing some searching, and all I have found is stuff on Visual C++, and I havent used that, nor do I plan to for a while. I was wondering like the ASCII value of left arrow. Say we were playing pong. How would I make a | move when the user presses a button, which out having like a cin>> statement.
    Anywayz, I hope you understand what I am trying to ask, and thanks for any help.

    -Epison07
    01001001001000000100110001101111011101100110010100100000010000100110010101110100011101000111100100100001

  2. #2
    Custom User
    Join Date
    Oct 2001
    Posts
    503
    I think that graphics programming in C++ is going to be a lot harder for you than QBASIC, but if you are interested, you should search the web for some directx or opengl tutorials.

    As to what these are, DirectX is an api (application programmer interface) written by microsoft to attempt to make programming with windows easier (it enables you to write programs that use sound, video, etc without having to write separate code for each piece of hardware that a user might choose to use). What you do is find functions in the directx library that do what you want to do. I can't really explain it better than that.

    I'm not sure of an actual definition of opengl, but I believe it is a technology that allows you to interact with graphics hardware without knowing the specifics of the individual hardware (much like the graphics parts of directx).

    Before you look at directx and opengl tutorials, you might want to search on google for some basic windows tutorials, because you are not going to get very far with directx without knowing how to program for windows.

    ac

  3. #3
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    What you probably want to do is use something which makes graphics programming easier, such as Allegro (google it)

    Slarty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides