Colour and drawings or graphics in C++

F

Fredmanglis

I've been teaching myself the C++ Programming language. So far however,
I have not come across any useful tutorials on how I can output
coloured text, create drawings or graphics in C++. All I can create is
a simple console based application.
I would like to know if it's possible to do it using just the standard
header files or do I have to get proprietary ones. If there's anyone
with a suggestion or a good tutorial he/she knows of, please assist me.
 
J

Jerry Coffin

I've been teaching myself the C++ Programming language. So far however,
I have not come across any useful tutorials on how I can output
coloured text, create drawings or graphics in C++. All I can create is
a simple console based application.
I would like to know if it's possible to do it using just the standard
header files or do I have to get proprietary ones. If there's anyone
with a suggestion or a good tutorial he/she knows of, please assist me.

You can't do it with the standard library. There are some possibilities
in the range between standard and proprietary though. OpenGL, for one
obvious possibility, isn't part of the C++ standard, but definitely
isn't proprietary to one organization either -- it's available on a
fairly wide variety of hardware and software, including most of the
widely used OSes (e.g. *BSD, Linux, MacOS, Windows).
 
J

Jens Theisen

Fredmanglis said:
I've been teaching myself the C++ Programming language. So far however,
I have not come across any useful tutorials on how I can output
coloured text, create drawings or graphics in C++. All I can create is
a simple console based application.

This is true; no input/output beyond simple console means is possible
with portable C/C++.
I would like to know if it's possible to do it using just the standard
header files or do I have to get proprietary ones. If there's anyone
with a suggestion or a good tutorial he/she knows of, please assist me.

You don't have to use proprietary ones, as there are loads of free
alternatives. You need to look what's available on your platform. What
platform are you using?

If you're a beginner and want to deal with colourful user interfaces,
you might also want to consider a different language. Higher level
languages can provide an easier starting point.

Jens
 
F

Fredmanglis

Jens said:
This is true; no input/output beyond simple console means is possible
with portable C/C++.


You don't have to use proprietary ones, as there are loads of free
alternatives. You need to look what's available on your platform. What
platform are you using?

If you're a beginner and want to deal with colourful user interfaces,
you might also want to consider a different language. Higher level
languages can provide an easier starting point.

Jens

Thanks. I am using Windows Operating Systems though I want at the
earliest convenient time to transfer to Linux. However since I am
currently using Windows I could take any help you have currently.
 
J

Jens Theisen

Fredmanglis said:
Thanks. I am using Windows Operating Systems though I want at the
earliest convenient time to transfer to Linux. However since I am
currently using Windows I could take any help you have currently.

If that means you're using VisualStudio, I'd just use what Microsoft
offers, as it's probably an easy start - though it's indeed proprietary.

It really depends on quite a lot of things, but my impression is that
you don't really care and just want to play around a bit with graphical
user interfaces. In this case, VisualStudio might be good starting point
- though I don't have any experience with it.

There are zillions of alternatives, but it doesn't really matter too
much, if you just want to experiment.

Jens
 
A

Aurelien rainone

Fredmanglis said:
I've been teaching myself the C++ Programming language. So far however,
I have not come across any useful tutorials on how I can output
coloured text, create drawings or graphics in C++. All I can create is
a simple console based application.
I would like to know if it's possible to do it using just the standard
header files or do I have to get proprietary ones. If there's anyone
with a suggestion or a good tutorial he/she knows of, please assist me.

I was like you one year ago, looking for a convenient way to draw in
C/C++.
I can advise you SDL, which is a very well documented open source
multiplatform library, and totally free !!! To my opinion, SDL is
perfect to begin with 2D graphics, though you can also use to make 2D
games because SDL manages input (keyboard, joystick, mouse).

I started with this very good serie of 6 tutorials. Starting from
scratch, the last tutorial will cover anything to develop a space
shooter like game.

Here are the tutorials :
http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index

And here is the website :
http://www.libsdl.org where you can download the runtime and the
developement libraries
 
D

Diego Martins

Aurelien said:
I was like you one year ago, looking for a convenient way to draw in
C/C++.
I can advise you SDL, which is a very well documented open source
multiplatform library, and totally free !!! To my opinion, SDL is
perfect to begin with 2D graphics, though you can also use to make 2D
games because SDL manages input (keyboard, joystick, mouse).

I started with this very good serie of 6 tutorials. Starting from
scratch, the last tutorial will cover anything to develop a space
shooter like game.

Here are the tutorials :
http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index

And here is the website :
http://www.libsdl.org where you can download the runtime and the
developement libraries

I do agree SDL is perfect to start.
But SDL does not have multiple windows :( If you need that, you have to
switch to another toolkit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top