Beginning 2D Graphics Programming
Hi,
I'm hoping to learn how to use 2D graphics in my programs but so far, I've had no luck finding good information. All tutorials I've found seem to be for 3D graphics which I have no interest in.
If it matters, I'm using c++ for programming.
Thanks beforehand.
I'm hoping to learn how to use 2D graphics in my programs but so far, I've had no luck finding good information. All tutorials I've found seem to be for 3D graphics which I have no interest in.
If it matters, I'm using c++ for programming.
Thanks beforehand.
If you're making a game, I suggest using OpenGL. If your game is for the iPhone it's OpenGL ES, which is different. There's a lot to know and understand about graphics programming. It's impossible to give a simple answer but I can hopefully get you started in the right direction. Maybe you can find some sample code out there on the net.
Start your research by learning about the Projection matrix and for 2D, specifically, you'll want to use an Orthographic projection. glMatrixMode(GL_PROJECTION), glOrtho... there are a couple good keywords to get you started with Google.
gluOrtho2D, I think is the utility function call.
Other options include Quartz2D, which I know nothing about, QuickTime, and I'm sure there's more but those are the 2 I can think of off the top of my head.
Sorry if it isn't very helpful but it's a very broad question so I hope I helped to at least get you started.
Start your research by learning about the Projection matrix and for 2D, specifically, you'll want to use an Orthographic projection. glMatrixMode(GL_PROJECTION), glOrtho... there are a couple good keywords to get you started with Google.
gluOrtho2D, I think is the utility function call.
Other options include Quartz2D, which I know nothing about, QuickTime, and I'm sure there's more but those are the 2 I can think of off the top of my head.
Sorry if it isn't very helpful but it's a very broad question so I hope I helped to at least get you started.
bmantzey Wrote:gluOrtho2D, I think is the utility function call.
...which is part of glu, which doesn't exist in OpenGL ES. Just to avoid confusion for the original poster.
I would actually recommend learning SDL rather than OpenGL at first, as it's much easier to get interesting things on the screen.
Unfortunately, I don't know of any decent 2D OpenGL tutorials.
Unfortunately, I don't know of any decent 2D OpenGL tutorials.
My web site - Games, music, Python stuff
diordna Wrote:I would actually recommend learning SDL rather than OpenGL at first, as it's much easier to get interesting things on the screen.
Unfortunately, I don't know of any decent 2D OpenGL tutorials.
I second that. OpenGL, especially for 2D game programming, is pretty tricky to learn if you're new to game development. SDL simplifies a lot of the icky low-level stuff.
As for 2D OpenGL tutorials, I don't know of any specific tutorials either. If it helps, though, I learned most of the techniques from NeHe, parts of the Red Book, parts of Apple's OpenGL documentation, and a lot of the posts here. Hopefully that can simplify the Googling a bit.
Since when was "Fred" a placeholder variable?
There's a really good 'Lander' sample program on the iPhone developer site, which shows how to do 2D stuff in eaGL (on iPhone).
neHe is a great site for learning openGL stuff too.
http://nehe.gamedev.net/
neHe is a great site for learning openGL stuff too.
http://nehe.gamedev.net/
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Beginning ARB vertex programs | dfmoore | 1 | 2,642 |
Sep 24, 2005 02:45 PM Last Post: lightbringer |
|
| beginning opengl | vbuser1338 | 23 | 8,075 |
Jan 16, 2005 12:11 PM Last Post: SethWillits |
|

