Thread: Graphics Mode

  1. #1
    C++No0b!!!
    Join Date
    Jul 2005
    Location
    penn
    Posts
    66

    Graphics Mode

    Now I know there is a way to get into some "mode" to view graphics in a c++ program. Unfortunatly, all tutorials I have read left me clueless as to how this is done. Can anyone please clear this up for me.

  2. #2
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    What do you mean by graphics mode? like displaying images? just changing colors?

    Or are you talking about the whole window being graphical, like win32 API or MFC
    My Website
    010000110010101100101011
    Add Color To Your Code!

  3. #3
    C++No0b!!!
    Join Date
    Jul 2005
    Location
    penn
    Posts
    66
    i mean like displaying images when u run the program. i wanna learn how to make games, but for now i wanna learn how just to display them

  4. #4
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    check jvorkoey's thread
    http://cboard.cprogramming.com/showthread.php?t=67880
    he made a library that can dislpay images in MS_DOS examine it.
    But if you are comfortable with C++ move to Win32. Its much easier to do graphical things with win32, and that takes you 1 step closer to game programmer
    My Website
    010000110010101100101011
    Add Color To Your Code!

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    There is no "graphics mode" in ANSI/ISO Standard C++.

    So, it all depends on your system, compiler, and the type of graphics you want to display. If you're on a Windows system, and you already have the approximately 2 pages of "overhead" code to create a window, it's not too hard to display a bitmap image or to generate a simple shape.

    For more advanced graphics, you'll need a graphics library such as DirectX, and you'll probably need a book covering the graphics library of your choice.

    I'm not 100% sure, but I think you really need to learn Windows (or other GUI) programming before trying to learn a specialized graphics library.

  6. #6
    C++No0b!!!
    Join Date
    Jul 2005
    Location
    penn
    Posts
    66
    well i was gunna try that ogre one that i found from a link somewhere here. i'm using i think windows 98 and dev c++ 4

    i tried doin the lines and stuff but all i got was errors so i abandoned it.

  7. #7
    Registered User
    Join Date
    Jul 2005
    Posts
    23

    Try this engine

    http://hge.relishgames.com/ is very easy to use and friendly for full screen "game" style graphics. For GUI do WIN32.

    As far as using Haaf's, you might have to look up simple double buffering, as that can be hard to get a grasp on. In a nutshell, all you do is run a rapid loop(the main game loop), and you 1) Clear the backbuffer, 2) Stamp sprites to it in whatever order pleases you(including rotation and alpha I beleive, which is nice ), 3) flip the backbuffer forward. That should pretty much get you set if you want graphics and want em now

    As for 3D... well, I know a lot of people want to rush right into it. Nothing wrong with that, I understand where the urge comes from. I think, however, that it might be best to do something simpler first. I am just a N00b myself though, so take it with a grain of salt.

    EDIT: As a bonus, HGE doesn't rely on you knowing any real WIN32. You can just sort of use the main loop to set FrameFunc and go with it. Granted, it is probably sill a *really* good idea to learn some WIN32, and it certainly isn't information that will go to waste, as it is a differant kind of programming(event driven) as opposed to what most people learn first(main loop).
    Last edited by tol; 07-26-2005 at 06:19 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using gotoxy() in graphics mode
    By sureshkumarct in forum C Programming
    Replies: 1
    Last Post: 01-08-2007, 01:18 PM
  2. Handling mouse in graphics mode in Turbo C/DOS
    By sureshkumarct in forum C Programming
    Replies: 2
    Last Post: 12-24-2006, 09:36 AM
  3. Replies: 1
    Last Post: 07-28-2003, 12:56 PM
  4. text input in graphics mode
    By jamie in forum C++ Programming
    Replies: 1
    Last Post: 03-17-2003, 10:33 PM
  5. Input a string in graphics mode?
    By Vegettų in forum C++ Programming
    Replies: 3
    Last Post: 03-08-2002, 06:34 PM