Thread: want to learn graphics

  1. #1

    Cool want to learn graphics


    i am very comfortable programming in C for DOS, using the lcc-win32 compiler for windows. i dont know anything at all about graphics programming but i want to learn. i have heard lots of mumbo about graphics libraries and all this vga and stuff but i dont know what any of it means if anyone could give me some raphics programming tutorials that go from absolute graphics beginner up to enough for me to create a little tetris-like game id be EXTREEMELY grateful

    thanks in advance,

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    A search for graphics on these forums or will probably give you quite a bit to look at.

    My best code is written with the delete key.

  3. #3
    Registered User foniks munkee's Avatar
    Join Date
    Nov 2001
    Doing some tutorials in OpenGL is a good place to start as you can create programs in windows console mode without having to worry about the Win32 API. Lets you concentrate on the actual mechanics of graphics programming.

    I would recomend starting with the GLUT libraries, you can find links to this with installation instructions and even some tutorials at

    Also I believe the OpenGL red book is available free online (not sure where). It is not the current edition as this is still available in a retail version, but it should still be relevant - there may be a link of the OpenGL site too. This is a great book and is written by the OpenGL architecture review board.

  4. #4
    This is written in Turbo-C:

    /* Program to draw a Circle */

    #include <graphics.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <conio.h>

    int main(void)

    /* request auto-detection */
    int gdriver = DETECT, gmode, errorcode;
    int midx, midy;
    int radius = 100;

    /* initialise graphics and local variables */
    initgraph(&gdriver, &gmode, "");

    /* read result of initialisation */
    errorcode = graphresult();
    if (errorcode != grOk) /* an error occurred */

    printf("Graphics error: %s\n", grapherrormsg(errorcode));
    printf("Press any key to halt:");
    exit(1); /* terminate with an error code */


    midx = getmaxx() / 2;
    midy = getmaxy() / 2;

    /* draw the circle */
    circle(midx, midy, radius);

    /* clean up */
    return 0;


  5. #5
    Registered User
    Join Date
    Dec 2001
    Install an old version of Turbo C++ and take a look at the all the examples in the provided help.

  6. #6
    Registered User
    Join Date
    Sep 2001
    Get borland and use MDL, the best for everything dos related. Mouse, easy interrupt hooking, pc speaker music, your mom, tons of graphics modes up to 1024x768x16m (m as in million), keyboard routines, gui routines, and so much other stuff (did I mention your mom)

  7. #7
    Registered User
    Join Date
    Feb 2002
    first of all be sure whether u want to learn graphics seriously or just for fun .If u want to study serious graphics then u require understanding of basic mathematics,plus study OpenGL libraries.
    U can get them from the opengl web site

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. Difficulty choosing graphics library
    By jdiperla in forum Game Programming
    Replies: 11
    Last Post: 02-27-2008, 06:35 PM
  3. 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
  4. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  5. Trying to learn guitar
    By Ben_Robotics in forum A Brief History of
    Replies: 12
    Last Post: 07-10-2003, 03:15 AM