What is the code to show a graphic?
Printable View
What is the code to show a graphic?
could you ask a more 'general' question?
How do you show graphics, in c++?
well, there are a LOT of ways... there can be a LOT! of code.
What do you want the graphics for?
Dos, Windows, Mac, Linux, GDI, Everything,ect,ect...
what do you want to do with them?
Web stuff, browsers, games, paint programs, 3D editors?
http://www.gamedev.net
might be of some use if you don't know what to do, ad are loking for games...
http://www.flipcode.com is more general.
Windows. I want to make a game.
ok, you need to decide what your gonna use to make it,
OpenGL, is a Very Powerful Graphics only API
Direct-X, is a Powerful API that has EVERYTHING you need to make a windows game all in one place,
but befoe either of them you have to learn Win32...
do a search on the forums for good windows or good win32 books.
if you want help.. then ASK A DIRECT QUESTION! :D
People are just going to get annoyed with you when you come in and say things like "help me", "i want to make a game", or "please tell me how to code halflife".
go and learn to program, then come back with specific questions when you have problems.
excuse me, but that's like telling someone to hold still while you throw darts at them!
To put it simple ddroid33, first you should learn C++ before you start with graphics. I'm guessing you're new, right? I started programming two years ago with the thought of making a game really fast. Didn't happen until 9 months later, when I figured out how to show monochrome display bitmap 1x1. I cheered forever. Anyway, I hate it when people just tell you how wrong you are and don't give you anything. If you want to display a picture, it must depend on your compiler. If you are using a windows Compiler, like Visual C++ or Dev-C++, then you must learn win32 programming. It really sucks if you don't know C++. If your compiler is DOS, like DJGPP or Borland Turbo C++, then it might be alittle easier to put a picture on. Hmmm, go to http://www.shdon.com and go under their graphics section. Download how to display a bmp or GIF. If you want to display the bitmap then you will have to use an extremly simple bitmap editor, like microsoft paint. Then use the code from shdon.com, and use it's LoadBMP() function to display the bitmap. Atleast I think that's the function for loading the Bitmap. You'll figure it out once you look at main(). Good Luck Grasshopper.:rolleyes:
Quote:
...Direct-X, is a Powerful API that has EVERYTHING you need to make a windows game all in one place,
but befoe either of them you have to learn Win32...
...and also learn a bit about COM.
You could learn allegro and then you wouldn't have to learn any of that os specific stuff though its still good to know it.
is a must read for anyone brand new to game development.
http://www.gamedev.net/reference/des...es/default.asp
well whatever you do, just get that video address and have at it... any way you can... and realize you've got the power to control your display... and do it to it's fullest... [and see my behold link in my sig willya? thanks! :)] i hope you are inspired and take it far...
Allegro is the way to go, it's so easy.
it takes care of all the complex stuff for you.