-
GFX in C++
Hello I am new to C++, I've been expert Quickbasic programmer and I was okay in Perl/CGI. Anyways, I want to learn C++, because QB was crap.
Well I just wanted to know if there are some more tutorial places on the net for keyboard handeling and graphics (like 640x400 and other highres)
Thanks! Dan_Rzn
-
The bad news is that there is no graphics "standard" in C++. I' recommend that you first learn some console (text) C++. Check out the tutorials on this site, and maybe get "Teach Yourself C++ in 21 Days" by Jesse Liberty.
Check-out the "Graphics and Audio" link in the Programmig FAQ.
You should do a bit of research to help you decide what graphics library you want to use. If you're using Quick Basic, you probably have Windows, so you most likely will want to learn to program the Windows API.
WARNING - C++ is more difficult than BASIC (all these mysterious library functions... classes, etc.) Windows programming is even more complicated than that! For example, "Hello World" is one line of BASIC, about 5 lines of C++ , and Petzold's Hello Windows is about 50 lines!!! ("Programming Windows" by Charles Petzold)
-
I would follow DougDbug's directions. Learn C++ first in console mode only, then learn Win32 (windows programming), which can be used as a base to draw graphics. From here, you could learn DirectX to expand upon that.
A great tutorial which I highly recommend is Ivor Horton's Beginning Visual C++ 6, which will teach you C++ the way it should be taught (i.e. nothing about classes until later chapters, and they are even explained incrementally). This book also covers graphics within windows (but not directx).
-
i was just looking at one of the tutorials for graphics and it showed me how to make a video screen, but i don't know what to include.
this is the code:
void SetText() {
_AX = 0x0003;
geninterrupt (0x10);
}
please help
-
That's code to ask the computer to go into mode 03h, which is standard text mode (25x80). Mode 13h, for example, would be 320x200 256-color mode. But, if you're programming in windows, then you shouldn't be attempting to access the hardware yourself. Look into directX for this. You should have a solid foundation in windows before you get into this, and C++ is a great help for understanding windows. Try the book I spoke of above for C++ and windows programming.
-