I want to manually draw the graphics, what that mean is without using any library or frame work like QT, directX , whindow.h .... like giving command to every pixels on the screen to show some specific color at different time. Every body gives tutorials on based on these library or whatever they are called. What i want is to make my own GUI. As far as I could think it is going to be very complicated, hard to learn and to understand, messy and a lot of time consuming, but I am ready for that. I need some resources to understand that.
and Yes i know C++ so it would better if I had to work with this language but I will learn other language if it is required, just i want to know which language i should learn.
Graphics in C++ is defined to create a graphic model like creating different shapes and adding colors to it. It can be done in the C++ console by importing graphics. h library to GCC compiler. We can draw the circle, line, eclipse, and other geometric shapes too.
Show activity on this post. I looked at your 'c' question. std::cout << Ansi_t::clrscr() << std::flush; // clears the screen std::cout << Ansi_t::gotoRC(5, 25) << '*' << std::flush; // position the cursor, and output a single 'dot': Now use this to draw a line, etc.
line function is used to draw a line from a point(x1,y1) to point(x2,y2) i.e. (x1,y1) and (x2,y2) are end points of the line. The code given below draws a line.
In the old days, you could write directly to video memory with no help from the operating system/ROM. Today, on current hardware, you have to go through the operating system in order to write to the screen. That means using a separate library (like Qt) or using the OS features (windows.h). You could use directX or something and get more raw access to video memory, but that is still using a library/framework.
If you want with C++ and native Windows API (without DirectX) , you should use GDI(Microsoft Graphics device interface) + MFC(Microsoft Foundation Classes) this is a classic implementation of Windows GUI, If you want complicated graphics with shaders you need DirectX/OpenGL without hesitation. meanwhile if you want higher programming framework you can use C#(CSHARP) or Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With