|
|
|
|
|
by astrodust
4661 days ago
|
|
How else do you get pixels to the screen at reasonable frame rates? You load it into a texture and place it on a 3D polygon that just happens to be sized the same as the screen, making it in effect a 2D canvas with 1:1 texel to pixel mappings. Doing old-school "bitblitting" isn't going to cut it today, the overhead is too huge. GPU texture manipulation and layering is orders of magnitude faster than what you can do in the CPU space. Windows uses Direct3D for the native UI, and OS X uses OpenGL for the same thing. |
|
If you're doing AAA games in 2D, yeah you will use the GPU. But an indie game? You probably don't need it. Especially if you're writing the game without Unity (i.e. straight C++). The costs of setting up and working with 2D in OpenGL is high. I've done it. It's not fun, it's not pretty. It's a bitch, plain and simple. Texture atlases, font rendering, UV coords, texture uploading, vertex buffers, shaders. That's a ton of crap you have to worry with. Just to render simple 2D sprites to a screen. Many people can and do skip it and go straight to SDL or somesuch. It works, and modern CPUs are more than adequate.