Alex Rivera | Logout

Is it possible to do old school 2d blitting on modern GPU?

Asked 2010-02-28T09:43:36.597
12

It looks like GL has become mainstream for all gaming platforms (even handheld!) This has pushed the deployment of modern GPU chipsets to large numbers of consumers.

This is amazing.

With the modern GPU systems out there now, is it possible to do generic old-school graphics programming (aka - blit from X rect to Y rect using VRAM)? (Think Amiga) Or are the operations centered around vertex and pixel shaders?

Is this accessable from GL? OpenGL ES?

Rendering a textured quad is OK, but it would require double buffering and a re-render of the entire scene. Was seeing if I could avoid this.

Edit
Report

2 Answers

2

Well, you can use libSDL and get a pointer to the screen framebuffer and do whatever you want with the pixels. Or you cand do all your drawing to a memory buffer, load to a GL texture and draw textured quads which probably it's faster because of hardware acceleration.

answered 2010-02-28T11:24:46.047
1

If you're drawing textured quads, with which you can easily simulate "old school" blitting, then indeed the pixels are copied from video memory by the GPU. Also note that while bitmap operations are possible in OpenGL, they can be painfully slow because the 3D path is optimized on consumer grade video cards, whereas 2D paths may not be.

answered 2010-03-01T10:14:32.480

Your Answer