Thread: Graphics

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    1

    Unhappy Graphics

    ok ... i have to do this project in C++... we have to make any kind of a game and i want to use graphics in but there is a problem i dont know where start, since i didnt learn anything in graphics in this class yet... so i was wondering if i could get some tips
    thanks

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    "i want to use graphics in but there is a problem i dont know where start"

    Go buy a 750 page book on Open GL or DirectX and learn about graphics.

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    I think what 7stud is trying to say, in a rather undiplomatic way, is that adding some simple graphics can get very complicated.

    You can check out the Graphics and Audio links .

    The Windows API also includes functions which, for example, allow you to draw a circle or a square with a simple function call. But, there is a lot of of windows "overhead" code required just to create the window, so that you can use the simple graphics functions. Here's a link to a Windows Tutorial

    Graphics may have to wait for your next class
    Last edited by DougDbug; 05-15-2003 at 11:21 AM.

  4. #4
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    use ANSI graphics if you don't want to do that much research...

    for example:
    Code:
    +-------+
    |3      |
    |  *    |
    |   *   |
    |    *  |
    |      3|
    +-------+
    Last edited by major_small; 05-15-2003 at 07:25 PM.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  5. #5
    1.b4 e5 2.a3 d5 3.d4 exd
    Join Date
    Jan 2003
    Posts
    167
    What if the ONLY graphics I want to do is display .jpgs inside a nice little windows box with a command prompt console below it, is there a good tutorial for that?
    AIM: MarderIII

  6. #6
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    A bitmap (.bmp) might be a possibility.

    Programming FAQ

    JPEGs and GIFs are compressed, so you have to decode them. I don't have any experience with this and I don't know if the various compilers have library functions for JPEGs/GIFs. I assume that there are OpenGL and Direct X functions.

  7. #7
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    I can understand what you want to do, and I understand why it is appealing...but the sad part about it is, this isn't Visual Basic. In VB, it's easy...but in C++, it's going to take you a while. You might want to check out SDL (run a board search for a link, or Google) SDL is easy, but it still may be more complicated than you are prepared to handle.
    Away.

  8. #8
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    Originally posted by blackrat364
    I can understand what you want to do, and I understand why it is appealing...but the sad part about it is, this isn't Visual Basic. In VB, it's easy...but in C++, it's going to take you a while. You might want to check out SDL (run a board search for a link, or Google) SDL is easy, but it still may be more complicated than you are prepared to handle.
    Look on the bright side: VB is junk, pretty much... anything you can do with that, you can probably do with C++ better... its just harder.

  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    126
    I'd say that the easiest graphic file format to load and display(yourself) is a 24-bit bitmap(.bmp file on Windows). I wouldn't say that GUI programming in C++ is hard(well, everything is hard compared to VB), just more time-consuming. There's a lot of overhead involved in pretty much all graphic API's. I wouldn't concentrate on OpenGL or DirectX unless you needed some really fast, high performance graphics rendering. It would be best to use the GDI(graphics device interface, part of the WinAPI) for simple graphics. The GDI is probably a good place to start.(I assume you use Windows)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Turtle Graphics, how does it work?
    By freddyvorhees in forum C++ Programming
    Replies: 15
    Last Post: 08-28-2009, 09:57 AM
  2. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  3. egavga.bgi problem
    By sunil21 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  4. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM