Click here to Skip to main content
15,885,777 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
What are the steps in creating graphics in c++?

What I have tried:

Nothing I have tried simply because I only know how to declare variable into the main function
Posted
Updated 5-Mar-23 22:16pm
Comments
Dave Kreskowiak 4-Mar-23 10:56am    
You have a LOT to learn before you start digging into graphics libraries.

If all you know is "how to declare a local variable", then you probably aren't ready for graphics work: it can get pretty involved.

The first thing you need to do is work out what kind of graphics you are going to be involved in. "Graphics" encompasses a considerable range of possibilities, ranging from "I want to set a pixel on or off", through "I want to draw a line", "I want to show this image", "I want to draw a region that is shaped like an apple and render it in 3D with a light source over there somewhere" going via "I want buttons and checkboxes on a form".

And C++ has been used for all of these, and more! But in all cases, just being able to declare a local variable isn't going to be anywhere near enough experience with the language to get you anywhere useful.

So start by learning the language itself pretty well, then decide what you actually want to do, and start looking at the frameworks and libraries that C++ runs with to decide what framework you need to work with.
Then more learning: this time the framework and how you interact with it - and these can be massive and complex - a good grounding in that is going to be pretty much essential as well.

Sorry if this sounds really negative - it isn't meant to be - but you are asking a far too simple a question about a far too big subject for use to give you and answer you can work with immediately.
Good luck!
 
Share this answer
 
There is no simple answer, it all depends on what operating system, what device and what kind of graphics 2D, 3D etc.
Take a look at this CodeProject search on C++ and graphics: Search[^]
more than 1700 articles :)

For Windows GDI32 graphics you can take a look at this: Simple Graphics Class[^]
 
Share this answer
 
v2
Quote:
What are the steps in creating graphics in c++?

The question show complete lack of knowledge in the domain. It is like asking the steps to build a Space Shuttle in your backyard, first step be a top notch engineer.

Since C++ is not graphic, you need to choose a graphic framework which add everything needed, the framework will depend on Windows/Linux, a given framework can not do every kind of graphic.

So you need features depending on kind of graphics app you want. This will make your choise of framework. This framework will make the steps. Being a programmer will help too.

You may be interested in Scratch (programming language) - Wikipedia[^]
This language/framework is aimed to teach you programming while playing with graphics.
 
Share this answer
 
The steps used depend on the type of graphics that are being drawn. That needs to be your first decision. Do you want to draw 2D or 3D graphics?

If you want to pursue 2D graphics have a look at some of these : CodeProject Search : GDI+[^]

If you want to pursue 3D graphics have a look at some of these : CodeProject Search : OpenGL[^]

Graphics projects are how I taught myself programming. I started with 2D stuff, beginning with drawing wireframe objects, spirographs, and fractals and then I got into 3D graphics with OpenGL.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900