Thread: Please help with graphics!

  1. #1

    Please help with graphics!

    Ok, I've programmed stuff for the TI Calc in basic and I just started learning C++ yesterday. I doanloaded Dev-C++ 4 from this morning.

    I have done some text based stuff, but I want to get into graphics and stuff. However, I'm confused on how to get into the format that displays graphics instead of text based stuff. I started reading the graphics tutorials a little while ago and followed the code for setting MCGA on the first tutorial, but it doesn't work. I'm not even sure if it is what I'm supposed to do.
    Do I have to be in a certain setting with my compiler or what?

    The code I followed was...

    void Set MCGA()
    _AX =0x0013;
    geninterrupt (0x10);

    It gave me an error saying I needed to define _AX and geninterrupt so i fixed that by adding int in front of each. But it still doesn't do anything. Please help!

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    hey, I'm not sure, but I'd say that you've got a little bit of ASM there...AX is a register on the CPU...dunno how to fix it, though...

  3. #3
    Ok, I barely understand what you just said. I think...

    Can anyone tell me how they get into a graphics setting instead of a text. Is it just a matter of typing a code, or do you have to start a specific type of project in your compiler?

  4. #4
    Registered User tgm's Avatar
    Join Date
    Jun 2002
    You need a graphics library. You probably don't want to be building one yourself quite yet so I'd look into the ones that are already available. I recommend SDL, it's easy to use and setup and works well with MinGW, which is the compiler for Dev-C++. You could also go with DirectX, OpenGL (it's only a graphics library), or Allegro. There are many others out there but those seem to be the most popular around here. SDL uses OpenGL for it's 3D stuff so when I suggest SDL, it's more for the rest of the multimedia stuff like mouse and keyboard and stuff (I just assume you'll be using OpenGL with it).
    I'd also spend a bit of time learning C/C++ before you jump right into graphics. It will make life easier for you.

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
    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