Like Tree1Likes
  • 1 Post By grumpy

Need help starting with basic graphics (technial compiler related question)

This is a discussion on Need help starting with basic graphics (technial compiler related question) within the C Programming forums, part of the General Programming Boards category; Hi, I am programming with code::blocks IDE for some time now and I love it. But now I want to ...

  1. #1
    Registered User
    Join Date
    Aug 2013
    Posts
    73

    Need help starting with basic graphics (technial compiler related question)

    Hi, I am programming with code::blocks IDE for some time now and I love it. But now I want to start learning a little bit about basic 2D graphics.
    I have read tutorials about how to initiate the graphics mode with
    initgraph() function , But with my default compiler setup I don't have access to the <graphics.h> header file.

    How can I include this library and start using graphics?

    Do you reccommend maybe start using another library other than BGI ?
    Again, for now, i don't want something fancy, just some basic 2D graphics to get the hang of it.

    Thx.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,287
    BGI is a vendor-specific library from (originally) Borland. It is not available with non-Borland development environments.

    With a bit of googling, you'll be able to find a couple of free emulations of BGI that work with MingW (the compiler packaged with Code::Blocks by default) - I've never used those personally, so can't comment on how good or bad they are.

    Depends what you want to do, but you're probably better off using WxWidgets (which comes bundled with Code::Blocks depending on your choice of installation package, IIRC).
    Right 98% of the time, and don't care about the other 3%.

  3. #3
    Registered User
    Join Date
    Aug 2013
    Posts
    73
    Ok thanks, I will check WxWidgets. I was asking about BGI because The first thing google finds when searching for "C graphics" Is some basic tutorials for using the BGI library (with <graphics.h>)

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    6,287
    BGI was one of the first ever (it wasn't actually "the first ever" but it was pretty close) graphics libraries bundled with a C compiler, which is why it would show up with google. Similarly if you google for BGI tutorial.

    Bear in mind that graphics (in any form) is not part of C at all, except as vendor-specific libraries (like BGI) or third-party extension (like BGI emulators, presumably). If you have your heart set on doing graphics, you're probably better off using something slightly more modern than BGI (BGI was great in its day, but its day was the same as MS-DOS 3 and Microsoft Windows version 1).
    patishi likes this.
    Right 98% of the time, and don't care about the other 3%.

  5. #5
    Registered User
    Join Date
    Nov 2013
    Posts
    8
    C is bare bones compared to Visual basic for 2D graphics or even Python as those both have a library for those tasks. I created a similar look a like rocket ship from the old game computer space in python.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. enum related basic question
    By sarvsav in forum C Programming
    Replies: 6
    Last Post: 11-19-2013, 03:07 PM
  2. Replies: 3
    Last Post: 07-23-2011, 02:24 AM
  3. Graphics related
    By trish in forum C Programming
    Replies: 13
    Last Post: 04-13-2010, 09:55 AM
  4. A graphics related question
    By GOBLIN-85 in forum C++ Programming
    Replies: 7
    Last Post: 12-20-2008, 12:37 PM
  5. starting graphics!
    By Kohatian 3279 in forum Game Programming
    Replies: 1
    Last Post: 02-19-2002, 11:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21